public class RectangleReadOnly extends Rectangle
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(BaseColor).ElementbackgroundColor, border, borderColor, borderColorBottom, borderColorLeft, borderColorRight, borderColorTop, borderWidth, borderWidthBottom, borderWidthLeft, borderWidthRight, borderWidthTop, BOTTOM, BOX, LEFT, llx, lly, NO_BORDER, RIGHT, rotation, TOP, UNDEFINED, urx, ury, useVariableBordersALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_JUSTIFIED_ALL, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT, ALIGN_TOP, ALIGN_UNDEFINED, ANCHOR, ANNOTATION, AUTHOR, BODY, CCITT_BLACKIS1, CCITT_ENCODEDBYTEALIGN, CCITT_ENDOFBLOCK, CCITT_ENDOFLINE, CCITTG3_1D, CCITTG3_2D, CCITTG4, CHAPTER, CHUNK, CREATIONDATE, CREATOR, DIV, HEADER, IMGRAW, IMGTEMPLATE, JBIG2, JPEG, JPEG2000, KEYWORDS, LANGUAGE, LIST, LISTITEM, MARKED, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, SECTION, SUBJECT, TITLE, WRITABLE_DIRECT, YMARK| Constructor and Description |
|---|
RectangleReadOnly(float urx,
float ury)
Constructs a
RectangleReadOnly-object starting from the origin
(0, 0). |
RectangleReadOnly(float llx,
float lly,
float urx,
float ury)
Constructs a
RectangleReadOnly -object. |
RectangleReadOnly(float llx,
float lly,
float urx,
float ury,
int rotation)
Constructs a
RectangleReadOnly -object. |
RectangleReadOnly(float urx,
float ury,
int rotation)
Constructs a
RectangleReadOnly-object starting from the origin
(0, 0) and with a specific rotation (valid values are 0, 90, 180, 270). |
RectangleReadOnly(Rectangle rect)
Constructs a
RectangleReadOnly -object. |
| Modifier and Type | Method and Description |
|---|---|
void |
cloneNonPositionParameters(Rectangle rect)
Copies each of the parameters, except the position, from a
Rectangle object |
void |
disableBorderSide(int side)
Disables the border on the specified side.
|
void |
enableBorderSide(int side)
Enables the border on the specified side.
|
void |
normalize()
Normalizes the rectangle.
|
void |
setBackgroundColor(BaseColor value)
Sets the backgroundcolor of the rectangle.
|
void |
setBorder(int border)
Enables/Disables the border on the specified sides.
|
void |
setBorderColor(BaseColor borderColor)
Sets the color of the border.
|
void |
setBorderColorBottom(BaseColor borderColorBottom)
Sets the color of the bottom border.
|
void |
setBorderColorLeft(BaseColor borderColorLeft)
Sets the color of the left border.
|
void |
setBorderColorRight(BaseColor borderColorRight)
Sets the color of the right border
|
void |
setBorderColorTop(BaseColor borderColorTop)
Sets the color of the top border.
|
void |
setBorderWidth(float borderWidth)
Sets the borderwidth of the table.
|
void |
setBorderWidthBottom(float borderWidthBottom)
Sets the width of the bottom border
|
void |
setBorderWidthLeft(float borderWidthLeft)
Sets the width of the left border
|
void |
setBorderWidthRight(float borderWidthRight)
Sets the width of the right border
|
void |
setBorderWidthTop(float borderWidthTop)
Sets the width of the top border
|
void |
setBottom(float lly)
Sets the lower left y-coordinate.
|
void |
setGrayFill(float value)
Sets the grayscale of the rectangle.
|
void |
setLeft(float llx)
Sets the lower left x-coordinate.
|
void |
setRight(float urx)
Sets the upper right x-coordinate.
|
void |
setRotation(int rotation)
Sets the rotation of the rectangle.
|
void |
setTop(float ury)
Sets the upper right y-coordinate.
|
void |
setUseVariableBorders(boolean useVariableBorders)
Sets a parameter indicating if the rectangle has variable borders
|
void |
softCloneNonPositionParameters(Rectangle rect)
Copies each of the parameters, except the position, from a
Rectangle object if the value is set there. |
String |
toString()
Gets the content of the text element.
|
equals, getBackgroundColor, getBorder, getBorderColor, getBorderColorBottom, getBorderColorLeft, getBorderColorRight, getBorderColorTop, getBorderWidth, getBorderWidthBottom, getBorderWidthLeft, getBorderWidthRight, getBorderWidthTop, getBottom, getBottom, getChunks, getGrayFill, getHeight, getLeft, getLeft, getRight, getRight, getRotation, getTop, getTop, getWidth, hasBorder, hasBorders, isContent, isNestable, isUseVariableBorders, process, rectangle, rotate, typepublic RectangleReadOnly(float llx,
float lly,
float urx,
float ury)
RectangleReadOnly -object.llx - lower left xlly - lower left yurx - upper right xury - upper right ypublic RectangleReadOnly(float llx,
float lly,
float urx,
float ury,
int rotation)
RectangleReadOnly -object.llx - lower left xlly - lower left yurx - upper right xury - upper right yrotation - the rotation of the Rectangle (0, 90, 180, 270)public RectangleReadOnly(float urx,
float ury)
RectangleReadOnly-object starting from the origin
(0, 0).urx - upper right xury - upper right ypublic RectangleReadOnly(float urx,
float ury,
int rotation)
RectangleReadOnly-object starting from the origin
(0, 0) and with a specific rotation (valid values are 0, 90, 180, 270).urx - upper right xury - upper right yrotation - the rotationpublic RectangleReadOnly(Rectangle rect)
RectangleReadOnly -object.rect - another Rectanglepublic void setRotation(int rotation)
setRotation in class Rectanglerotation - the new rotation valuepublic void setLeft(float llx)
public void setRight(float urx)
public void setTop(float ury)
public void setBottom(float lly)
public void normalize()
public void setBackgroundColor(BaseColor value)
setBackgroundColor in class Rectanglevalue - the new valuepublic void setGrayFill(float value)
setGrayFill in class Rectanglevalue - the new valuepublic void setBorder(int border)
LEFT, RIGHT, TOP, BOTTOM.setBorder in class Rectangleborder - the new valueenableBorderSide(int),
disableBorderSide(int)public void setUseVariableBorders(boolean useVariableBorders)
setUseVariableBorders in class RectangleuseVariableBorders - indication if the rectangle has variable borderspublic void enableBorderSide(int side)
enableBorderSide in class Rectangleside - the side to enable.
One of LEFT, RIGHT, TOP, BOTTOMpublic void disableBorderSide(int side)
disableBorderSide in class Rectangleside - the side to disable.
One of LEFT, RIGHT, TOP, BOTTOMpublic void setBorderWidth(float borderWidth)
setBorderWidth in class RectangleborderWidth - the new valuepublic void setBorderWidthLeft(float borderWidthLeft)
setBorderWidthLeft in class RectangleborderWidthLeft - a widthpublic void setBorderWidthRight(float borderWidthRight)
setBorderWidthRight in class RectangleborderWidthRight - a widthpublic void setBorderWidthTop(float borderWidthTop)
setBorderWidthTop in class RectangleborderWidthTop - a widthpublic void setBorderWidthBottom(float borderWidthBottom)
setBorderWidthBottom in class RectangleborderWidthBottom - a widthpublic void setBorderColor(BaseColor borderColor)
setBorderColor in class RectangleborderColor - a BaseColorpublic void setBorderColorLeft(BaseColor borderColorLeft)
setBorderColorLeft in class RectangleborderColorLeft - a BaseColorpublic void setBorderColorRight(BaseColor borderColorRight)
setBorderColorRight in class RectangleborderColorRight - a BaseColorpublic void setBorderColorTop(BaseColor borderColorTop)
setBorderColorTop in class RectangleborderColorTop - a BaseColorpublic void setBorderColorBottom(BaseColor borderColorBottom)
setBorderColorBottom in class RectangleborderColorBottom - a BaseColorpublic void cloneNonPositionParameters(Rectangle rect)
Rectangle objectcloneNonPositionParameters in class Rectanglerect - Rectangle to copy frompublic void softCloneNonPositionParameters(Rectangle rect)
Rectangle object if the value is set there.softCloneNonPositionParameters in class Rectanglerect - Rectangle to copy fromCopyright © 2022. All rights reserved.