Class Rectangle

All Implemented Interfaces:
Shape, Serializable, Cloneable
Direct Known Subclasses:
Line, Page, RectangularTextContainer, Table, TextElement

public class Rectangle extends Rectangle2D.Float
See Also:
  • Field Details

    • ILL_DEFINED_ORDER

      @Deprecated public static final Comparator<Rectangle> ILL_DEFINED_ORDER
      Deprecated.
      with no replacement
      Ill-defined comparator, from when Rectangle was Comparable.
      See Also:
    • VERTICAL_COMPARISON_THRESHOLD

      protected static final float VERTICAL_COMPARISON_THRESHOLD
      See Also:
  • Constructor Details

    • Rectangle

      public Rectangle()
    • Rectangle

      public Rectangle(float top, float left, float width, float height)
  • Method Details

    • compareTo

      public int compareTo(Rectangle other)
    • isLtrDominant

      public int isLtrDominant()
    • getArea

      public float getArea()
    • verticalOverlap

      public float verticalOverlap(Rectangle other)
    • verticallyOverlaps

      public boolean verticallyOverlaps(Rectangle other)
    • horizontalOverlap

      public float horizontalOverlap(Rectangle other)
    • horizontallyOverlaps

      public boolean horizontallyOverlaps(Rectangle other)
    • verticalOverlapRatio

      public float verticalOverlapRatio(Rectangle other)
    • overlapRatio

      public float overlapRatio(Rectangle other)
    • merge

      public Rectangle merge(Rectangle other)
    • getTop

      public float getTop()
    • setTop

      public void setTop(float top)
    • getRight

      public float getRight()
    • setRight

      public void setRight(float right)
    • getLeft

      public float getLeft()
    • setLeft

      public void setLeft(float left)
    • getBottom

      public float getBottom()
    • setBottom

      public void setBottom(float bottom)
    • getPoints

      public Point2D[] getPoints()
    • toString

      public String toString()
      Overrides:
      toString in class Rectangle2D.Float
    • boundingBoxOf

      public static Rectangle boundingBoxOf(List<? extends Rectangle> rectangles)
      Parameters:
      rectangles -
      Returns:
      minimum bounding box that contains all the rectangles