Package uk.ac.starlink.topcat.plot2
Class FloatManager
- java.lang.Object
-
- uk.ac.starlink.topcat.plot2.FloatManager
-
public abstract class FloatManager extends java.lang.ObjectManages 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 protectedFloatManager(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 voidconfigureContainer(boolean floating)Configures the container panel for floating or non-floating status.static FloatManagercreateFloatManager(javax.swing.JComponent container, javax.swing.JComponent fixedPanel, javax.swing.JComponent floatablePanel)Returns an instance of this class.protected javax.swing.JComponentgetFloatablePanel()Returns the floatable panel.abstract ToggleButtonModelgetFloatToggle()Returns a toggle button model which can be used to control float status.abstract voidinit()Called to initialise this manager when the components are populated.
-
-
-
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 othersfixedPanel- component which is always inside containerfloatablePanel- 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 othersfixedPanel- component which is always inside containerfloatablePanel- component which may be inside container or may be floated out of it- Returns:
- new float manager
-
-