API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.beans. EventHandler View Source
Author(s)
Mark Davidson
Philip Milne
Hans Muller
Since
1.4
Version
1.21, 05/23/06
Serial
Hierarchy
 Object
      EventHandler
Implements
 InvocationHandler
Subclasses
Description
public class EventHandler
  The EventHandler class provides support for dynamically generating event listeners whose methods execute a simple statement involving an incoming event object and a target object.
See also:    Proxy EventObject
Constructors
public EventHandler (Object target, String action, String eventPropertyName, String listenerMethodName)
  Creates a new EventHandler object; you generally use one of the create methods instead of invoking this constructor directly.
Methods
Hide/Show inherited methods
publicstatic T create (Class< T> listenerInterface, Object target, String action)
  Creates an implementation of listenerInterface in which all of the methods in the listener interface apply the handler's action to the target.
publicstatic T create (Class< T> listenerInterface, Object target, String action, String eventPropertyName)
  /** Creates an implementation of listenerInterface in which all of the methods pass the value of the event expression, eventPropertyName, to the final method in the statement, action, which is applied to the target.
publicstatic T create (Class< T> listenerInterface, Object target, String action, String eventPropertyName, String listenerMethodName)
  Creates an implementation of listenerInterface in which the method named listenerMethodName passes the value of the event expression, eventPropertyName, to the final method in the statement, action, which is applied to the target.
public String getAction ()
  Returns the name of the target's writable property that this event handler will set, or the name of the method that this event handler will invoke on the target.
public String getEventPropertyName ()
  Returns the property of the event that should be used in the action applied to the target.
public String getListenerMethodName ()
  Returns the name of the method that will trigger the action.
public Object getTarget ()
  Returns the object to which this event handler will send a message.
public Object invoke (Object proxy, Method method, Object arguments) [Specified in InvocationHandler]
  Extract the appropriate property value from the event and pass it to the action associated with this EventHandler.
Fields
Hide/Show inherited fields
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar