| org.millstone.base.event.MethodEventSource
All known Subclasses: org.millstone.base.ui.AbstractComponent, org.millstone.base.event.EventRouter,
MethodEventSource | public interface MethodEventSource (Code) | | Interface for classes supporting registeration of methods as event
receivers.
For more information on the MillStone inheritable event mechanism
see the
org.millstone.base.event org.millstone.base.event package documentation .
author: IT Mill Ltd. version: 3.1.1 since: 3.0 |
Method Summary | |
public void | addListener(Class eventType, Object object, Method method) Registers a new event listener with the specified activation
method to listen events generated by this component. | public void | addListener(Class eventType, Object object, String methodName) Registers a new listener with the specified activation method to
listen events generated by this component. | public void | removeListener(Class eventType, Object target) Removes all registered listeners matching the given parameters. | public void | removeListener(Class eventType, Object target, Method method) Removes one registered listener method. | public void | removeListener(Class eventType, Object target, String methodName) Removes one registered listener method. |
addListener | public void addListener(Class eventType, Object object, Method method)(Code) | | Registers a new event listener with the specified activation
method to listen events generated by this component. If the
activation method does not have any arguments the event object will
not be passed to it when it's called.
For more information on the MillStone inheritable event mechanism
see the
org.millstone.base.event org.millstone.base.event package documentation .
Parameters: eventType - type of the listened event. Events of this type orits subclasses activate the listener. Parameters: object - the object instance who owns the activation method Parameters: method - the activation method throws: java.lang.IllegalArgumentException - unless method has exactly one match in object |
addListener | public void addListener(Class eventType, Object object, String methodName)(Code) | | Registers a new listener with the specified activation method to
listen events generated by this component. If the activation method
does not have any arguments the event object will not be passed to it
when it's called.
This version of addListener gets the name of the
activation method as a parameter. The actual method is reflected from
object , and unless exactly one match is found,
java.lang.IllegalArgumentException is thrown.
For more information on the MillStone inheritable event mechanism
see the
org.millstone.base.event org.millstone.base.event package documentation .
Parameters: eventType - type of the listened event. Events of this type orits subclasses activate the listener. Parameters: object - the object instance who owns the activation method Parameters: methodName - the name of the activation method throws: java.lang.IllegalArgumentException - unless method has exactly one match in object |
removeListener | public void removeListener(Class eventType, Object target)(Code) | | Removes all registered listeners matching the given parameters.
Since this method receives the event type and the listener object as
parameters, it will unregister all object 's methods that
are registered to listen to events of type eventType
generated by this component.
For more information on the MillStone inheritable event mechanism
see the
org.millstone.base.event org.millstone.base.event package documentation .
Parameters: eventType - exact event type the object listens to Parameters: target - target object that has registered to listen to eventsof type eventType with one or more methods |
removeListener | public void removeListener(Class eventType, Object target, Method method)(Code) | | Removes one registered listener method. The given method owned by
the given object will no longer be called when the specified events
are generated by this component.
For more information on the MillStone inheritable event mechanism
see the
org.millstone.base.event org.millstone.base.event package documentation .
Parameters: eventType - exact event type the object listens to Parameters: target - target object that has registered to listen to eventsof type eventType with one or more methods Parameters: method - the method owned by target that'sregistered to listen to events of type eventType |
removeListener | public void removeListener(Class eventType, Object target, String methodName)(Code) | | Removes one registered listener method. The given method owned by
the given object will no longer be called when the specified events
are generated by this component.
This version of removeListener gets the name of the
activation method as a parameter. The actual method is reflected from
target , and unless exactly one match is found,
java.lang.IllegalArgumentException is thrown.
For more information on the MillStone inheritable event mechanism
see the
org.millstone.base.event org.millstone.base.event package documentation .
Parameters: eventType - exact event type the object listens to Parameters: target - target object that has registered to listen to eventsof type eventType with one or more methods Parameters: methodName - name of the method owned by target that's registered to listen to events of type eventType |
|
|