Package uk.ac.starlink.topcat.plot2
Class TabberControl
java.lang.Object
uk.ac.starlink.topcat.plot2.TabberControl
- All Implemented Interfaces:
Control
- Direct Known Subclasses:
ConfigControl,FormLayerControl,LegendControl,StiltsControl
Control implementation that has a tabber as its panel.
- Since:
- 13 Mar 2013
- Author:
- Mark Taylor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddActionListener(ActionListener listener) Adds a listener to be notified whenever the state of this control changes, presumably as a result of user interaction.voidaddControlTab(String name, JComponent comp, boolean stdPos) Adds a tab to this control's tab pane.voidaddZoneTab(uk.ac.starlink.ttools.plot2.config.Specifier<ZoneId> zsel) Adds a zone selection tab to this control.Returns an object which will forward actions to listeners registered with this panel.Returns an icon to represent this control, visible in the stack.Returns a short string to label this control, visible in the stack.getPanel()Returns the GUI component that is the business end of this control.Returns this control's panel as a JTabbedPane.voidremoveActionListener(ActionListener listener) Removes a listener which was previously added.
-
Constructor Details
-
TabberControl
Constructor.- Parameters:
label- control labelicon- control icon
-
-
Method Details
-
getControlLabel
Description copied from interface:ControlReturns a short string to label this control, visible in the stack.- Specified by:
getControlLabelin interfaceControl- Returns:
- label
-
getControlIcon
Description copied from interface:ControlReturns an icon to represent this control, visible in the stack.- Specified by:
getControlIconin interfaceControl- Returns:
- icon
-
getPanel
Description copied from interface:ControlReturns the GUI component that is the business end of this control. It will typically contain components for user interaction. -
getTabber
Returns this control's panel as a JTabbedPane.- Returns:
- panel
-
addControlTab
Adds a tab to this control's tab pane.The
stdPosparameter controls component positioning within the tab. If it is true, then the component is added in the usual way, positioned at the top and enclosed in a scroll pane. If false, then the component is added in the centre of the panel, and any additional positioning is up to the caller.- Parameters:
name- label of tab to hold the componentcomp- component to add in a tabstdPos- whether to add in standard position or centered
-
addZoneTab
Adds a zone selection tab to this control.- Parameters:
zsel- zone id specifier, not null
-
addActionListener
Description copied from interface:ControlAdds a listener to be notified whenever the state of this control changes, presumably as a result of user interaction.- Specified by:
addActionListenerin interfaceControl- Parameters:
listener- listener to add
-
removeActionListener
Description copied from interface:ControlRemoves a listener which was previously added.- Specified by:
removeActionListenerin interfaceControl- Parameters:
listener- to remove
-
getActionForwarder
Returns an object which will forward actions to listeners registered with this panel.- Returns:
- action forwarder
-