|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jdraw.GraphicalObjectManager
A repository for graphical objects.
Field Summary | |
private int |
iDistanceSquareThresold
The squared distance thresold, used to find closest object. |
private ArrayList |
lstObjects
The collection containing the graphical objects. |
private ArrayList |
lstPropertyChangeListeners
|
private PropertyChangeListener |
pplPropertyChangeListener
The shared listener for bounding box events. |
private Rectangle |
rectInitialBoundingBox
|
Constructor Summary | |
GraphicalObjectManager()
Creates a new empty GraphicalObjectManager object. |
|
GraphicalObjectManager(GraphicalObject[] graphical_objects)
Creates a new GraphicalObjectManager object, with the specified GraphicalObject s. |
Method Summary | |
void |
add(GraphicalObject grobjObject)
Adds the specified graphical object to the list of managed objects. |
void |
addPropertyChangeListener(PropertyChangeListener pplListener)
Adds a BoudingBoxListener to this graphical object. |
protected void |
fireBoudingBoxChange(PropertyChangeEvent ppe)
Fires the specified PropertyChangedEvent. |
GraphicalObject |
getClosestObject(Point ptPoint)
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 graphical objects managed. |
boolean |
remove(GraphicalObject grobjObject)
Removes the specified graphical object to the list of managed objects. |
void |
removePropertyChangeListener(PropertyChangeListener pplListener)
Removes a BoudingBoxListener from this graphical object. |
void |
setDistanceThresold(int iNewDistanceThresold)
Sets the distance thresold used to find closest objects. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private int iDistanceSquareThresold
private final ArrayList lstObjects
private final PropertyChangeListener pplPropertyChangeListener
private final ArrayList lstPropertyChangeListeners
private Rectangle rectInitialBoundingBox
Constructor Detail |
public GraphicalObjectManager()
GraphicalObjectManager
object.public GraphicalObjectManager(GraphicalObject[] graphical_objects)
GraphicalObjectManager
object, with the specified GraphicalObject
s.Method Detail |
public void add(GraphicalObject grobjObject)
public GraphicalObject getClosestObject(Point ptPoint)
public int getDistanceThresold()
public Iterator iterator()
public boolean remove(GraphicalObject grobjObject)
public void setDistanceThresold(int iNewDistanceThresold)
public void addPropertyChangeListener(PropertyChangeListener pplListener)
public void removePropertyChangeListener(PropertyChangeListener pplListener)
protected void fireBoudingBoxChange(PropertyChangeEvent ppe)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |