org.apache.beehive.controls.api.events
Class EventDispatchHelper

Object
  extended by EventDispatchHelper
All Implemented Interfaces:
EventDispatcher

public class EventDispatchHelper
extends Object
implements EventDispatcher

The EventDispatchHelper class is a simple implementation of the EventDispatcher interface that is suitable for use inside the execution context of a control container. It assumes that you are already running inside the target container instance, and all that is required is the correct routing of the event to the correct control.


Constructor Summary
EventDispatchHelper()
           
 
Method Summary
 Object dispatchEvent(ControlHandle target, EventRef event, Object[] args)
          Dispatches a Control event to a target control.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventDispatchHelper

public EventDispatchHelper()
Method Detail

dispatchEvent

public Object dispatchEvent(ControlHandle target,
                            EventRef event,
                            Object[] args)
                     throws IllegalAccessException,
                            IllegalArgumentException,
                            InvocationTargetException
Description copied from interface: EventDispatcher
Dispatches a Control event to a target control.

Specified by:
dispatchEvent in interface EventDispatcher
Parameters:
target - the target control
event - the event to deliver to the control
args - the parameters to the control event
Throws:
IllegalAccessException - the underlying event method is not accessible due to access control.
IllegalArgumentException - the target is not valid, the event is not a valid event type for the requested target, or the argument types do not match the event signature.
InvocationTargetException - wraps any exception thrown by the underlying event handler.