csheets.ui.ctrl
Class SaveAction
java.lang.Object
javax.swing.AbstractAction
csheets.ui.ctrl.BaseAction
csheets.ui.ctrl.SaveAsAction
csheets.ui.ctrl.SaveAction
- All Implemented Interfaces:
- ActionListener, Serializable, Cloneable, EventListener, Action
- Direct Known Subclasses:
- CloseAction
public class SaveAction
- extends SaveAsAction
An action for saving a spreadsheet to the current working file.
- Author:
- Einar Pehrson
- See Also:
- Serialized Form
|
Method Summary |
void |
actionPerformed(ActionEvent e)
|
protected void |
defineProperties()
Defines the action's properties. |
protected String |
getName()
Returns the action's name. |
protected boolean |
requiresFile()
Returns whether the action requires the active workbook to be
stored in a file in order to be enabled. |
protected boolean |
requiresModification()
Returns whether the action requires the active workbook to be
modified in order to be enabled. |
SaveAction
public SaveAction(CleanSheets app,
UIController uiController,
FileChooser chooser)
- Creates a new save command
- Parameters:
app - the CleanSheets applicationuiController - the user interface controllerchooser - the file chooser to use when prompting the user for the file to save
getName
protected String getName()
- Description copied from class:
BaseAction
- Returns the action's name.
- Overrides:
getName in class SaveAsAction
- 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 SaveAsAction
actionPerformed
public void actionPerformed(ActionEvent e)
- Specified by:
actionPerformed in interface ActionListener- Overrides:
actionPerformed in class SaveAsAction
requiresModification
protected boolean requiresModification()
- Description copied from class:
BaseAction
- Returns whether the action requires the active workbook to be
modified in order to be enabled. By default, the method returns false.
- Overrides:
requiresModification in class BaseAction
- Returns:
- whether the action should be enabled
requiresFile
protected boolean requiresFile()
- Description copied from class:
BaseAction
- Returns whether the action requires the active workbook to be
stored in a file in order to be enabled. By default, the method
returns false.
- Overrides:
requiresFile in class SaveAsAction
- Returns:
- whether the action should be enabled