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 TypeMethodDescriptionvoid
addActionListener
(ActionListener listener) Adds a listener to be notified whenever the state of this control changes, presumably as a result of user interaction.void
addControlTab
(String name, JComponent comp, boolean stdPos) Adds a tab to this control's tab pane.void
addZoneTab
(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.void
removeActionListener
(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:Control
Returns a short string to label this control, visible in the stack.- Specified by:
getControlLabel
in interfaceControl
- Returns:
- label
-
getControlIcon
Description copied from interface:Control
Returns an icon to represent this control, visible in the stack.- Specified by:
getControlIcon
in interfaceControl
- Returns:
- icon
-
getPanel
Description copied from interface:Control
Returns 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
stdPos
parameter 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:Control
Adds a listener to be notified whenever the state of this control changes, presumably as a result of user interaction.- Specified by:
addActionListener
in interfaceControl
- Parameters:
listener
- listener to add
-
removeActionListener
Description copied from interface:Control
Removes a listener which was previously added.- Specified by:
removeActionListener
in interfaceControl
- Parameters:
listener
- to remove
-
getActionForwarder
Returns an object which will forward actions to listeners registered with this panel.- Returns:
- action forwarder
-