buoy.internal
Class EventLinkRecord

java.lang.Object
  extended by buoy.internal.EventLinkRecord

public class EventLinkRecord
extends java.lang.Object

This class stores a list of methods to be invoked whenever an Event of a particular class is generated by a Widget.

Author:
Peter Eastman

Constructor Summary
EventLinkRecord(java.lang.Class eventType)
          Create an EventLinkRecord for storing links for a particular event class.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventLinkRecord

public EventLinkRecord(java.lang.Class eventType)
Create an EventLinkRecord for storing links for a particular event class.

Method Detail

getEventType

public java.lang.Class getEventType()
Get the event class for this record.


addLink

public void addLink(java.lang.Object target,
                    java.lang.reflect.Method method)
Add a new target to be notified of events of this type.

Parameters:
target - the target object to be notified of events
method - the method to be invoked on the target when events occur

removeLink

public void removeLink(java.lang.Object target)
Remove an object from the list of targets to be notified of events of this type.

Parameters:
target - the target object to remove

dispatchEvent

public void dispatchEvent(java.lang.Object event)
Send an event to every target which has been added to this record.



Written by Peter Eastman.