Constructor and Description |
---|
FigListenerRegistry()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(Doodle iDoodle,
ListenerType iListener)
Attaches listener to shape.
|
Iterator<ListenerType> |
getListeners(Doodle iShape)
Returns listeners for shape.
|
void |
removeListener(Doodle iDoodle,
ListenerType iListener)
Detaches listener from shape.
|
void |
removeListeners(Doodle iShape)
Detaches all listeners from shape.
|
public FigListenerRegistry()
Details: This constructor initializes an empty registry.
public void addListener(Doodle iDoodle, ListenerType iListener)
Details:
This method binds the given Doodle
to the given listener.
iDoodle
- the shapeiListener
- the listener#removeListener(Doodle, FigMouseListener)
public void removeListener(Doodle iDoodle, ListenerType iListener)
Details: This method disassociates the given listener from the given shape. If the given shape is not associated with the given listener, no action is taken.
iDoodle
- the shapeiListener
- the listener#addListener(Doodle, FigMouseListener)
public void removeListeners(Doodle iShape)
Details: This method removes all of the listeners associated with the given shape. If the given shape is not associated with and listeners, no action is taken.
iShape
- public Iterator<ListenerType> getListeners(Doodle iShape)
Details:
This method returns the listeners bound to the given shape.
If the shape has no listeners, null
is returned.
iShape
- the shapeCopyright © 2013. All Rights Reserved.