Package docking.widgets.fieldpanel

# Class FieldPanelOverLayoutManager

java.lang.Object
docking.widgets.fieldpanel.FieldPanelOverLayoutManager

All Implemented Interfaces:
  `LayoutManager`, `LayoutManager2`

public class FieldPanelOverLayoutManager extends Object implements LayoutManager2
A `LayoutManager` that can be applied to a `FieldPanel`, allowing `Component`s to be placed over a given field location.

To apply it, use `Container.setLayout(LayoutManager)` to install it. In this case, the `Container` must be a `FieldPanel`. Then, use `Container.add(Component, Object)`, passing a `FieldLocation` as the constraint. Currently, you must call `layoutContainer(Container)` manually after you add or remove any components.

When this layout manager is removed from the `FieldPanel`, you should call `unregister()` in order to dispose of internal resources.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FieldPanelOverLayoutManager(FieldPanel fieldpane)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `addComponent(FieldLocation loc, Component comp)`
  Add a component to be position over the given location
  `void`
  `addLayoutComponent(Component comp, Object constraints)`
  `void`
  `addLayoutComponent(String name, Component comp)`
  `void`
  `addLayoutListener(FieldPanelOverLayoutListener listener)`
  Add a listener for overlay layout events
  `protected void`
  `fireLayoutListeners(FieldPanelOverLayoutEvent ev)`
  Fire the given overlay layout event to all registered listeners
  `float`
  `getLayoutAlignmentX(Container target)`
  `float`
  `getLayoutAlignmentY(Container target)`
  `FieldPanelOverLayoutListener[]`
  `getLayoutListeners()`
  Get the list of register overlay layout event listeners
  `<T> T[]`
  `getListeners(Class<T> listenerType)`
  `void`
  `invalidateLayout(Container target)`
  `void`
  `layoutContainer(Container parent)`
  `Dimension`
  `maximumLayoutSize(Container target)`
  `Dimension`
  `minimumLayoutSize(Container parent)`
  `Dimension`
  `preferredLayoutSize(Container parent)`
  `protected boolean`
  `removeComponent(FieldLocation loc)`
  Remove a component by its field location
  `protected boolean`
  `removeComponent(Component comp)`
  Remove a component
  `void`
  `removeLayoutComponent(Component comp)`
  `void`
  `removeLayoutListener(FieldPanelOverLayoutListener listener)`
  Remove a listener for overlay layout events
  `protected void`
  `trickMapComponents()`
  Tickle the layout manager, so we get a callback to map the components onto the layout.
  `void`
  `unregister()`
  Remove my callbacks from the `FieldPanel`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### FieldPanelOverLayoutManager

    public FieldPanelOverLayoutManager(FieldPanel fieldpane)

- ## Method Details

  - ### unregister

    public void unregister()
    Remove my callbacks from the `FieldPanel`

  - ### addComponent

    protected void addComponent(FieldLocation loc, Component comp)
    Add a component to be position over the given location
    Parameters:
      `loc` - the location of the field to occlude
      `comp` - the component to be placed over the field

  - ### removeComponent

    protected boolean removeComponent(FieldLocation loc)
    Remove a component by its field location
    Parameters:
      `loc` - the location of the field
    Returns:
      true if there was a component placed at the given location

  - ### removeComponent

    protected boolean removeComponent(Component comp)
    Remove a component
    Parameters:
      `comp` - the component to remove
    Returns:
      true if the component existed

  - ### trickMapComponents

    protected void trickMapComponents()
    Tickle the layout manager, so we get a callback to map the components onto the layout.

  - ### addLayoutListener

    public void addLayoutListener(FieldPanelOverLayoutListener listener)
    Add a listener for overlay layout events
    Parameters:
      `listener` - the listener to add

  - ### removeLayoutListener

    public void removeLayoutListener(FieldPanelOverLayoutListener listener)
    Remove a listener for overlay layout events
    Parameters:
      `listener` - the listener to remove

  - ### getLayoutListeners

    public FieldPanelOverLayoutListener[] getLayoutListeners()
    Get the list of register overlay layout event listeners
    Returns:
      the array

  - ### getListeners

    public <T> T[] getListeners(Class<T> listenerType)

  - ### fireLayoutListeners

    protected void fireLayoutListeners(FieldPanelOverLayoutEvent ev)
    Fire the given overlay layout event to all registered listeners
    Parameters:
      `ev` -

  - ### addLayoutComponent

    public void addLayoutComponent(String name, Component comp)
    Specified by:
      `addLayoutComponent` in interface `LayoutManager`

  - ### addLayoutComponent

    public void addLayoutComponent(Component comp, Object constraints)
    Specified by:
      `addLayoutComponent` in interface `LayoutManager2`

  - ### removeLayoutComponent

    public void removeLayoutComponent(Component comp)
    Specified by:
      `removeLayoutComponent` in interface `LayoutManager`

  - ### preferredLayoutSize

    public Dimension preferredLayoutSize(Container parent)
    Specified by:
      `preferredLayoutSize` in interface `LayoutManager`

  - ### minimumLayoutSize

    public Dimension minimumLayoutSize(Container parent)
    Specified by:
      `minimumLayoutSize` in interface `LayoutManager`

  - ### maximumLayoutSize

    public Dimension maximumLayoutSize(Container target)
    Specified by:
      `maximumLayoutSize` in interface `LayoutManager2`

  - ### layoutContainer

    public void layoutContainer(Container parent)
    Specified by:
      `layoutContainer` in interface `LayoutManager`

  - ### getLayoutAlignmentX

    public float getLayoutAlignmentX(Container target)
    Specified by:
      `getLayoutAlignmentX` in interface `LayoutManager2`

  - ### getLayoutAlignmentY

    public float getLayoutAlignmentY(Container target)
    Specified by:
      `getLayoutAlignmentY` in interface `LayoutManager2`

  - ### invalidateLayout

    public void invalidateLayout(Container target)
    Specified by:
      `invalidateLayout` in interface `LayoutManager2`