buoy.internal

Class 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(Class eventType)
Create an EventLinkRecord for storing links for a particular event class.

Method Summary

void
addLink(Object target, Method method)
Add a new target to be notified of events of this type.
void
dispatchEvent(Object event)
Send an event to every target which has been added to this record.
Class
getEventType()
Get the event class for this record.
void
removeLink(Object target)
Remove an object from the list of targets to be notified of events of this type.

Constructor Details

EventLinkRecord

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

Method Details

addLink

public void addLink(Object target,
                    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

dispatchEvent

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

getEventType

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

removeLink

public void removeLink(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

Written by Peter Eastman.