Package org.cip4.lib.xjdf.type
Class Rectangle
java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<ValueType,BoundType>
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
ConstructorsConstructorDescriptionDefault constructor.Rectangle(float llx, float lly, float urx, float ury) Custom constructor, accepting values for page coordinates.Custom Constructor.Custom constructor, accepting two points. -
Method Summary
Modifier and TypeMethodDescriptionbooleanfloatReturns the height of the rectangle.floatgetLlx()Getter for llx attribute.floatgetLly()Getter for lly attribute.Returns the lower left point as XYPair.getSize()Returns the size of the rectangle.Returns the upper right point as XYPair.floatgetUrx()Getter for urx attribute.floatgetUry()Getter for ury attribute.floatgetWidth()Returns the width of the rectangle.inthashCode()toString()
-
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
Custom constructor, accepting two points.- Parameters:
lowerLeft- The lower left coordinatesupperRight- The upper right coordinates
-
Rectangle
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
Returns the size of the rectangle.- Returns:
- The rectangles size.
-
getLowerLeft
Returns the lower left point as XYPair.- Returns:
- lower left as XYPair object.
-
getUpperRight
Returns the upper right point as XYPair.- Returns:
- upper right as XYPair object.
-
marshal
-
unmarshal
-
toString
- Specified by:
toStringin classAbstractXJdfType<String,Rectangle> - See Also:
-
equals
- Overrides:
equalsin classAbstractXJdfType<String,Rectangle> - See Also:
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractXJdfType<String,Rectangle> - See Also:
-