org.jfree.layouting.util.geom

Class StrictPoint

public class StrictPoint extends Object implements Serializable, Cloneable

A StrictPoint class represents a coordinate in the report layout. It is similiar to the java.awt.geom.Point2D class, but uses micro-points instead of doubles.

Author: Thomas Morgner

Constructor Summary
StrictPoint()
DefaultConstructor.
StrictPoint(long x, long y)
Creates a StrictBounds object with the given coordinates, width and height.
Method Summary
Objectclone()
Returns a copy of this Point object.
booleanequals(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 this StrictPoint in micro points.
longgetY()
Returns the Y coordinate of this StrictPoint in 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 this StrictPoint to the specified coordinates.
StringtoString()
Returns a string representation of these bounds.

Constructor Detail

StrictPoint

public StrictPoint()
DefaultConstructor.

StrictPoint

public StrictPoint(long x, long y)
Creates a StrictBounds object with the given coordinates, width and height.

Parameters: x the x-coordinate y the y-coordinate

Method Detail

clone

public Object clone()
Returns a copy of this Point object. This method will never throw a 'CloneNotSupportedException'.

Returns: the cloned instance.

equals

public boolean equals(Object o)
Checks, whether the given object is a StrictPoint instance sharing the same coordinates as this point.

Parameters: o the other object.

Returns: true, if the other object is equal to this object, 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.

getX

public long getX()
Returns the X coordinate of this StrictPoint in micro points.

Returns: the X coordinate of this StrictPoint.

getY

public long getY()
Returns the Y coordinate of this StrictPoint in micro points.

Returns: the Y coordinate of this StrictPoint.

hashCode

public int hashCode()
Computes the hashcode for this point.

Returns: the computed hashcode.

isLocked

public boolean isLocked()
Checks, whether this point object is locked.

Returns: true, if the point is locked and therefore immutable, false otherwise.

setLocation

public void setLocation(long x, long y)
Sets the location of this StrictPoint to the specified coordinates.

Parameters: x the coordinates of this StrictPoint y the coordinates of this StrictPoint

toString

public String toString()
Returns a string representation of these bounds.

Returns: the string representing this object.