gov.nasa.gsfc.drl.rtstps.viewer.commands
Class ExitAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by gov.nasa.gsfc.drl.rtstps.library.XAction
          extended by gov.nasa.gsfc.drl.rtstps.viewer.commands.ExitAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

 class ExitAction
extends XAction

Handle the "exit" action.


Field Summary
private  javax.swing.JFrame frame
          The parent JFrame.
private static long serialVersionUID
           
 
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
 
Constructor Summary
ExitAction(javax.swing.JFrame frame)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          The action that is performed when the button is pressed or the menu item is selected.
 javax.swing.KeyStroke getKeyStroke()
          Get a hotkey combination that activates the action.
 char getMnemonic()
          Get the mnemonic character associated with the action label.
 java.lang.String getToolTip()
          Get the action's tooltip.
 
Methods inherited from class gov.nasa.gsfc.drl.rtstps.library.XAction
getText
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

frame

private javax.swing.JFrame frame
The parent JFrame. I use it for error dialogs.


serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

ExitAction

ExitAction(javax.swing.JFrame frame)
Method Detail

getMnemonic

public final char getMnemonic()
Description copied from class: XAction
Get the mnemonic character associated with the action label.

Specified by:
getMnemonic in class XAction
Returns:
the mnemonic character or null if there is none.

getKeyStroke

public final javax.swing.KeyStroke getKeyStroke()
Description copied from class: XAction
Get a hotkey combination that activates the action. Here's an example that links control-A to the action.
  public KeyStroke getKeyStroke()
  {
      return KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A,
               java.awt.event.InputEvent.CTRL_MASK);
  }
 

Specified by:
getKeyStroke in class XAction
Returns:
the associated keystroke combination

getToolTip

public final java.lang.String getToolTip()
Description copied from class: XAction
Get the action's tooltip.

Specified by:
getToolTip in class XAction
Returns:
a tooltip string or null if there is none.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: XAction
The action that is performed when the button is pressed or the menu item is selected.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Specified by:
actionPerformed in class XAction