|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jfree.layouting.util.geom.StrictBounds
public class StrictBounds
The StrictBounds class is a replacement for the Rectangle2D classes. This class uses integer mathematics instead of floating point values to achive a higher degree of stability.
| Constructor Summary | |
|---|---|
StrictBounds()
DefaultConstructor. |
|
StrictBounds(long x,
long y,
long width,
long height)
Creates a StrictBounds object with the given coordinates, width and height. |
|
| Method Summary | |
|---|---|
void |
add(StrictBounds bounds)
Adds the given bounds to this bounds instance. |
java.lang.Object |
clone()
Returns a copy of this bounds object. |
boolean |
contains(long x,
long y)
Checks, whether this rectangle contains the given point. |
static boolean |
contains(StrictBounds rect1,
StrictBounds rect2)
Checks, whether the given rectangle1 fully contains rectangle 2 (even if rectangle 2 has a height or width of zero!). |
StrictBounds |
createIntersection(StrictBounds bounds)
Intersects this rectangle with the given bounds. |
StrictBounds |
createUnion(StrictBounds bg)
Creates a union from this and the given rectangle. |
boolean |
equals(java.lang.Object o)
Checks, whether the given object is a StrictBounds instance convering the same area as these bounds. |
long |
getHeight()
Returns the height of the framing rectangle in micro points. |
StrictBounds |
getLockedInstance()
Returns a copy of this bounds object which cannot be modified anymore. |
StrictBounds |
getUnlockedInstance()
Returns a copy of this bounds object which can be modified later. |
long |
getWidth()
Returns the width of the framing rectangle in micro points. |
long |
getX()
Returns the X coordinate of the upper left corner of the framing rectangle in micro points. |
long |
getY()
Returns the Y coordinate of the upper left corner of the framing rectangle in micro points. |
int |
hashCode()
Computes the hashcode for this rectangle. |
static boolean |
intersects(StrictBounds rect1,
StrictBounds rect2)
Checks, whether the given rectangle1 fully contains rectangle 2 (even if rectangle 2 has a height or width of zero!). |
boolean |
isEmpty()
Determines whether the RectangularShape is empty. |
boolean |
isLocked()
Checks, whether this bounds object is locked. |
void |
setRect(long x,
long y,
long w,
long h)
Sets the location and size of this StrictBounds to the specified double
values. |
java.lang.String |
toString()
Returns a string representation of these bounds. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StrictBounds()
public StrictBounds(long x,
long y,
long width,
long height)
x - the x-coordinatey - the y-coordinatewidth - the width of the rectangleheight - the height of the rectangle| Method Detail |
|---|
public boolean isLocked()
public StrictBounds getLockedInstance()
public StrictBounds getUnlockedInstance()
public void setRect(long x,
long y,
long w,
long h)
StrictBounds to the specified double
values.
x - the coordinates to which to set the location of the upper left corner of
this StrictBoundsy - the coordinates to which to set the location of the upper left corner of
this StrictBoundsw - the value to use to set the width of this StrictBoundsh - the value to use to set the height of this StrictBoundspublic long getHeight()
public long getWidth()
public long getX()
public long getY()
public boolean isEmpty()
RectangularShape is empty. When the
RectangularShape is empty, it encloses no area.
true if the RectangularShape is empty;
false otherwise.public java.lang.Object clone()
clone in class java.lang.Object
public boolean contains(long x,
long y)
x - the x-coordinate of the point.y - the y-coordinate of the point.
public static boolean intersects(StrictBounds rect1,
StrictBounds rect2)
rect1 - the first rectangle.rect2 - the second rectangle.
public void add(StrictBounds bounds)
bounds - the rectangle that should be added.public StrictBounds createIntersection(StrictBounds bounds)
bounds - the other rectangle.
public static boolean contains(StrictBounds rect1,
StrictBounds rect2)
rect1 - the first rectangle.rect2 - the second rectangle.
public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - the other object.
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic StrictBounds createUnion(StrictBounds bg)
bg - the other rectangle.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||