|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.jface.action.Action
com.groovemanager.actions.file.FileSaveAction
This subclass of Action is used to save a file without user interaction. Before being performed, a File has to be assigned to this Action. When performed, an instance of this class will notify all registeres FileSaveListeners that the file should be saved.
| Field Summary | |
|---|---|
private java.io.File |
file
The file currently assigned to this Action |
protected java.util.ArrayList |
listeners
List of FileSaveListeners registeres to this Action |
| Fields inherited from interface org.eclipse.jface.action.IAction |
|---|
AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, IMAGE, TEXT, TOOL_TIP_TEXT |
| Constructor Summary | |
|---|---|
FileSaveAction(java.lang.String name)
Constructs a new FIleSaveAction with the given name |
|
| Method Summary | |
|---|---|
void |
addFileSaveListener(FileSaveListener l)
Register a FileSaveListener with this Action |
java.io.File |
getFile()
Get the file currently assigned to this Action |
void |
removeFileSaveListener(FileSaveListener l)
Remove a registered FileSaveListener to this Action |
void |
run()
Perform this Action. |
void |
setFile(java.io.File f)
Set the file that should be saved. |
| Methods inherited from class org.eclipse.jface.action.Action |
|---|
addPropertyChangeListener, convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, firePropertyChange, firePropertyChange, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, removeAcceleratorText, removePropertyChangeListener, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.io.File file
protected java.util.ArrayList listeners
| Constructor Detail |
|---|
public FileSaveAction(java.lang.String name)
name - This Action´s name| Method Detail |
|---|
public void addFileSaveListener(FileSaveListener l)
l - The FileSaveListener to registerpublic java.io.File getFile()
public void removeFileSaveListener(FileSaveListener l)
l - The FileSaveListener to be removedpublic void run()
run in interface org.eclipse.jface.action.IActionrun in class org.eclipse.jface.action.ActionIAction.run()public void setFile(java.io.File f)
null,
the action will be disabled. Otherwise it will be enabled.
f - The file to be saved or null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||