uk.ac.starlink.topcat.plot2
Class TabberControl

java.lang.Object
  extended by uk.ac.starlink.topcat.plot2.TabberControl
All Implemented Interfaces:
Control
Direct Known Subclasses:
ConfigControl, FormLayerControl, LegendControl, StiltsControl

public class TabberControl
extends Object
implements Control

Control implementation that has a tabber as its panel.

Since:
13 Mar 2013
Author:
Mark Taylor

Constructor Summary
TabberControl(String label, Icon icon)
          Constructor.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TabberControl

public TabberControl(String label,
                     Icon icon)
Constructor.

Parameters:
label - control label
icon - control icon
Method Detail

getControlLabel

public String getControlLabel()
Description copied from interface: Control
Returns a short string to label this control, visible in the stack.

Specified by:
getControlLabel in interface Control
Returns:
label

getControlIcon

public Icon getControlIcon()
Description copied from interface: Control
Returns an icon to represent this control, visible in the stack.

Specified by:
getControlIcon in interface Control
Returns:
icon

getPanel

public JComponent 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.

Specified by:
getPanel in interface Control
Returns:
this controls graphical component

getTabber

public JTabbedPane getTabber()
Returns this control's panel as a JTabbedPane.

Returns:
panel

addControlTab

public void addControlTab(String name,
                          JComponent comp,
                          boolean stdPos)
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 component
comp - component to add in a tab
stdPos - 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(ActionListener listener)
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 interface Control
Parameters:
listener - listener to add

removeActionListener

public void removeActionListener(ActionListener listener)
Description copied from interface: Control
Removes a listener which was previously added.

Specified by:
removeActionListener in interface Control
Parameters:
listener - to remove

getActionForwarder

public ActionListener getActionForwarder()
Returns an object which will forward actions to listeners registered with this panel.

Returns:
action forwarder


Copyright © 2003-2018 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.