Package org.eclipse.gef.ui.actions
Class AlignmentAction
- All Implemented Interfaces:
- Disposable,- UpdateAction,- IAction
An action to align the selected parts.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringIndicates that the bottom edges should be aligned.static final StringIndicates that the horizontal centers should be aligned.static final StringIndicates that the left edges should be aligned.static final StringIndicates that the vertical midpoints should be aligned.static final StringIndicates that the right edges should be aligned.static final StringIndicates that the top edges should be aligned.Fields inherited from interface org.eclipse.jface.action.IActionAS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, HANDLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT
- 
Constructor SummaryConstructorsConstructorDescriptionAlignmentAction(IEditorPart editor, int align) Deprecated.use AlignmentAction(IWorkbenchPart, int align)AlignmentAction(IWorkbenchPart part, int align) Constructs an AlignmentAction with the given part and alignment ID.
- 
Method SummaryModifier and TypeMethodDescriptionprotected RectanglecalculateAlignmentRectangle(Request request) Returns the alignment rectangle to which all selected parts should be aligned.protected booleanCalculates and returns the enabled state of this action.voiddispose()Disposes the action when it is no longer needed.getOperationSet(Request request) Returns the list of editparts which will participate in alignment.protected voidinitUI()Initializes the actions UI presentation.voidrun()Methods inherited from class org.eclipse.gef.ui.actions.SelectionActiongetSelectedEditParts, getSelectedObjects, getSelection, handleSelectionChanged, setSelection, setSelectionProvider, updateMethods inherited from class org.eclipse.gef.ui.actions.WorkbenchPartActionexecute, getCommandStack, getWorkbenchPart, init, isEnabled, refresh, setLazyEnablementCalculation, setWorkbenchPartMethods inherited from class org.eclipse.jface.action.ActionconvertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipTextMethods inherited from class org.eclipse.jface.action.AbstractActionaddPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListenerMethods inherited from class org.eclipse.core.commands.common.EventManageraddListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
- 
Field Details- 
ID_ALIGN_BOTTOMIndicates that the bottom edges should be aligned.- See Also:
 
- 
ID_ALIGN_CENTERIndicates that the horizontal centers should be aligned.- See Also:
 
- 
ID_ALIGN_LEFTIndicates that the left edges should be aligned.- See Also:
 
- 
ID_ALIGN_MIDDLEIndicates that the vertical midpoints should be aligned.- See Also:
 
- 
ID_ALIGN_RIGHTIndicates that the right edges should be aligned.- See Also:
 
- 
ID_ALIGN_TOPIndicates that the top edges should be aligned.- See Also:
 
 
- 
- 
Constructor Details- 
AlignmentActionDeprecated.use AlignmentAction(IWorkbenchPart, int align)- Parameters:
- editor- the editor
- align- the alignment ID
 
- 
AlignmentActionConstructs an AlignmentAction with the given part and alignment ID. The alignment ID must by one of:- GEFActionConstants.ALIGN_LEFT
- GEFActionConstants.ALIGN_RIGHT
- GEFActionConstants.ALIGN_CENTER
- GEFActionConstants.ALIGN_TOP
- GEFActionConstants.ALIGN_BOTTOM
- GEFActionConstants.ALIGN_MIDDLE
 - Parameters:
- part- the workbench part used to obtain context
- align- the aligment ID.
 
 
- 
- 
Method Details- 
calculateAlignmentRectangleReturns the alignment rectangle to which all selected parts should be aligned.- Parameters:
- request- the alignment Request
- Returns:
- the alignment rectangle
 
- 
calculateEnabledprotected boolean calculateEnabled()Description copied from class:WorkbenchPartActionCalculates and returns the enabled state of this action.- Specified by:
- calculateEnabledin class- WorkbenchPartAction
- Returns:
- trueif the action is enabled
- See Also:
 
- 
disposepublic void dispose()Description copied from class:WorkbenchPartActionDisposes the action when it is no longer needed.- Specified by:
- disposein interface- Disposable
- Overrides:
- disposein class- SelectionAction
- See Also:
 
- 
getOperationSetReturns the list of editparts which will participate in alignment.- Parameters:
- request- the alignment request
- Returns:
- the list of parts which will be aligned
 
- 
initUIprotected void initUI()Initializes the actions UI presentation.
- 
runpublic void run()
 
-