Class AlignmentAction

    • Field Detail

      • ID_ALIGN_BOTTOM

        public static final java.lang.String ID_ALIGN_BOTTOM
        Indicates that the bottom edges should be aligned.
        See Also:
        Constant Field Values
      • ID_ALIGN_CENTER

        public static final java.lang.String ID_ALIGN_CENTER
        Indicates that the horizontal centers should be aligned.
        See Also:
        Constant Field Values
      • ID_ALIGN_LEFT

        public static final java.lang.String ID_ALIGN_LEFT
        Indicates that the left edges should be aligned.
        See Also:
        Constant Field Values
      • ID_ALIGN_MIDDLE

        public static final java.lang.String ID_ALIGN_MIDDLE
        Indicates that the vertical midpoints should be aligned.
        See Also:
        Constant Field Values
      • ID_ALIGN_RIGHT

        public static final java.lang.String ID_ALIGN_RIGHT
        Indicates that the right edges should be aligned.
        See Also:
        Constant Field Values
      • ID_ALIGN_TOP

        public static final java.lang.String ID_ALIGN_TOP
        Indicates that the top edges should be aligned.
        See Also:
        Constant Field Values
    • Constructor Detail

      • AlignmentAction

        public AlignmentAction​(IEditorPart editor,
                               int align)
        Deprecated.
        use AlignmentAction(IWorkbenchPart, int align)
        Parameters:
        editor - the editor
        align - the alignment ID
      • AlignmentAction

        public AlignmentAction​(IWorkbenchPart part,
                               int align)
        Constructs 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 Detail

      • calculateAlignmentRectangle

        protected org.eclipse.draw2d.geometry.Rectangle calculateAlignmentRectangle​(Request request)
        Returns the alignment rectangle to which all selected parts should be aligned.
        Parameters:
        request - the alignment Request
        Returns:
        the alignment rectangle
      • getOperationSet

        protected java.util.List getOperationSet​(Request request)
        Returns the list of editparts which will participate in alignment.
        Parameters:
        request - the alignment request
        Returns:
        the list of parts which will be aligned
      • initUI

        protected void initUI()
        Initializes the actions UI presentation.