|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jdrawing.AbstractDrawingModel
This abstract class provides default implementations for most of
the methods in the DrawingModel interface. It takes
care of the management of listeners and provides some conveniences
for generating DrawingModelEvents and dispatching them
to the listeners
| Constructor Summary | |
AbstractDrawingModel()
|
|
| Method Summary | |
void |
addDrawingModelListener(DrawingModelListener listener)
Adds a listener which will be notified about changes in this model. |
protected void |
fireElementsAdded(java.lang.Object[] elements)
Notifies all listeners that elements have been inserted. |
protected void |
fireElementsChanged(java.lang.Object[] elements)
Notifies all listeners that elements have been changed. |
protected void |
fireElementsRemoved(java.lang.Object[] elements)
Notifies all listeners that elements have been removed. |
protected void |
fireModelChanged()
Notifies all listeners that the model has changed. |
DrawingModelListener[] |
getDrawingModelListeners()
Returns an array of all the drawing model listeners registered on this model. |
void |
removeDrawingModelListener(DrawingModelListener listener)
Removes a listener from the list that is notified about changes in this model. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jdrawing.DrawingModel |
elements, sortElements |
| Constructor Detail |
public AbstractDrawingModel()
| Method Detail |
public void addDrawingModelListener(DrawingModelListener listener)
DrawingModel
addDrawingModelListener in interface DrawingModellistener - the DrawingModelListenerpublic void removeDrawingModelListener(DrawingModelListener listener)
DrawingModelnull, this method does
nothing.
removeDrawingModelListener in interface DrawingModellistener - the DrawingModelListenerpublic DrawingModelListener[] getDrawingModelListeners()
DrawingModelListeners
or an empty array if no drawing model listeners are
currently registeredprotected void fireElementsAdded(java.lang.Object[] elements)
elements - an array of Object containing inserted elements
java.lang.IllegalArgumentException - if elements is nullprotected void fireElementsRemoved(java.lang.Object[] elements)
elements - an array of Object containing removed elements
java.lang.IllegalArgumentException - if elements is nullprotected void fireElementsChanged(java.lang.Object[] elements)
elements - an array of Object containing changed elements
java.lang.IllegalArgumentException - if elements is nullprotected void fireModelChanged()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||