public final class AlignmentAction extends SelectionAction
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ID_ALIGN_BOTTOM
Indicates that the bottom edges should be aligned.
|
static java.lang.String |
ID_ALIGN_CENTER
Indicates that the horizontal centers should be aligned.
|
static java.lang.String |
ID_ALIGN_LEFT
Indicates that the left edges should be aligned.
|
static java.lang.String |
ID_ALIGN_MIDDLE
Indicates that the vertical midpoints should be aligned.
|
static java.lang.String |
ID_ALIGN_RIGHT
Indicates that the right edges should be aligned.
|
static java.lang.String |
ID_ALIGN_TOP
Indicates that the top edges should be aligned.
|
AS_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 and Description |
|---|
AlignmentAction(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.
|
| Modifier and Type | Method and Description |
|---|---|
protected Rectangle |
calculateAlignmentRectangle(Request request)
Returns the alignment rectangle to which all selected parts should be
aligned.
|
protected boolean |
calculateEnabled()
Calculates and returns the enabled state of this action.
|
void |
dispose()
Disposes the action when it is no longer needed.
|
protected java.util.List |
getOperationSet(Request request)
Returns the list of editparts which will participate in alignment.
|
protected void |
initUI()
Initializes the actions UI presentation.
|
void |
run() |
getSelectedObjects, getSelection, handleSelectionChanged, setSelection, setSelectionProvider, updateexecute, getCommandStack, getWorkbenchPart, init, isEnabled, refresh, setLazyEnablementCalculation, setWorkbenchPartconvertAccelerator, 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, setToolTipTextaddPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListeneraddListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectpublic static final java.lang.String ID_ALIGN_BOTTOM
public static final java.lang.String ID_ALIGN_CENTER
public static final java.lang.String ID_ALIGN_LEFT
public static final java.lang.String ID_ALIGN_MIDDLE
public static final java.lang.String ID_ALIGN_RIGHT
public static final java.lang.String ID_ALIGN_TOP
public AlignmentAction(IEditorPart editor, int align)
editor - the editoralign - the alignment IDpublic AlignmentAction(IWorkbenchPart part, int align)
part - the workbench part used to obtain contextalign - the aligment ID.protected Rectangle calculateAlignmentRectangle(Request request)
request - the alignment Requestprotected boolean calculateEnabled()
WorkbenchPartActioncalculateEnabled in class WorkbenchPartActiontrue if the action is enabledWorkbenchPartAction.calculateEnabled()public void dispose()
WorkbenchPartActiondispose in interface Disposabledispose in class SelectionActionDisposable.dispose()protected java.util.List getOperationSet(Request request)
request - the alignment requestprotected void initUI()
public void run()
run in interface IActionrun in class ActionIAction.run()Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.