|
|||||||||
| 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.FileOpenAction
This subclass of Action is used to open a file. Before being performed, a Shell has to be assigned to this Action. When performed, an instance of this class will open a FileDialog where the user can select the file(s) to be opened. After closing the dialog, it will notify all registeres FileOpenListeners that the file(s) should be opened.
| Field Summary | |
|---|---|
private java.util.ArrayList |
listeners
List of FileOpenListeners registered to this Action |
private boolean |
multiple
Should the user be able to open multiple files at once? |
private java.lang.String |
path
The path into which the FileDialog should point when opened |
private org.eclipse.swt.widgets.Shell |
shell
The Shell that will be used as parent Shell of the FileDialog |
| 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 | |
|---|---|
FileOpenAction(java.lang.String name)
Constructs a new FileOpenAction with the given name which lets the user select only one file at a time. |
|
FileOpenAction(java.lang.String name,
boolean multi)
Constructs a new FileOpenAction with the given name |
|
| Method Summary | |
|---|---|
void |
addFileOpenListener(FileOpenListener l)
Register a FileOpenListener with this Action |
void |
removeFileOpenListener(FileOpenListener l)
Remove a registered FileOpenListener from this Action |
void |
run()
Perform this Action. |
void |
setFilterPath(java.lang.String path)
Set the filter path of the FileDialog |
void |
setShell(org.eclipse.swt.widgets.Shell s)
Set the parent Shell of the FileDialog |
| 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.util.ArrayList listeners
private boolean multiple
private java.lang.String path
private org.eclipse.swt.widgets.Shell shell
| Constructor Detail |
|---|
public FileOpenAction(java.lang.String name)
name - This Action´s name
public FileOpenAction(java.lang.String name,
boolean multi)
name - This Action´s namemulti - true if the user should be able to select multiple
files at once in the FileDialog, false otherwise| Method Detail |
|---|
public void addFileOpenListener(FileOpenListener l)
l - The FileOpenListener to registerpublic void removeFileOpenListener(FileOpenListener l)
l - The FileOpenListener to removepublic void run()
run in interface org.eclipse.jface.action.IActionrun in class org.eclipse.jface.action.ActionIAction.run()public void setFilterPath(java.lang.String path)
path - The path to which the FileDialog should point when opened.
May be null. In this case, a default path will be used.public void setShell(org.eclipse.swt.widgets.Shell s)
s - The Shell which will be used as parent Shell for the FileDialog
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||