uk.ac.starlink.topcat
Class WindowToggle

java.lang.Object
  extended by javax.swing.DefaultButtonModel
      extended by javax.swing.JToggleButton.ToggleButtonModel
          extended by uk.ac.starlink.topcat.ToggleButtonModel
              extended by uk.ac.starlink.topcat.WindowToggle
All Implemented Interfaces:
ItemSelectable, Serializable, 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
WindowToggle(String name, Icon icon, String descrip)
          Constructor.
 
Method Summary
protected abstract  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(String name,
                    Icon icon,
                    String descrip)
Constructor.

Parameters:
name - toggle button name
icon - toggle button icon
descrip - toggle button description
Method Detail

createWindow

protected abstract 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


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