public class TabberControl extends java.lang.Object implements Control
Constructor and Description |
---|
TabberControl(java.lang.String label,
javax.swing.Icon icon)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addActionListener(java.awt.event.ActionListener listener)
Adds a listener to be notified whenever the state of this control
changes, presumably as a result of user interaction.
|
void |
addControlTab(java.lang.String name,
javax.swing.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.
|
java.awt.event.ActionListener |
getActionForwarder()
Returns an object which will forward actions to listeners registered
with this panel.
|
javax.swing.Icon |
getControlIcon()
Returns an icon to represent this control, visible in the stack.
|
java.lang.String |
getControlLabel()
Returns a short string to label this control, visible in the stack.
|
javax.swing.JComponent |
getPanel()
Returns the GUI component that is the business end of this control.
|
javax.swing.JTabbedPane |
getTabber()
Returns this control's panel as a JTabbedPane.
|
void |
removeActionListener(java.awt.event.ActionListener listener)
Removes a listener which was previously added.
|
public TabberControl(java.lang.String label, javax.swing.Icon icon)
label
- control labelicon
- control iconpublic java.lang.String getControlLabel()
Control
getControlLabel
in interface Control
public javax.swing.Icon getControlIcon()
Control
getControlIcon
in interface Control
public javax.swing.JComponent getPanel()
Control
public javax.swing.JTabbedPane getTabber()
public void addControlTab(java.lang.String name, javax.swing.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(java.awt.event.ActionListener listener)
Control
addActionListener
in interface Control
listener
- listener to addpublic void removeActionListener(java.awt.event.ActionListener listener)
Control
removeActionListener
in interface Control
listener
- to removepublic java.awt.event.ActionListener getActionForwarder()
Copyright © 2003-2017 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.