Package org.openpdf.text
Class RectangleReadOnly
java.lang.Object
org.openpdf.text.Rectangle
org.openpdf.text.RectangleReadOnly
- All Implemented Interfaces:
Element
A
RectangleReadOnly is the representation of a geometric figure. It's the same as a
Rectangle but immutable. Rectangles support constant width borders using
setBorderWidth(float) and setBorder(int). They also support borders that vary in width/color on each
side using methods like setBorderWidthLeft(float) or setBorderColorLeft(java.awt.Color).- Since:
- 2.1.2
- See Also:
-
Field Summary
Fields inherited from class org.openpdf.text.Rectangle
backgroundColor, border, borderColor, borderColorBottom, borderColorLeft, borderColorRight, borderColorTop, borderWidth, borderWidthBottom, borderWidthLeft, borderWidthRight, borderWidthTop, BOTTOM, BOX, LEFT, llx, lly, NO_BORDER, RIGHT, rotation, TOP, UNDEFINED, urx, ury, useVariableBordersFields inherited from interface org.openpdf.text.Element
ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, AUTHOR, CCITT_BLACKIS1, CCITT_ENCODEDBYTEALIGN, CCITT_ENDOFBLOCK, CCITT_ENDOFLINE, CCITTG3_1D, CREATIONDATE, CREATOR, HEADER, IMGRAW, IMGTEMPLATE, KEYWORDS, MARKED, MODIFICATIONDATE, PRODUCER, RECTANGLE, SUBJECT, TABLE, TITLE -
Constructor Summary
ConstructorsConstructorDescriptionRectangleReadOnly(float urx, float ury) Constructs aRectangleReadOnly-object starting from the origin (0, 0). -
Method Summary
Modifier and TypeMethodDescriptionvoidCopies each of the parameters, except the position, from aRectangleobjectvoidsetBottom(float lly) Sets the lower left y-coordinate.voidsetLeft(float llx) Sets the lower left x-coordinate.voidsetRight(float urx) Sets the upper right x-coordinate.voidsetTop(float ury) Sets the upper right y-coordinate.toString()Gets the content of the text element.Methods inherited from class org.openpdf.text.Rectangle
getBackgroundColor, getBorderColor, getBorderColorBottom, getBorderColorLeft, getBorderColorRight, getBorderColorTop, getBorderWidth, getBorderWidthBottom, getBorderWidthLeft, getBorderWidthRight, getBorderWidthTop, getBottom, getHeight, getLeft, getRight, getRotation, getTop, getWidth, hasBorder, hasBorders, isContent, isNestable, isUseVariableBorders, type
-
Constructor Details
-
RectangleReadOnly
public RectangleReadOnly(float urx, float ury) Constructs aRectangleReadOnly-object starting from the origin (0, 0).- Parameters:
urx- upper right xury- upper right y
-
-
Method Details
-
setLeft
public void setLeft(float llx) Sets the lower left x-coordinate. -
setRight
public void setRight(float urx) Sets the upper right x-coordinate. -
setTop
public void setTop(float ury) Sets the upper right y-coordinate. -
setBottom
public void setBottom(float lly) Sets the lower left y-coordinate. -
cloneNonPositionParameters
Copies each of the parameters, except the position, from aRectangleobject- Overrides:
cloneNonPositionParametersin classRectangle- Parameters:
rect-Rectangleto copy from
-
toString
Description copied from interface:ElementGets the content of the text element.
-