Class EscapeAction
java.lang.Object
javax.swing.AbstractAction
org.esa.snap.ui.tooladapter.actions.EscapeAction
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,EventListener
,Action
Convenience Action to dispose of a Swing Window by using the Escape key.
Before disposing of the window the Action will first attempt to hide
any popups. In this case the user will need to invoke the Escape key a
second time before the Window is disposed.
- See Also:
-
Field Summary
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Implement the Escape Action.static void
Registers an EscapeAction on the specified JDialogstatic void
Registers an EscapeAction on the specified JRootPaneMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Method Details
-
register
Registers an EscapeAction on the specified JDialog- Parameters:
dialog
- the JDialog the EscapeAction is registered with
-
register
Registers an EscapeAction on the specified JRootPane- Parameters:
rootPane
- the JRootPane the EscapeAction is registered with
-
actionPerformed
Implement the Escape Action. First attempt to hide a popup menu. If no popups are found then dispose the window.
-