Class Rectangle

java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<ValueType,BoundType>
org.cip4.lib.xjdf.type.AbstractXJdfType<String,Rectangle>
org.cip4.lib.xjdf.type.Rectangle

public class Rectangle extends AbstractXJdfType<String,Rectangle>
XML Attributes of type rectangle are used to describe rectangular locations on the page, Sheet or other printable surface. A rectangle is represented as an array of four numbers — llx lly urx ury — specifying the lower-left x, lowerleft y, upper-right x and upper-right y coordinates of the rectangle, in that order. This is equivalent to the ordering: Left Bottom Right Top. All numbers are defined in points.
  • Constructor Details

    • Rectangle

      public Rectangle()
      Default constructor.
    • Rectangle

      public Rectangle(float llx, float lly, float urx, float ury)
      Custom constructor, accepting values for page coordinates.
      Parameters:
      llx - Lower-left x.
      lly - Lower-left y.
      urx - Upper-right x.
      ury - Upper-right y.
    • Rectangle

      public Rectangle(XYPair lowerLeft, XYPair upperRight)
      Custom constructor, accepting two points.
      Parameters:
      lowerLeft - The lower left coordinates
      upperRight - The upper right coordinates
    • Rectangle

      public Rectangle(String expression)
      Custom Constructor. Creates a new Rectangle instance by a String expression.
      Parameters:
      expression - Rectangle as String expression.
  • Method Details

    • getLlx

      public float getLlx()
      Getter for llx attribute.
      Returns:
      the llx
    • getLly

      public float getLly()
      Getter for lly attribute.
      Returns:
      the lly
    • getUrx

      public float getUrx()
      Getter for urx attribute.
      Returns:
      the urx
    • getUry

      public float getUry()
      Getter for ury attribute.
      Returns:
      the ury
    • getWidth

      public float getWidth()
      Returns the width of the rectangle.
      Returns:
      The rectangles width.
    • getHeight

      public float getHeight()
      Returns the height of the rectangle.
      Returns:
      The rectangles height.
    • getSize

      public XYPair getSize()
      Returns the size of the rectangle.
      Returns:
      The rectangles size.
    • getLowerLeft

      public XYPair getLowerLeft()
      Returns the lower left point as XYPair.
      Returns:
      lower left as XYPair object.
    • getUpperRight

      public XYPair getUpperRight()
      Returns the upper right point as XYPair.
      Returns:
      upper right as XYPair object.
    • marshal

      public String marshal(Rectangle v)
      Specified by:
      marshal in class javax.xml.bind.annotation.adapters.XmlAdapter<String,Rectangle>
      See Also:
      • XmlAdapter.marshal(java.lang.Object)
    • unmarshal

      public Rectangle unmarshal(String v)
      Specified by:
      unmarshal in class javax.xml.bind.annotation.adapters.XmlAdapter<String,Rectangle>
      See Also:
      • XmlAdapter.unmarshal(java.lang.Object)
    • toString

      public String toString()
      Specified by:
      toString in class AbstractXJdfType<String,Rectangle>
      See Also:
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class AbstractXJdfType<String,Rectangle>
      See Also:
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AbstractXJdfType<String,Rectangle>
      See Also: