public class SaveAsAction extends BaseAction
Modifier and Type | Field and Description |
---|---|
protected CleanSheets |
app
The CleanSheets application
|
protected FileChooser |
chooser
The file chooser to use when prompting the user for the file to save
|
protected UIController |
uiController
The user interface controller
|
changeSupport, enabled
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 and Description |
---|
SaveAsAction(CleanSheets app,
UIController uiController,
FileChooser chooser)
Creates a new save as action.
|
Modifier and Type | Method and Description |
---|---|
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.
|
void |
setEnabled(boolean enabled) |
requiresModification, showErrorDialog
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener
protected CleanSheets app
protected UIController uiController
protected FileChooser chooser
public SaveAsAction(CleanSheets app, UIController uiController, FileChooser chooser)
app
- the CleanSheets applicationuiController
- the user interface controllerchooser
- the file chooser to use when prompting the user for the file to saveprotected String getName()
BaseAction
getName
in class BaseAction
protected void defineProperties()
BaseAction
defineProperties
in class BaseAction
public void actionPerformed(ActionEvent e)
public void setEnabled(boolean enabled)
setEnabled
in interface Action
setEnabled
in class AbstractAction
protected boolean requiresFile()
BaseAction
requiresFile
in class BaseAction