Package uk.ac.starlink.topcat.plot2
Class FloatManager
java.lang.Object
uk.ac.starlink.topcat.plot2.FloatManager
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
ConstructorsModifierConstructorDescriptionprotected
FloatManager
(JComponent container, JComponent fixedPanel, JComponent floatablePanel) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
configureContainer
(boolean floating) Configures the container panel for floating or non-floating status.static FloatManager
createFloatManager
(JComponent container, JComponent fixedPanel, JComponent floatablePanel) Returns an instance of this class.protected JComponent
Returns the floatable panel.abstract ToggleButtonModel
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.
-
Constructor Details
-
FloatManager
Constructor.- Parameters:
container
- containing panel which contains one or both of the othersfixedPanel
- component which is always inside containerfloatablePanel
- component which may be inside container or may be floated out of it
-
-
Method Details
-
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
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 othersfixedPanel
- component which is always inside containerfloatablePanel
- component which may be inside container or may be floated out of it- Returns:
- new float manager
-