Class EscapeAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.esa.snap.ui.tooladapter.actions.EscapeAction
-
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,EventListener
,Action
public class EscapeAction extends AbstractAction
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:
- Serialized Form
-
-
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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(ActionEvent e)
Implement the Escape Action.static void
register(JDialog dialog)
Registers an EscapeAction on the specified JDialogstatic void
register(JRootPane rootPane)
Registers an EscapeAction on the specified JRootPane-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Method Detail
-
register
public static void register(JDialog dialog)
Registers an EscapeAction on the specified JDialog- Parameters:
dialog
- the JDialog the EscapeAction is registered with
-
register
public static void register(JRootPane rootPane)
Registers an EscapeAction on the specified JRootPane- Parameters:
rootPane
- the JRootPane the EscapeAction is registered with
-
actionPerformed
public void actionPerformed(ActionEvent e)
Implement the Escape Action. First attempt to hide a popup menu. If no popups are found then dispose the window.
-
-