org.jdrawing.event
Class DrawingModelEvent
java.lang.Object
java.util.EventObject
org.jdrawing.event.DrawingModelEvent
- All Implemented Interfaces:
- java.io.Serializable
- public class DrawingModelEvent
- extends java.util.EventObject
Encapsulates information describing changes to a drawing model,
and used to notify drawing model listeners of the changes.
- See Also:
- Serialized Form
Fields inherited from class java.util.EventObject |
source |
Constructor Summary |
DrawingModelEvent(java.lang.Object source)
Used to create an event when the model has changed in some way. |
DrawingModelEvent(java.lang.Object source,
java.lang.Object[] elements)
Used to create an event when some elements of the model have been
changed, inserted or removed. |
Method Summary |
java.lang.Object[] |
getElements()
Returns the elements. |
Methods inherited from class java.util.EventObject |
getSource, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DrawingModelEvent
public DrawingModelEvent(java.lang.Object source)
- Used to create an event when the model has changed in some way.
- Parameters:
source
- the Object responsible for generating the event
(typically the creator of the event object passes this for its value)
DrawingModelEvent
public DrawingModelEvent(java.lang.Object source,
java.lang.Object[] elements)
- Used to create an event when some elements of the model have been
changed, inserted or removed.
- Parameters:
source
- the Object responsible for generating the event
(typically the creator of the event object passes this for its value)elements
- an array of Object containing the inserted, removed,
or changed elements
getElements
public java.lang.Object[] getElements()
- Returns the elements. If this is a removal event the returned objects
are no longer elements of the model.
- Returns:
- an array of Object containing the elements specified by the event