Class WindowAction
java.lang.Object
javax.swing.AbstractAction
uk.ac.starlink.topcat.BasicAction
uk.ac.starlink.topcat.WindowAction
- All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action
An
Action which controls display of a window.
ActionEvents passed to this action may
have the action command set to one of the strings
HIDE or SHOW to define what the command means
(in fact anything other than HIDE counts as SHOW).
It has a bound property with key VISIBLE which indicates
whether the associated window is currently showing or not.
Setting the VISIBLE property true/false has the same effect as
invoking the action with the SHOW/HIDE
command string.
This class is currently a bit messy and overspecified for what it does.
- Since:
- 2 Mar 2004
- Author:
- Mark Taylor (Starlink)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAction command text for the action which hides the window associated with this action.static final StringAction command text for the action which reveals the window associated with this action.static final StringName of the bound property which indicates whether the window associated with this action is currently visible in the GUI.Fields inherited from class AbstractAction
changeSupport, enabledFields inherited from interface Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWindowAction(String name, Icon icon, String shortdesc) Constructs a new WindowAction. -
Method Summary
Modifier and TypeMethodDescriptionvoidReturns a toggle button which toggles visibility of the window associated with this action.abstract WindowReturns the window associated with this action, creating it if necessary.abstract booleanIndicates whether the window associated with this window is currently in existence.voidMethods inherited from class BasicAction
create, getEventWindowMethods inherited from class AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, isEnabled, removePropertyChangeListener, setEnabled
-
Field Details
-
HIDE
Action command text for the action which hides the window associated with this action.- See Also:
-
SHOW
Action command text for the action which reveals the window associated with this action.- See Also:
-
VISIBLE
Name of the bound property which indicates whether the window associated with this action is currently visible in the GUI.- See Also:
-
-
Constructor Details
-
WindowAction
-
-
Method Details
-
actionPerformed
-
getValue
-
putValue
-
getWindow
-
hasWindow
public abstract boolean hasWindow()Indicates whether the window associated with this window is currently in existence.- Returns:
- true iff the window exists
-
getButton
Returns a toggle button which toggles visibility of the window associated with this action.** Mostly working but not used at the moment **
- Returns:
- new button
-