org.apache.beehive.controls.runtime.packaging
Class ControlEventSetDescriptor
Object
FeatureDescriptor
EventSetDescriptor
ControlEventSetDescriptor
public class ControlEventSetDescriptor
- extends EventSetDescriptor
The ControlEventSetDescriptor is a result of an infortunate evoluntary flaw in the
java.beans.EventSetDescriptor class. The getListeners functionality for event sets was
added after the initial implementation, and unfortunately, there is no constructor that
let you specify both the MethodDescriptors for events and the getListener
method. To compensate for this, we must subclass and provide our own getGetListenerMethod
implementation.
Constructor Summary |
ControlEventSetDescriptor(String eventSetName,
Class<?> listenerType,
MethodDescriptor[] listenerMethodDescriptors,
Method addListenerMethod,
Method removeListenerMethod,
Method getListenerMethod)
This constructor adds the getListenerMethod argument that is missing from the JDK! |
Method Summary |
Method |
getGetListenerMethod()
Override the default implementation of getGetListenerMethod to return the method
provided in the constructor. |
Methods inherited from class EventSetDescriptor |
getAddListenerMethod, getListenerMethodDescriptors, getListenerMethods, getListenerType, getRemoveListenerMethod, isInDefaultEventSet, isUnicast, setInDefaultEventSet, setUnicast |
Methods inherited from class FeatureDescriptor |
attributeNames, getDisplayName, getName, getShortDescription, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription, setValue |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ControlEventSetDescriptor
public ControlEventSetDescriptor(String eventSetName,
Class<?> listenerType,
MethodDescriptor[] listenerMethodDescriptors,
Method addListenerMethod,
Method removeListenerMethod,
Method getListenerMethod)
throws IntrospectionException
- This constructor adds the getListenerMethod argument that is missing from the JDK!
- Throws:
IntrospectionException
getGetListenerMethod
public Method getGetListenerMethod()
- Override the default implementation of getGetListenerMethod to return the method
provided in the constructor.
- Overrides:
getGetListenerMethod
in class EventSetDescriptor