com.retek.commons.gui.event
Class REventAdaptor

java.lang.Object
  extended bycom.retek.commons.gui.event.REventAdaptor

public class REventAdaptor
extends java.lang.Object

This class is an Rcom Event adaptor to simplify the usage of REventListeners and Rcom Events. Other classes should declare and use the adaptor in order to send Rcom events (it is simply easier folks ;-)). This class is not thread-safe. If used across multiple threads, first obtain a lock on the object holding the adaptor before using.

Currently, an ArrayList is used to store the REventListeners. This is because only a handful of listeners are usually assigned to any one thing. In the future, if many REventListeners are being assigned to the same component, then the ArrayList should be converted to a plain array for performance reasons.

Retek Inc. Copyright (c) 2002


Constructor Summary
REventAdaptor()
          Returns new REventAdaptor object.
 
Method Summary
 void addREventListener(REventListener listener)
          Adds a REventListener to the REventListener list.
 void notifyREventListeners(RActionEvent event)
          Notifies all registered REventListeners that a RActionEvent has occured.
 void notifyREventListeners(RErrorEvent event)
          Notifies all registered REventListeners that a RErrorEvent has occured.
 void removeAllREventListeners()
          Removes all REventListeners from the REventListener list.
 void removeREventListener(REventListener listener)
          Removes a REventListener from the REventListener list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

REventAdaptor

public REventAdaptor()
Returns new REventAdaptor object.

Method Detail

addREventListener

public void addREventListener(REventListener listener)
Adds a REventListener to the REventListener list. This method does not allow duplicates.

Parameters:
listener - The REventListener to add.

removeREventListener

public void removeREventListener(REventListener listener)
Removes a REventListener from the REventListener list.

Parameters:
listener - The REventListener to add.

removeAllREventListeners

public void removeAllREventListeners()
Removes all REventListeners from the REventListener list.


notifyREventListeners

public void notifyREventListeners(RActionEvent event)
Notifies all registered REventListeners that a RActionEvent has occured.

Parameters:
event - The RActionEvent to notify Rcom Event Listeners with.

notifyREventListeners

public void notifyREventListeners(RErrorEvent event)
Notifies all registered REventListeners that a RErrorEvent has occured.

Parameters:
event - The RErrorEvent to notify REventListeners with.


Copyright © 2005 Retek Inc. All Rights Reserved. - Generated at Fri, 01/21/2005 14:25