Package org.jfree.layouting.util.geom
Class StrictPoint
- java.lang.Object
-
- org.jfree.layouting.util.geom.StrictPoint
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public class StrictPoint extends java.lang.Object implements java.io.Serializable, java.lang.CloneableA StrictPoint class represents a coordinate in the report layout. It is similiar to thePoint2Dclass, 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 java.lang.Objectclone()Returns a copy of this Point object.booleanequals(java.lang.Object o)Checks, whether the given object is a StrictPoint instance sharing the same coordinates as this point.StrictPointgetLockedInstance()Returns a copy of this bounds object which cannot be modified anymore.StrictPointgetUnlockedInstance()Returns a copy of this bounds object which can be modified later.longgetX()Returns the X coordinate of thisStrictPointin micro points.longgetY()Returns the Y coordinate of thisStrictPointin micro points.inthashCode()Computes the hashcode for this point.booleanisLocked()Checks, whether this point object is locked.voidsetLocation(long x, long y)Sets the location of thisStrictPointto the specified coordinates.java.lang.StringtoString()Returns a string representation of these bounds.
-
-
-
Method Detail
-
getX
public long getX()
Returns the X coordinate of thisStrictPointin micro points.- Returns:
- the X coordinate of this
StrictPoint.
-
getY
public long getY()
Returns the Y coordinate of thisStrictPointin micro points.- Returns:
- the Y coordinate of this
StrictPoint.
-
setLocation
public void setLocation(long x, long y)Sets the location of thisStrictPointto the specified coordinates.- Parameters:
x- the coordinates of thisStrictPointy- 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 java.lang.Object clone()
Returns a copy of this Point object. This method will never throw a 'CloneNotSupportedException'.- Overrides:
clonein classjava.lang.Object- Returns:
- the cloned instance.
-
toString
public java.lang.String toString()
Returns a string representation of these bounds.- Overrides:
toStringin classjava.lang.Object- Returns:
- the string representing this object.
-
equals
public boolean equals(java.lang.Object o)
Checks, whether the given object is a StrictPoint instance sharing the same coordinates as this point.- Overrides:
equalsin classjava.lang.Object- Parameters:
o- the other object.- Returns:
- true, if the other object is equal to this object, false otherwise.
-
hashCode
public int hashCode()
Computes the hashcode for this point.- Overrides:
hashCodein classjava.lang.Object- Returns:
- the computed hashcode.
-
-