Class AlignmentRequest

All Implemented Interfaces:
DropRequest

public class AlignmentRequest extends ChangeBoundsRequest
A request to align multiple objects.
  • Constructor Details

    • AlignmentRequest

      public AlignmentRequest()
      Default constructor.
    • AlignmentRequest

      public AlignmentRequest(Object type)
      Constructs a new AlignmentRequest with the new type.
      Parameters:
      type - the type
  • Method Details

    • getAlignment

      public int getAlignment()
      Returns the alignment. Possible values are PositionConstants.LEFT , PositionConstants.RIGHT, PositionConstants.TOP and PositionConstants.BOTTOM.
      Returns:
      the alignment
    • getAlignmentRectangle

      public org.eclipse.draw2d.geometry.Rectangle getAlignmentRectangle()
      Returns the rectangle used to align the edit part with.
      Returns:
      the alignment rectangle
    • getTransformedRectangle

      public org.eclipse.draw2d.geometry.Rectangle getTransformedRectangle(org.eclipse.draw2d.geometry.Rectangle rect)
      Description copied from class: ChangeBoundsRequest
      Transforms a copy of the passed in rectangle to account for the move and/or resize deltas and returns this copy.
      Overrides:
      getTransformedRectangle in class ChangeBoundsRequest
      Parameters:
      rect - the rectangle to transform
      Returns:
      a copy of the passed in rectangle representing the new bounds
      See Also:
    • setAlignment

      public void setAlignment(int align)
      Sets the alignment.
      Parameters:
      align - the alignment
      See Also:
    • setAlignmentRectangle

      public void setAlignmentRectangle(org.eclipse.draw2d.geometry.Rectangle rect)
      Sets the alignment rectangle.
      Parameters:
      rect - the alignment rectangle
      See Also: