java.lang.Object
com.lowagie.text.Rectangle
- All Implemented Interfaces:
Element
- Direct Known Subclasses:
HeaderFooter,Image,PdfCell,PdfPCell,PdfTable,RectangleReadOnly,SimpleCell,SimpleTable,TableRectangle
Deprecated.
A
Rectangle is the representation of a geometric figure.
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).
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ColorDeprecated.This is the color of the background of this rectangle.protected intDeprecated.This represents the status of the 4 sides of the rectangle.protected ColorDeprecated.The color of the border of this rectangle.protected ColorDeprecated.The color of the bottom border of this rectangle.protected ColorDeprecated.The color of the left border of this rectangle.protected ColorDeprecated.The color of the right border of this rectangle.protected ColorDeprecated.The color of the top border of this rectangle.protected floatDeprecated.This is the width of the border around this rectangle.protected floatDeprecated.The width of the bottom border of this rectangle.protected floatDeprecated.The width of the left border of this rectangle.protected floatDeprecated.The width of the right border of this rectangle.protected floatDeprecated.The width of the top border of this rectangle.static final intDeprecated.This represents one side of the border of theRectangle.static final intDeprecated.This represents a type of border.static final intDeprecated.This represents one side of the border of theRectangle.protected floatDeprecated.the lower left x-coordinate.protected floatDeprecated.the lower left y-coordinate.static final intDeprecated.This represents a rectangle without borders.protected floatDeprecated.the offset relative to a certain top.static final intDeprecated.This represents one side of the border of theRectangle.protected intDeprecated.The rotation of the Rectanglestatic final intDeprecated.This represents one side of the border of theRectangle.static final intDeprecated.This is the value that will be used as undefined .protected floatDeprecated.the upper right x-coordinate.protected floatDeprecated.the upper right y-coordinate.protected booleanDeprecated.Whether variable width/color borders are used.Fields inherited from interface com.lowagie.text.Element
ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_JUSTIFIED_ALL, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT, ALIGN_TOP, ALIGN_UNDEFINED, ANCHOR, ANNOTATION, AUTHOR, CCITT_BLACKIS1, CCITT_ENCODEDBYTEALIGN, CCITT_ENDOFBLOCK, CCITT_ENDOFLINE, CCITTG3_1D, CCITTG3_2D, CCITTG4, CELL, CHAPTER, CHUNK, CREATIONDATE, CREATOR, FOOTNOTE, HEADER, IMGRAW, IMGTEMPLATE, JBIG2, JPEG, JPEG2000, KEYWORDS, LIST, LISTITEM, MARKED, MODIFICATIONDATE, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, ROW, SECTION, SUBJECT, TABLE, TITLE, YMARK -
Constructor Summary
ConstructorsConstructorDescriptionRectangle(float urx, float ury) Deprecated.Constructs aRectangle-object starting from the origin (0, 0).Rectangle(float llx, float lly, float urx, float ury) Deprecated.Constructs aRectangle-object.Rectangle(float llx, float lly, float urx, float ury, int rotation) Deprecated.Constructs aRectangle-object.Rectangle(float urx, float ury, int rotation) Deprecated.Constructs aRectangle-object starting from the origin (0, 0).Deprecated.Constructs aRectangle-object. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.Copies each of the parameters, except the position, from aRectangleobjectvoiddisableBorderSide(int side) Deprecated.Disables the border on the specified side.voidenableBorderSide(int side) Deprecated.Enables the border on the specified side.Deprecated.Gets the backgroundcolor.intDeprecated.Returns the exact type of the border.Deprecated.Gets the color of the border.Deprecated.Gets the color of the bottom border.Deprecated.Gets the color of the left border.Deprecated.Gets the color of the right border.Deprecated.Gets the color of the top border.floatDeprecated.Gets the borderwidth.floatDeprecated.Gets the width of the bottom border.floatDeprecated.Gets the width of the left border.floatDeprecated.Gets the width of the right border.floatDeprecated.Gets the width of the top border.floatDeprecated.Returns the lower left y-coordinate.floatgetBottom(float margin) Deprecated.Returns the lower left y-coordinate, considering a given margin.Deprecated.Gets all the chunks in this element.floatDeprecated.Gets the grayscale.floatDeprecated.Returns the height of the rectangle.floatgetLeft()Deprecated.Returns the lower left x-coordinate.floatgetLeft(float margin) Deprecated.Returns the lower left x-coordinate, considering a given margin.floatDeprecated.Gets offset relative to top.floatgetRight()Deprecated.Returns the upper right x-coordinate.floatgetRight(float margin) Deprecated.Returns the upper right x-coordinate, considering a given margin.intDeprecated.Gets the rotation of the rectanglefloatgetTop()Deprecated.Returns the upper right y-coordinate.floatgetTop(float margin) Deprecated.Returns the upper right y-coordinate, considering a given margin.floatgetWidth()Deprecated.Returns the width of the rectangle.booleanhasBorder(int type) Deprecated.Indicates whether the specified type of border is set.booleanDeprecated.Indicates whether some type of border is set.booleanDeprecated.Checks if this element is a content object.booleanDeprecated.Checks if this element is nestable.booleanDeprecated.Indicates whether variable width borders are being used.voidDeprecated.Normalizes the rectangle.booleanprocess(ElementListener listener) Deprecated.Processes the element by adding it (or the different parts) to anElementListener.rectangle(float top, float bottom) Deprecated.Gets a Rectangle that is altered to fit on the page.rotate()Deprecated.Rotates the rectangle.voidsetBackgroundColor(Color backgroundColor) Deprecated.Sets the backgroundcolor of the rectangle.voidsetBorder(int border) Deprecated.Enables/Disables the border on the specified sides.voidsetBorderColor(Color borderColor) Deprecated.Sets the color of the border.voidsetBorderColorBottom(Color borderColorBottom) Deprecated.Sets the color of the bottom border.voidsetBorderColorLeft(Color borderColorLeft) Deprecated.Sets the color of the left border.voidsetBorderColorRight(Color borderColorRight) Deprecated.Sets the color of the right border.voidsetBorderColorTop(Color borderColorTop) Deprecated.Sets the color of the top border.voidsetBorderWidth(float borderWidth) Deprecated.Sets the borderwidth of the table.voidsetBorderWidthBottom(float borderWidthBottom) Deprecated.Sets the width of the bottom border.voidsetBorderWidthLeft(float borderWidthLeft) Deprecated.Sets the width of the left border.voidsetBorderWidthRight(float borderWidthRight) Deprecated.Sets the width of the right border.voidsetBorderWidthTop(float borderWidthTop) Deprecated.Sets the width of the top border.voidsetBottom(float lly) Deprecated.Sets the lower left y-coordinate.voidsetGrayFill(float value) Deprecated.Sets the the background color to a grayscale value.voidsetLeft(float llx) Deprecated.Sets the lower left x-coordinate.voidsetRelativeTop(float offsetToTop) Deprecated.Sets offset relative to top.voidsetRight(float urx) Deprecated.Sets the upper right x-coordinate.voidsetRotation(int rotation) Deprecated.Sets the rotation of the rectangle.voidsetTop(float ury) Deprecated.Sets the upper right y-coordinate.voidsetUseVariableBorders(boolean useVariableBorders) Deprecated.Sets a parameter indicating if the rectangle has variable bordersvoidDeprecated.Copies each of the parameters, except the position, from aRectangleobject if the value is set theretoString()Deprecated.Gets the content of the text element.inttype()Deprecated.Gets the type of the text element.
-
Field Details
-
UNDEFINED
public static final int UNDEFINEDDeprecated.This is the value that will be used as undefined .- See Also:
-
TOP
public static final int TOPDeprecated.This represents one side of the border of theRectangle.- See Also:
-
BOTTOM
public static final int BOTTOMDeprecated.This represents one side of the border of theRectangle.- See Also:
-
LEFT
public static final int LEFTDeprecated.This represents one side of the border of theRectangle.- See Also:
-
RIGHT
public static final int RIGHTDeprecated.This represents one side of the border of theRectangle.- See Also:
-
NO_BORDER
public static final int NO_BORDERDeprecated.This represents a rectangle without borders.- See Also:
-
BOX
public static final int BOXDeprecated.This represents a type of border.- See Also:
-
llx
protected float llxDeprecated.the lower left x-coordinate. -
lly
protected float llyDeprecated.the lower left y-coordinate. -
urx
protected float urxDeprecated.the upper right x-coordinate. -
ury
protected float uryDeprecated.the upper right y-coordinate. -
offsetToTop
protected float offsetToTopDeprecated.the offset relative to a certain top. -
rotation
protected int rotationDeprecated.The rotation of the Rectangle -
backgroundColor
Deprecated.This is the color of the background of this rectangle. -
border
protected int borderDeprecated.This represents the status of the 4 sides of the rectangle. -
useVariableBorders
protected boolean useVariableBordersDeprecated.Whether variable width/color borders are used. -
borderWidth
protected float borderWidthDeprecated.This is the width of the border around this rectangle. -
borderWidthLeft
protected float borderWidthLeftDeprecated.The width of the left border of this rectangle. -
borderWidthRight
protected float borderWidthRightDeprecated.The width of the right border of this rectangle. -
borderWidthTop
protected float borderWidthTopDeprecated.The width of the top border of this rectangle. -
borderWidthBottom
protected float borderWidthBottomDeprecated.The width of the bottom border of this rectangle. -
borderColor
Deprecated.The color of the border of this rectangle. -
borderColorLeft
Deprecated.The color of the left border of this rectangle. -
borderColorRight
Deprecated.The color of the right border of this rectangle. -
borderColorTop
Deprecated.The color of the top border of this rectangle. -
borderColorBottom
Deprecated.The color of the bottom border of this rectangle.
-
-
Constructor Details
-
Rectangle
public Rectangle(float llx, float lly, float urx, float ury) Deprecated.Constructs aRectangle-object.- Parameters:
llx- lower left xlly- lower left yurx- upper right xury- upper right y
-
Rectangle
public Rectangle(float urx, float ury) Deprecated.Constructs aRectangle-object starting from the origin (0, 0).- Parameters:
urx- upper right xury- upper right y
-
Rectangle
public Rectangle(float llx, float lly, float urx, float ury, int rotation) Deprecated.Constructs aRectangle-object.- Parameters:
llx- lower left xlly- lower left yurx- upper right xury- upper right yrotation- 0, 90, 180, or 270 grades
-
Rectangle
public Rectangle(float urx, float ury, int rotation) Deprecated.Constructs aRectangle-object starting from the origin (0, 0).- Parameters:
urx- upper right xury- upper right yrotation- 0, 90, 180, or 270 grades
-
Rectangle
Deprecated.Constructs aRectangle-object.- Parameters:
rect- anotherRectangle
-
-
Method Details
-
process
Deprecated.Processes the element by adding it (or the different parts) to anElementListener. -
type
public int type()Deprecated.Gets the type of the text element. -
getChunks
Deprecated.Gets all the chunks in this element. -
isContent
public boolean isContent()Deprecated.Description copied from interface:ElementChecks if this element is a content object. If not, it's a metadata object. -
isNestable
public boolean isNestable()Deprecated.Description copied from interface:ElementChecks if this element is nestable.- Specified by:
isNestablein interfaceElement- Returns:
- true if this element can be nested inside other elements.
- Since:
- iText 2.0.8
- See Also:
-
getLeft
public float getLeft()Deprecated.Returns the lower left x-coordinate.- Returns:
- the lower left x-coordinate
-
setLeft
public void setLeft(float llx) Deprecated.Sets the lower left x-coordinate.- Parameters:
llx- the new value
-
getLeft
public float getLeft(float margin) Deprecated.Returns the lower left x-coordinate, considering a given margin.- Parameters:
margin- a margin- Returns:
- the lower left x-coordinate
-
getRight
public float getRight()Deprecated.Returns the upper right x-coordinate.- Returns:
- the upper right x-coordinate
-
setRight
public void setRight(float urx) Deprecated.Sets the upper right x-coordinate.- Parameters:
urx- the new value
-
getRight
public float getRight(float margin) Deprecated.Returns the upper right x-coordinate, considering a given margin.- Parameters:
margin- a margin- Returns:
- the upper right x-coordinate
-
getWidth
public float getWidth()Deprecated.Returns the width of the rectangle.- Returns:
- the width
-
getTop
public float getTop()Deprecated.Returns the upper right y-coordinate.- Returns:
- the upper right y-coordinate
-
setTop
public void setTop(float ury) Deprecated.Sets the upper right y-coordinate.- Parameters:
ury- the new value
-
getTop
public float getTop(float margin) Deprecated.Returns the upper right y-coordinate, considering a given margin.- Parameters:
margin- a margin- Returns:
- the upper right y-coordinate
-
getRelativeTop
public float getRelativeTop()Deprecated.Gets offset relative to top.- Returns:
- offset relative to top
-
setRelativeTop
public void setRelativeTop(float offsetToTop) Deprecated.Sets offset relative to top.- Parameters:
offsetToTop- the new offset
-
getBottom
public float getBottom()Deprecated.Returns the lower left y-coordinate.- Returns:
- the lower left y-coordinate
-
setBottom
public void setBottom(float lly) Deprecated.Sets the lower left y-coordinate.- Parameters:
lly- the new value
-
getBottom
public float getBottom(float margin) Deprecated.Returns the lower left y-coordinate, considering a given margin.- Parameters:
margin- a margin- Returns:
- the lower left y-coordinate
-
getHeight
public float getHeight()Deprecated.Returns the height of the rectangle.- Returns:
- the height
-
normalize
public void normalize()Deprecated.Normalizes the rectangle. Switches lower left with upper right if necessary. -
getRotation
public int getRotation()Deprecated.Gets the rotation of the rectangle- Returns:
- a rotation value
-
setRotation
public void setRotation(int rotation) Deprecated.Sets the rotation of the rectangle. Valid values are 0, 90, 180, and 270.- Parameters:
rotation- the new rotation value- Since:
- iText 5.0.6
-
rotate
Deprecated.Rotates the rectangle. Swaps the values of llx and lly and of urx and ury.- Returns:
- the rotated
Rectangle
-
getBackgroundColor
Deprecated.Gets the backgroundcolor.- Returns:
- a
Color
-
setBackgroundColor
Deprecated.Sets the backgroundcolor of the rectangle.- Parameters:
backgroundColor- aColor
-
getGrayFill
public float getGrayFill()Deprecated.Gets the grayscale.- Returns:
- the grayscale color of the background or 0 if the background has no grayscale color.
-
setGrayFill
public void setGrayFill(float value) Deprecated.Sets the the background color to a grayscale value.- Parameters:
value- the new grayscale value
-
getBorder
public int getBorder()Deprecated.Returns the exact type of the border.- Returns:
- a value
-
setBorder
public void setBorder(int border) Deprecated.Enables/Disables the border on the specified sides. The border is specified as an integer bitwise combination of the constants:LEFT, RIGHT, TOP, BOTTOM.- Parameters:
border- the new value- See Also:
-
hasBorders
public boolean hasBorders()Deprecated.Indicates whether some type of border is set.- Returns:
- a boolean
-
hasBorder
public boolean hasBorder(int type) Deprecated.Indicates whether the specified type of border is set.- Parameters:
type- the type of border- Returns:
- a boolean
-
isUseVariableBorders
public boolean isUseVariableBorders()Deprecated.Indicates whether variable width borders are being used. Returns true ifsetBorderWidthLeft, setBorderWidthRight, setBorderWidthTop, or setBorderWidthBottomhas been called.- Returns:
- true if variable width borders are in use
-
setUseVariableBorders
public void setUseVariableBorders(boolean useVariableBorders) Deprecated.Sets a parameter indicating if the rectangle has variable borders- Parameters:
useVariableBorders- indication if the rectangle has variable borders
-
enableBorderSide
public void enableBorderSide(int side) Deprecated.Enables the border on the specified side.- Parameters:
side- the side to enable. One ofLEFT, RIGHT, TOP, BOTTOM
-
disableBorderSide
public void disableBorderSide(int side) Deprecated.Disables the border on the specified side.- Parameters:
side- the side to disable. One ofLEFT, RIGHT, TOP, BOTTOM
-
getBorderWidth
public float getBorderWidth()Deprecated.Gets the borderwidth.- Returns:
- a value
-
setBorderWidth
public void setBorderWidth(float borderWidth) Deprecated.Sets the borderwidth of the table.- Parameters:
borderWidth- the new value
-
getBorderWidthLeft
public float getBorderWidthLeft()Deprecated.Gets the width of the left border.- Returns:
- a width
-
setBorderWidthLeft
public void setBorderWidthLeft(float borderWidthLeft) Deprecated.Sets the width of the left border.- Parameters:
borderWidthLeft- a width
-
getBorderWidthRight
public float getBorderWidthRight()Deprecated.Gets the width of the right border.- Returns:
- a width
-
setBorderWidthRight
public void setBorderWidthRight(float borderWidthRight) Deprecated.Sets the width of the right border.- Parameters:
borderWidthRight- a width
-
getBorderWidthTop
public float getBorderWidthTop()Deprecated.Gets the width of the top border.- Returns:
- a width
-
setBorderWidthTop
public void setBorderWidthTop(float borderWidthTop) Deprecated.Sets the width of the top border.- Parameters:
borderWidthTop- a width
-
getBorderWidthBottom
public float getBorderWidthBottom()Deprecated.Gets the width of the bottom border.- Returns:
- a width
-
setBorderWidthBottom
public void setBorderWidthBottom(float borderWidthBottom) Deprecated.Sets the width of the bottom border.- Parameters:
borderWidthBottom- a width
-
getBorderColor
Deprecated.Gets the color of the border.- Returns:
- a
Color
-
setBorderColor
Deprecated.Sets the color of the border.- Parameters:
borderColor- aColor
-
getBorderColorLeft
Deprecated.Gets the color of the left border.- Returns:
- a
Color
-
setBorderColorLeft
Deprecated.Sets the color of the left border.- Parameters:
borderColorLeft- aColor
-
getBorderColorRight
Deprecated.Gets the color of the right border.- Returns:
- a
Color
-
setBorderColorRight
Deprecated.Sets the color of the right border.- Parameters:
borderColorRight- aColor
-
getBorderColorTop
Deprecated.Gets the color of the top border.- Returns:
- a
Color
-
setBorderColorTop
Deprecated.Sets the color of the top border.- Parameters:
borderColorTop- aColor
-
getBorderColorBottom
Deprecated.Gets the color of the bottom border.- Returns:
- a
Color
-
setBorderColorBottom
Deprecated.Sets the color of the bottom border.- Parameters:
borderColorBottom- aColor
-
rectangle
Deprecated.Gets a Rectangle that is altered to fit on the page.- Parameters:
top- the top positionbottom- the bottom position- Returns:
- a
Rectangle
-
cloneNonPositionParameters
Deprecated.Copies each of the parameters, except the position, from aRectangleobject- Parameters:
rect-Rectangleto copy from
-
softCloneNonPositionParameters
Deprecated.Copies each of the parameters, except the position, from aRectangleobject if the value is set there- Parameters:
rect-Rectangleto copy from
-
toString
Deprecated.Description copied from interface:ElementGets the content of the text element.
-