Class FloatManager

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

public abstract class FloatManager extends 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 Details

    • FloatManager

      protected FloatManager(JComponent container, JComponent fixedPanel, 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 Details

    • 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 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(JComponent container, JComponent fixedPanel, 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