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
    --- | --- | ---
    `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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TabberControl

          public TabberControl​(java.lang.String label,
                               javax.swing.Icon icon)

      Constructor.
      Parameters:
        `label` - control label
        `icon` - control icon

  - ### Method Detail

    - #### getControlLabel

          public java.lang.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 javax.swing.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 javax.swing.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 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 `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​(java.awt.event.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​(java.awt.event.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 java.awt.event.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.