|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectExplicitBoundsShape
public class ExplicitBoundsShape
Decorator on top of the Shape. It extends the Shape interface to include a method
'setBounds' for explicitly defining a bounding box (which is not necessarily associated with the
actual shape's bounds).
| Constructor Summary | |
|---|---|
ExplicitBoundsShape(Shape shape)
The Constructor |
|
| Method Summary | |
|---|---|
boolean |
contains(double x,
double y)
|
boolean |
contains(double x,
double y,
double w,
double h)
|
boolean |
contains(Point2D p)
|
boolean |
contains(Rectangle2D r)
|
boolean |
equals(Object obj)
|
Rectangle |
getBounds()
Returns the explicitly defined bounds for this shape. |
Rectangle2D |
getBounds2D()
Returns the explicitly defined bounds for this shape. |
PathIterator |
getPathIterator(AffineTransform at)
|
PathIterator |
getPathIterator(AffineTransform at,
double flatness)
|
int |
hashCode()
|
boolean |
intersects(double x,
double y,
double w,
double h)
|
boolean |
intersects(Rectangle2D r)
|
void |
setBounds(Rectangle2D bounds)
Sets the explicitly defined bounds for this shape. |
| Methods inherited from class Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExplicitBoundsShape(Shape shape)
shape - The actual shape on top of which this decorator will stand.| Method Detail |
|---|
public void setBounds(Rectangle2D bounds)
bounds -
public boolean contains(double x,
double y,
double w,
double h)
contains in interface Shape
public boolean contains(double x,
double y)
contains in interface Shapepublic boolean contains(Point2D p)
contains in interface Shapepublic boolean contains(Rectangle2D r)
contains in interface Shapepublic Rectangle getBounds()
getBounds in interface ShapeShapepublic Rectangle2D getBounds2D()
getBounds2D in interface ShapeShape
public PathIterator getPathIterator(AffineTransform at,
double flatness)
getPathIterator in interface Shapepublic PathIterator getPathIterator(AffineTransform at)
getPathIterator in interface Shape
public boolean intersects(double x,
double y,
double w,
double h)
intersects in interface Shapepublic boolean intersects(Rectangle2D r)
intersects in interface Shapepublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||