|
|||||||||
| 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.FileCloseAction
This subclass of Action is used to close an open file. A File needs to be assigned to an instance of this class before it can be performed. When performed, an instance of this class will do nothing else than notify all registeres FileCLoseListeners that the file should be closed.
| Field Summary | |
|---|---|
private java.io.File |
file
The file currently associated to this Action |
private java.util.ArrayList |
listeners
List of FileCloseListeners registered with 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 | |
|---|---|
FileCloseAction(java.lang.String text)
Constructs a new FileCloseAction |
|
FileCloseAction(java.lang.String text,
org.eclipse.jface.resource.ImageDescriptor image)
Constructs a new FileCloseAction |
|
FileCloseAction(java.lang.String text,
int style)
Constructs a new FileCloseAction |
|
| Method Summary | |
|---|---|
void |
addFileCloseListener(FileCloseListener listener)
Register a listener with this Action that will be notified when the Action is performed. |
java.io.File |
getFile()
Get the file currently assigned to this Action, that is the file that should be closed |
void |
removeFileCloseListener(FileCloseListener listener)
Remove a registered listener from this Action |
void |
run()
Perform this Action. |
void |
setFile(java.io.File f)
Assign a file to this Action. |
| 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
private java.util.ArrayList listeners
| Constructor Detail |
|---|
public FileCloseAction(java.lang.String text)
text - The name of the Action
public FileCloseAction(java.lang.String text,
org.eclipse.jface.resource.ImageDescriptor image)
text - The name of the Actionimage - The image assigned to this Action
public FileCloseAction(java.lang.String text,
int style)
text - The name of the Actionstyle - The style constant used by this Action| Method Detail |
|---|
public void addFileCloseListener(FileCloseListener listener)
listener - The FileCloseListener to addpublic java.io.File getFile()
public void removeFileCloseListener(FileCloseListener listener)
listener - The FileCloseListener to removepublic 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 closed or null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||