csheets.ui.ctrl
Class ExitAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by csheets.ui.ctrl.BaseAction
          extended by csheets.ui.ctrl.SaveAsAction
              extended by csheets.ui.ctrl.SaveAction
                  extended by csheets.ui.ctrl.CloseAction
                      extended by csheets.ui.ctrl.CloseAllAction
                          extended by csheets.ui.ctrl.ExitAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action

public class ExitAction
extends CloseAllAction

An action for terminating the application.

Author:
Einar Pehrson
See Also:
Serialized Form

Field Summary
 
Fields inherited from class csheets.ui.ctrl.SaveAsAction
app, chooser, uiController
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
ExitAction(CleanSheets app, UIController uiController, FileChooser chooser)
          Creates a new exit action.
 
Method Summary
 void actionPerformed(ActionEvent e)
           
protected  void defineProperties()
          Defines the action's properties.
protected  String getName()
          Returns the action's name.
 
Methods inherited from class csheets.ui.ctrl.CloseAction
requiresModification
 
Methods inherited from class csheets.ui.ctrl.SaveAction
requiresFile
 
Methods inherited from class csheets.ui.ctrl.SaveAsAction
setEnabled
 
Methods inherited from class csheets.ui.ctrl.BaseAction
showErrorDialog
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExitAction

public ExitAction(CleanSheets app,
                  UIController uiController,
                  FileChooser chooser)
Creates a new exit action.

Parameters:
app - the CleanSheets application
uiController - the user interface controller
chooser - the file chooser to use when prompting the user for the file to save
Method Detail

getName

protected String getName()
Description copied from class: BaseAction
Returns the action's name.

Overrides:
getName in class CloseAllAction
Returns:
the action's name, which is used as short description and action command

defineProperties

protected void defineProperties()
Description copied from class: BaseAction
Defines the action's properties.

Overrides:
defineProperties in class CloseAllAction

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener
Overrides:
actionPerformed in class CloseAllAction