Class RectangleReadOnly

java.lang.Object
org.openpdf.text.Rectangle
org.openpdf.text.RectangleReadOnly
All Implemented Interfaces:
Element

public class RectangleReadOnly extends Rectangle
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:
  • Constructor Details

    • RectangleReadOnly

      public RectangleReadOnly(float urx, float ury)
      Constructs a RectangleReadOnly -object starting from the origin (0, 0).
      Parameters:
      urx - upper right x
      ury - upper right y
  • Method Details

    • setLeft

      public void setLeft(float llx)
      Sets the lower left x-coordinate.
      Overrides:
      setLeft in class Rectangle
      Parameters:
      llx - the new value
    • setRight

      public void setRight(float urx)
      Sets the upper right x-coordinate.
      Overrides:
      setRight in class Rectangle
      Parameters:
      urx - the new value
    • setTop

      public void setTop(float ury)
      Sets the upper right y-coordinate.
      Overrides:
      setTop in class Rectangle
      Parameters:
      ury - the new value
    • setBottom

      public void setBottom(float lly)
      Sets the lower left y-coordinate.
      Overrides:
      setBottom in class Rectangle
      Parameters:
      lly - the new value
    • cloneNonPositionParameters

      public void cloneNonPositionParameters(Rectangle rect)
      Copies each of the parameters, except the position, from a Rectangle object
      Overrides:
      cloneNonPositionParameters in class Rectangle
      Parameters:
      rect - Rectangle to copy from
    • toString

      public String toString()
      Description copied from interface: Element
      Gets the content of the text element.
      Specified by:
      toString in interface Element
      Overrides:
      toString in class Rectangle
      Returns:
      String version of the most important rectangle properties
      See Also: