Class StrictPoint
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.util.geom.StrictPoint
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class StrictPoint extends Object implements Serializable, Cloneable
A StrictPoint class represents a coordinate in the report layout. It is similiar to thePoint2D
class, but uses micro-points instead of doubles.- Author:
- Thomas Morgner
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StrictPoint()
DefaultConstructor.StrictPoint(long x, long y)
Creates a StrictBounds object with the given coordinates, width and height.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
Returns a copy of this Point object.boolean
equals(Object o)
Checks whether the given object is a StrictPoint instance sharing the same coordinates as this point.StrictPoint
getLockedInstance()
Returns a copy of this bounds object which cannot be modified anymore.StrictPoint
getUnlockedInstance()
Returns a copy of this bounds object which can be modified later.long
getX()
Returns the X coordinate of thisStrictPoint
in micro points.long
getY()
Returns the Y coordinate of thisStrictPoint
in micro points.int
hashCode()
Computes the hashcode for this point.boolean
isLocked()
Checks whether this point object is locked.void
setLocation(long x, long y)
Sets the location of thisStrictPoint
to the specified coordinates.String
toString()
Returns a string representation of these bounds.
-
-
-
Method Detail
-
getX
public long getX()
Returns the X coordinate of thisStrictPoint
in micro points.- Returns:
- the X coordinate of this
StrictPoint
.
-
getY
public long getY()
Returns the Y coordinate of thisStrictPoint
in micro points.- Returns:
- the Y coordinate of this
StrictPoint
.
-
setLocation
public void setLocation(long x, long y)
Sets the location of thisStrictPoint
to the specified coordinates.- Parameters:
x
- the coordinates of thisStrictPoint
y
- the coordinates of thisStrictPoint
-
isLocked
public boolean isLocked()
Checks whether this point object is locked.- Returns:
- true, if the point is locked and therefore immutable, false otherwise.
-
getLockedInstance
public StrictPoint getLockedInstance()
Returns a copy of this bounds object which cannot be modified anymore.- Returns:
- a locked copy.
-
getUnlockedInstance
public StrictPoint getUnlockedInstance()
Returns a copy of this bounds object which can be modified later.- Returns:
- an unlocked copy.
-
clone
public Object clone()
Returns a copy of this Point object. This method will never throw a 'CloneNotSupportedException'.
-
toString
public String toString()
Returns a string representation of these bounds.
-
equals
public boolean equals(Object o)
Checks whether the given object is a StrictPoint instance sharing the same coordinates as this point.
-
-