Class WindowToggle

  extended by javax.swing.DefaultButtonModel
      extended by javax.swing.JToggleButton.ToggleButtonModel
          extended by
              extended by
All Implemented Interfaces:
ItemSelectable, Serializable, ButtonModel

public abstract class WindowToggle
extends ToggleButtonModel

ToggleButtonModel subclass that will lazily create and show/hide a window.

20 Jul 2017
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)
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
createButton, createCheckBox, createMenuItem, createRadioButtons, createToolbarButton, fireActionPerformed, getDescription, getIcon, getText, isSelected, setDescription, setIcon, setSelected, setText
Methods inherited from class javax.swing.JToggleButton.ToggleButtonModel
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


public WindowToggle(String name,
                    Icon icon,
                    String descrip)

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


protected abstract Window createWindow()
This method is called to create the window to be shown when it is first required.

window to display when toggle button is selected

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