|
GEF v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.eclipse.jface.action.Action
|
+--org.eclipse.gef.ui.actions.EditorPartAction
Base class for actions used by GEF editors.
| Field Summary | |
static int |
DYNAMIC
The default style. |
protected int |
style
A style bitmask. |
| Fields inherited from interface org.eclipse.jface.action.IAction |
AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, CHECKED, DESCRIPTION, ENABLED, IMAGE, TEXT, TOOL_TIP_TEXT |
| Constructor Summary | |
EditorPartAction(IEditorPart editor)
Creates a new EditorPartAction and sets the editor. |
|
EditorPartAction(IEditorPart editor,
int style)
Creates a new EditorPartAction and sets the editor and style. |
|
| Method Summary | |
protected boolean |
calculateEnabled()
Calculates and returns the enabled state of this action. |
protected int |
checkStyle(int style)
Checks the given style to ensure it is not invalid. |
void |
dispose()
Called when the action is about to be disposed. |
protected void |
execute(Command command)
Executes the given Command. |
protected CommandStack |
getCommandStack()
Returns the editor's command stack. |
protected IEditorPart |
getEditorPart()
Returns the editor associated with this action. |
protected void |
hookEditorPart()
Adds any needed listeners. |
protected void |
init()
Initializes this action. |
protected boolean |
isDynamic()
|
boolean |
isEnabled()
If this action uses the default DYNAMIC style,
Action.isEnabled() is called. |
protected void |
refresh()
Refreshes the properties of this action. |
protected void |
setEditorPart(IEditorPart part)
Sets the editor. |
protected void |
unhookEditorPart()
Remove any needed listeners. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int DYNAMIC
Action.isEnabled() to
determine an action's enabled state. If an action is not
dynamic, calculateEnabled() is used.protected final int style
| Constructor Detail |
public EditorPartAction(IEditorPart editor,
int style)
public EditorPartAction(IEditorPart editor)
DYNAMIC.editor - The editor to be associated with this action.| Method Detail |
protected boolean calculateEnabled()
DYNAMIC style
should override this method.protected int checkStyle(int style)
public void dispose()
unhookEditorPart() instead of this
method to perform any final clean-up.dispose in interface Disposableprotected void execute(Command command)
Command.protected CommandStack getCommandStack()
protected IEditorPart getEditorPart()
protected void hookEditorPart()
protected void init()
protected boolean isDynamic()
public boolean isEnabled()
DYNAMIC style,
Action.isEnabled() is called. Otherwise,
calculateEnabled() is used to determine the
enabled state of this action.isEnabled in class Actionprotected void refresh()
protected void setEditorPart(IEditorPart part)
protected void unhookEditorPart()
|
GEF v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||