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
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.awt.geom.Rectangle2D
Rectangle2D.Double, Rectangle2D.Float -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Comparator<Rectangle>Deprecated.with no replacementprotected static final floatFields inherited from class java.awt.geom.Rectangle2D.Float
height, width, x, yFields inherited from class java.awt.geom.Rectangle2D
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RectangleboundingBoxOf(List<? extends Rectangle> rectangles) intfloatgetArea()floatfloatgetLeft()Point2D[]floatgetRight()floatgetTop()booleanhorizontallyOverlaps(Rectangle other) floathorizontalOverlap(Rectangle other) intfloatoverlapRatio(Rectangle other) voidsetBottom(float bottom) voidsetLeft(float left) voidsetRight(float right) voidsetTop(float top) toString()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:
-
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
-
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
-