Package technology.tabula
Class Rectangle
java.lang.Object
java.awt.geom.RectangularShape
java.awt.geom.Rectangle2D
java.awt.geom.Rectangle2D.Float
technology.tabula.Rectangle
- All Implemented Interfaces:
Shape,Serializable,Cloneable
- Direct Known Subclasses:
Line,Page,RectangularTextContainer,Table,TextElement
public class Rectangle extends Rectangle2D.Float
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class java.awt.geom.Rectangle2D
Rectangle2D.Double, Rectangle2D.Float -
Field Summary
Fields Modifier and Type Field Description static Comparator<Rectangle>ILL_DEFINED_ORDERDeprecated.with no replacementprotected static floatVERTICAL_COMPARISON_THRESHOLD -
Constructor Summary
-
Method Summary
Modifier and Type Method Description static RectangleboundingBoxOf(List<? extends Rectangle> rectangles)intcompareTo(Rectangle other)floatgetArea()floatgetBottom()floatgetLeft()Point2D[]getPoints()floatgetRight()floatgetTop()booleanhorizontallyOverlaps(Rectangle other)floathorizontalOverlap(Rectangle other)intisLtrDominant()Rectanglemerge(Rectangle other)floatoverlapRatio(Rectangle other)voidsetBottom(float bottom)voidsetLeft(float left)voidsetRight(float right)voidsetTop(float top)StringtoString()booleanverticallyOverlaps(Rectangle other)floatverticalOverlap(Rectangle other)floatverticalOverlapRatio(Rectangle other)Methods inherited from class java.awt.geom.Rectangle2D.Float
createIntersection, createUnion, getBounds2D, getHeight, getWidth, getX, getY, isEmpty, outcode, setRect, setRect, setRectMethods inherited from class java.awt.geom.Rectangle2D
add, add, add, contains, contains, equals, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, unionMethods inherited from class java.awt.geom.RectangularShape
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
-
Field Details
-
ILL_DEFINED_ORDER
Deprecated.with no replacementIll-defined comparator, from when Rectangle was Comparable.- See Also:
- PR 116
-
VERTICAL_COMPARISON_THRESHOLD
protected static final float VERTICAL_COMPARISON_THRESHOLD- See Also:
- Constant Field Values
-
-
Constructor Details
-
Method Details
-
compareTo
-
isLtrDominant
public int isLtrDominant() -
getArea
public float getArea() -
verticalOverlap
-
verticallyOverlaps
-
horizontalOverlap
-
horizontallyOverlaps
-
verticalOverlapRatio
-
overlapRatio
-
merge
-
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
-
toString
- Overrides:
toStringin classRectangle2D.Float
-
boundingBoxOf
- Parameters:
rectangles-- Returns:
- minimum bounding box that contains all the rectangles
-