Package uk.ac.starlink.topcat.plot2

## Class FloatManager

- java.lang.Object
- - uk.ac.starlink.topcat.plot2.FloatManager

-     public abstract class FloatManager
      extends java.lang.Object

  Manages components which may either be contained in the same window, or one of which may be floated out into a separate dialogue.
  Since:
    25 Mar 2013
  Author:
    Mark Taylor

- - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `FloatManager​(javax.swing.JComponent container, javax.swing.JComponent fixedPanel, javax.swing.JComponent floatablePanel)` | Constructor.

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `configureContainer​(boolean floating)` | Configures the container panel for floating or non-floating status.
    `static FloatManager` | `createFloatManager​(javax.swing.JComponent container, javax.swing.JComponent fixedPanel, javax.swing.JComponent floatablePanel)` | Returns an instance of this class.
    `protected javax.swing.JComponent` | `getFloatablePanel()` | Returns the floatable panel.
    `abstract ToggleButtonModel` | `getFloatToggle()` | Returns a toggle button model which can be used to control float status.
    `abstract void` | `init()` | Called to initialise this manager when the components are populated.

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

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

- - ### Constructor Detail

    - #### FloatManager

          protected FloatManager​(javax.swing.JComponent container,
                                 javax.swing.JComponent fixedPanel,
                                 javax.swing.JComponent floatablePanel)

      Constructor.
      Parameters:
        `container` - containing panel which contains one or both of the others
        `fixedPanel` - component which is always inside container
        `floatablePanel` - component which may be inside container or may be floated out of it

  - ### Method Detail

    - #### getFloatToggle

          public abstract ToggleButtonModel getFloatToggle()

      Returns a toggle button model which can be used to control float status. If this manager implementation is not controlled by a toggler, the return value may be null.
      Returns:
        float toggler, or null

    - #### init

          public abstract void init()

      Called to initialise this manager when the components are populated.

    - #### getFloatablePanel

          protected javax.swing.JComponent getFloatablePanel()

      Returns the floatable panel.
      Returns:
        floatable panel

    - #### configureContainer

          protected void configureContainer​(boolean floating)

      Configures the container panel for floating or non-floating status. The floating panel itself is not affected.
      Parameters:
        `floating` - true for floating, false for not

    - #### createFloatManager

          public static FloatManager createFloatManager​(javax.swing.JComponent container,
                                                        javax.swing.JComponent fixedPanel,
                                                        javax.swing.JComponent floatablePanel)

      Returns an instance of this class.
      Parameters:
        `container` - containing panel which contains one or both of the others
        `fixedPanel` - component which is always inside container
        `floatablePanel` - component which may be inside container or may be floated out of it
      Returns:
        new float manager