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
public class TabberControl extends java.lang.Object implements Control
Control implementation that has a tabber as its panel.- Since:
- 13 Mar 2013
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description TabberControl(java.lang.String label, javax.swing.Icon icon)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddActionListener(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.voidaddControlTab(java.lang.String name, javax.swing.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.java.awt.event.ActionListenergetActionForwarder()Returns an object which will forward actions to listeners registered with this panel.javax.swing.IcongetControlIcon()Returns an icon to represent this control, visible in the stack.java.lang.StringgetControlLabel()Returns a short string to label this control, visible in the stack.javax.swing.JComponentgetPanel()Returns the GUI component that is the business end of this control.javax.swing.JTabbedPanegetTabber()Returns this control's panel as a JTabbedPane.voidremoveActionListener(java.awt.event.ActionListener listener)Removes a listener which was previously added.
-
-
-
Method Detail
-
getControlLabel
public java.lang.String getControlLabel()
Description copied from interface:ControlReturns a short string to label this control, visible in the stack.- Specified by:
getControlLabelin interfaceControl- Returns:
- label
-
getControlIcon
public javax.swing.Icon getControlIcon()
Description copied from interface:ControlReturns an icon to represent this control, visible in the stack.- Specified by:
getControlIconin interfaceControl- Returns:
- icon
-
getPanel
public javax.swing.JComponent 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
public javax.swing.JTabbedPane getTabber()
Returns this control's panel as a JTabbedPane.- Returns:
- panel
-
addControlTab
public void addControlTab(java.lang.String name, javax.swing.JComponent comp, boolean stdPos)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
public void addZoneTab(uk.ac.starlink.ttools.plot2.config.Specifier<ZoneId> zsel)
Adds a zone selection tab to this control.- Parameters:
zsel- zone id specifier, not null
-
addActionListener
public void addActionListener(java.awt.event.ActionListener listener)
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
public void removeActionListener(java.awt.event.ActionListener listener)
Description copied from interface:ControlRemoves a listener which was previously added.- Specified by:
removeActionListenerin interfaceControl- Parameters:
listener- to remove
-
getActionForwarder
public java.awt.event.ActionListener getActionForwarder()
Returns an object which will forward actions to listeners registered with this panel.- Returns:
- action forwarder
-
-