Class Rectangle


  • public class Rectangle
    extends AbstractXJdfType<java.lang.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 Summary

      Constructors 
      Constructor Description
      Rectangle()
      Default constructor.
      Rectangle​(float llx, float lly, float urx, float ury)
      Custom constructor, accepting values for page coordinates.
      Rectangle​(java.lang.String expression)
      Custom Constructor.
      Rectangle​(XYPair lowerLeft, XYPair upperRight)
      Custom constructor, accepting two points.
    • Constructor Detail

      • 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​(java.lang.String expression)
        Custom Constructor. Creates a new Rectangle instance by a String expression.
        Parameters:
        expression - Rectangle as String expression.
    • Method Detail

      • 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 java.lang.String marshal​(Rectangle v)
        Specified by:
        marshal in class jakarta.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,​Rectangle>
        See Also:
        javax.xml.bind.annotation.adapters.XmlAdapter#marshal(java.lang.Object)
      • unmarshal

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

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class AbstractXJdfType<java.lang.String,​Rectangle>
        See Also:
        Object.equals(java.lang.Object)