public class TabberControl extends Object implements Control
Constructor and Description |
---|
TabberControl(String label,
Icon icon)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
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.
|
ActionListener |
getActionForwarder()
Returns an object which will forward actions to listeners registered
with this panel.
|
Icon |
getControlIcon()
Returns an icon to represent this control, visible in the stack.
|
String |
getControlLabel()
Returns a short string to label this control, visible in the stack.
|
JComponent |
getPanel()
Returns the GUI component that is the business end of this control.
|
JTabbedPane |
getTabber()
Returns this control's panel as a JTabbedPane.
|
void |
removeActionListener(ActionListener listener)
Removes a listener which was previously added.
|
public String getControlLabel()
Control
getControlLabel
in interface Control
public Icon getControlIcon()
Control
getControlIcon
in interface Control
public JComponent getPanel()
Control
public JTabbedPane getTabber()
public void addControlTab(String name, JComponent comp, boolean stdPos)
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.
name
- label of tab to hold the componentcomp
- component to add in a tabstdPos
- whether to add in standard position or centeredpublic void addZoneTab(uk.ac.starlink.ttools.plot2.config.Specifier<ZoneId> zsel)
zsel
- zone id specifier, not nullpublic void addActionListener(ActionListener listener)
Control
addActionListener
in interface Control
listener
- listener to addpublic void removeActionListener(ActionListener listener)
Control
removeActionListener
in interface Control
listener
- to removepublic ActionListener getActionForwarder()
Copyright © 2003-2025 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.