| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static < the event listener type. L> void | addEventListener(final Object
the event source. eventSource, final Class<L> the event listener type. listenerType, final L the listener. listener)Adds an event listener to the specified source. |
| public static < the event listener type. L> void | bindEventsToMethod(final Object
the target object. target, final String the name of the method to be called. methodName, final Object the object which is generating events (JButton, JList, etc.). eventSource, final Class<L> the listener interface (ActionListener.class, SelectionListener.class, etc.). listenerType, final String... the event types (method names) from the listener interface (if none specified, all will be
supported). eventTypes)Binds an event listener to a specific method on a specific object. |
| EventUtils | back to summary |
|---|---|
| public EventUtils()
Deprecated TODO Make private in 4.0. Make private in 4.0.
| |
| addEventListener | back to summary |
|---|---|
| public static <L> void addEventListener(final Object eventSource, final Class<L> listenerType, final L listener) Adds an event listener to the specified source. This looks for an "add" method corresponding to the event type (addActionListener, for example).
| |
| bindEventsToMethod | back to summary |
|---|---|
| public static <L> void bindEventsToMethod(final Object target, final String methodName, final Object eventSource, final Class<L> listenerType, final String... eventTypes) Binds an event listener to a specific method on a specific object.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Set | |
| private final String | |
| private final Object |
| Access | Constructor and Description |
|---|---|
| pack-priv | EventBindingInvocationHandler(final Object
the target object for method invocations. target, final String the name of the method to be invoked. methodName, final String[] the names of the supported event types. eventTypes)Creates a new instance of |
| Modifier and Type | Method and Description |
|---|---|
| private boolean | Returns: a flag whether the parameters could be matched.the listener method invoked. method)Checks whether a method for the passed in parameters can be found. |
| public Object | Returns: the result of the method call.the proxy instance. proxy, final Method the method to be invoked. method, final Object[] the parameters for the method invocation. parameters)Implements java. Handles a method invocation on the proxy object. |
| eventTypes | back to summary |
|---|---|
| private final Set<String> eventTypes | |
| methodName | back to summary |
|---|---|
| private final String methodName | |
| target | back to summary |
|---|---|
| private final Object target | |
| EventBindingInvocationHandler | back to summary |
|---|---|
| pack-priv EventBindingInvocationHandler(final Object target, final String methodName, final String[] eventTypes) Creates a new instance of | |
| hasMatchingParametersMethod | back to summary |
|---|---|
| private boolean hasMatchingParametersMethod(final Method method) Checks whether a method for the passed in parameters can be found.
| |
| invoke | back to summary |
|---|---|
| public Object invoke(final Object proxy, final Method method, final Object[] parameters) throws Throwable Implements java. Handles a method invocation on the proxy object.
| |