public class EventLinkRecord
extends java.lang.Object
Constructor and Description |
---|
EventLinkRecord(java.lang.Class eventType)
Create an EventLinkRecord for storing links for a particular event class.
|
Modifier and Type | Method and Description |
---|---|
void |
addLink(java.lang.Object target,
java.lang.reflect.Method method)
Add a new target to be notified of events of this type.
|
void |
dispatchEvent(java.lang.Object event)
Send an event to every target which has been added to this record.
|
java.lang.Class |
getEventType()
Get the event class for this record.
|
void |
removeLink(java.lang.Object target)
Remove an object from the list of targets to be notified of events of this type.
|
public EventLinkRecord(java.lang.Class eventType)
public java.lang.Class getEventType()
public void addLink(java.lang.Object target, java.lang.reflect.Method method)
target
- the target object to be notified of eventsmethod
- the method to be invoked on the target when events occurpublic void removeLink(java.lang.Object target)
target
- the target object to removepublic void dispatchEvent(java.lang.Object event)
Written by Peter Eastman.