Package uk.ac.starlink.topcat

## Class WindowToggle

- java.lang.Object
- - javax.swing.DefaultButtonModel
  - - javax.swing.JToggleButton.ToggleButtonModel
    - - uk.ac.starlink.topcat.ToggleButtonModel
      - - uk.ac.starlink.topcat.WindowToggle

- All Implemented Interfaces:
    `java.awt.ItemSelectable`, `java.io.Serializable`, `javax.swing.ButtonModel`

      public abstract class WindowToggle
      extends ToggleButtonModel

  ToggleButtonModel subclass that will lazily create and show/hide a window.
  Since:
    20 Jul 2017
  Author:
    Mark Taylor
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class javax.swing.DefaultButtonModel

      `actionCommand, ARMED, changeEvent, ENABLED, group, listenerList, mnemonic, PRESSED, ROLLOVER, SELECTED, stateMask`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `WindowToggle​(java.lang.String name, javax.swing.Icon icon, java.lang.String descrip)` | Constructor.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected abstract java.awt.Window` | `createWindow()` | This method is called to create the window to be shown when it is first required.

    - ### Methods inherited from class uk.ac.starlink.topcat.ToggleButtonModel

      `createButton, createCheckBox, createMenuItem, createRadioButtons, createToolbarButton, fireActionPerformed, getDescription, getIcon, getText, isSelected, setDescription, setIcon, setSelected, setText`

    - ### Methods inherited from class javax.swing.JToggleButton.ToggleButtonModel

      `setPressed`

    - ### Methods inherited from class javax.swing.DefaultButtonModel

      `addActionListener, addChangeListener, addItemListener, fireItemStateChanged, fireStateChanged, getActionCommand, getActionListeners, getChangeListeners, getGroup, getItemListeners, getListeners, getMnemonic, getSelectedObjects, isArmed, isEnabled, isPressed, isRollover, removeActionListener, removeChangeListener, removeItemListener, setActionCommand, setArmed, setEnabled, setGroup, setMnemonic, setRollover`

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

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

- - ### Constructor Detail

    - #### WindowToggle

          public WindowToggle​(java.lang.String name,
                              javax.swing.Icon icon,
                              java.lang.String descrip)

      Constructor.
      Parameters:
        `name` - toggle button name
        `icon` - toggle button icon
        `descrip` - toggle button description

  - ### Method Detail

    - #### createWindow

          protected abstract java.awt.Window createWindow()

      This method is called to create the window to be shown when it is first required.
      Returns:
        window to display when toggle button is selected