|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jdraw.GraphicObjectManager
A repository for graphic objects.
Field Summary | |
private ArrayList |
graphic_objects
The collection containing the graphic objects. |
private int |
SQUARED_DISTANCE_THRESHOLD
The squared distance thresold, used to find the closest object. |
Constructor Summary | |
GraphicObjectManager()
Creates a new empty GraphicObjectManager object. |
|
GraphicObjectManager(GraphicObject[] graphic_objects)
Creates a new GraphicObjectManager object, with the specified GraphicObject s. |
Method Summary | |
void |
add(GraphicObject graphic_object)
Adds the specified graphic object to the list of managed objects. |
GraphicObject |
getClosestObject(Point point)
Returns the closest object to the specified point, with respect to distance thresold. |
int |
getDistanceThresold()
Returns the distance thresold used to find closest objects. |
Iterator |
iterator()
Returns an iterator over the graphic objects managed. |
boolean |
remove(GraphicObject graphic_object)
Removes the specified graphic object to the list of managed objects. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final int SQUARED_DISTANCE_THRESHOLD
private final ArrayList graphic_objects
Constructor Detail |
public GraphicObjectManager()
GraphicObjectManager
object.
public GraphicObjectManager(GraphicObject[] graphic_objects)
GraphicObjectManager
object, with the specified GraphicObject
s.
Method Detail |
public void add(GraphicObject graphic_object)
public GraphicObject getClosestObject(Point point)
public int getDistanceThresold()
public Iterator iterator()
public boolean remove(GraphicObject graphic_object)
true
if the specified object where present and removed.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |