GEF v2.0

org.eclipse.gef.ui.actions
Class AlignmentAction

java.lang.Object
  |
  +--org.eclipse.jface.action.Action
        |
        +--org.eclipse.gef.ui.actions.EditorPartAction
              |
              +--org.eclipse.gef.ui.actions.SelectionAction
                    |
                    +--org.eclipse.gef.ui.actions.AlignmentAction
All Implemented Interfaces:
Disposable, IAction, ISelectionListener

public final class AlignmentAction
extends SelectionAction


Field Summary
static String ID_ALIGN_BOTTOM
           
static String ID_ALIGN_CENTER
           
static String ID_ALIGN_LEFT
           
static String ID_ALIGN_MIDDLE
           
static String ID_ALIGN_RIGHT
           
static String ID_ALIGN_TOP
           
 
Fields inherited from class org.eclipse.gef.ui.actions.EditorPartAction
DYNAMIC, style
 
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
AlignmentAction(IEditorPart editor, int align)
           
AlignmentAction(IEditorPart editor, int style, int align)
           
 
Method Summary
protected  Rectangle calculateAlignmentRectangle(Request request)
           
protected  boolean calculateEnabled()
          Calculates and returns the enabled state of this action.
 void dispose()
          Called when the action is about to be disposed.
 ImageDescriptor getHoverImageDescriptor()
           
protected  List getOperationSet(Request request)
           
protected  void init()
          Initializes this action.
 void run()
           
 
Methods inherited from class org.eclipse.gef.ui.actions.SelectionAction
getSelectedObjects, getSelection, handleSelectionChanged, hookEditorPart, selectionChanged, setSelection, unhookEditorPart
 
Methods inherited from class org.eclipse.gef.ui.actions.EditorPartAction
checkStyle, execute, getCommandStack, getEditorPart, isDynamic, isEnabled, refresh, setEditorPart
 
Methods inherited from class org.eclipse.jface.action.Action
addPropertyChangeListener, convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, firePropertyChange, firePropertyChange, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, 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

ID_ALIGN_LEFT

public static String ID_ALIGN_LEFT

ID_ALIGN_RIGHT

public static String ID_ALIGN_RIGHT

ID_ALIGN_TOP

public static String ID_ALIGN_TOP

ID_ALIGN_BOTTOM

public static String ID_ALIGN_BOTTOM

ID_ALIGN_CENTER

public static String ID_ALIGN_CENTER

ID_ALIGN_MIDDLE

public static String ID_ALIGN_MIDDLE
Constructor Detail

AlignmentAction

public AlignmentAction(IEditorPart editor,
                       int style,
                       int align)

AlignmentAction

public AlignmentAction(IEditorPart editor,
                       int align)
Method Detail

calculateEnabled

protected boolean calculateEnabled()
Description copied from class: EditorPartAction
Calculates and returns the enabled state of this action. Subclasses that don't use the default EditorPartAction.DYNAMIC style should override this method.
Overrides:
calculateEnabled in class EditorPartAction

calculateAlignmentRectangle

protected Rectangle calculateAlignmentRectangle(Request request)

dispose

public void dispose()
Description copied from class: EditorPartAction
Called when the action is about to be disposed. Subclasses should override EditorPartAction.unhookEditorPart() instead of this method to perform any final clean-up.
Overrides:
dispose in class SelectionAction

getHoverImageDescriptor

public ImageDescriptor getHoverImageDescriptor()
Overrides:
getHoverImageDescriptor in class Action

getOperationSet

protected List getOperationSet(Request request)

init

protected void init()
Description copied from class: EditorPartAction
Initializes this action.
Overrides:
init in class EditorPartAction

run

public void run()
Overrides:
run in class Action

GEF v2.0