java.beans.EventSetDescriptor (JDK 1.1)
An EventSetDescriptor object is a type of FeatureDescriptor that describes a single set of events supported by a Java bean. A "set" of events corresponds to the one or more methods supported by a single EventListener interface. The BeanInfo class for a Java bean optionally creates EventSetDescriptor objects to describe the event sets the bean supports. Typically, only application builders and similar tools use the get and is methods of EventSetDescriptor objects to obtain the event-set description information.
To create an EventSetDescriptor object, you must specify the class of the bean that supports the event set, the base name of the event set, the class of the EventListener interface that corresponds to the event set, and the methods within this interface that are invoked when particular events within the set occur. Optionally, you may also specify the methods of the bean class that are used to add and remove EventListener objects. The various constructors allow you to specify methods by name, as java.lang.reflect.Method objects, or as MethodDescriptor objects.
Once you have created an EventSetDescriptor, you can use setUnicast() to specify whether it represents a unicast event and setInDefaultEventSet() to specify whether the event set should be treated as the default event set by builder applications. The methods of the FeatureDescriptor superclass allow additional information about the property to be specified.
public classEventSetDescriptorextends FeatureDescriptor { //Public ConstructorspublicEventSetDescriptor(ClasssourceClass, StringeventSetName, ClasslistenerType, publicEventSetDescriptor'u'StringlistenerMethodName) throws IntrospectionException; publicEventSetDescriptor(ClasssourceClass, StringeventSetName, ClasslistenerType, publicEventSetDescriptor'u'String[]listenerMethodNames, StringaddListenerMethodNamepublicEventSetDescriptor'u'StringremoveListenerMethodName) throws IntrospectionException; publicEventSetDescriptor(StringeventSetName, ClasslistenerType, Method[]listenerMethods, publicEventSetDescriptor'u'MethodaddListenerMethod, MethodremoveListenerMethod) publicEventSetDescriptor'u'throws IntrospectionException; publicEventSetDescriptor(StringeventSetName, ClasslistenerType, publicEventSetDescriptor'u'MethodDescriptor[]listenerMethodDescriptors, MethodaddListenerMethod, publicEventSetDescriptor'u'MethodremoveListenerMethod) throws IntrospectionException; //Public Instance Methodspublic MethodgetAddListenerMethod(); public MethodDescriptor[]getListenerMethodDescriptors(); public Method[]getListenerMethods(); public ClassgetListenerType(); public MethodgetRemoveListenerMethod(); public booleanisInDefaultEventSet(); public booleanisUnicast(); public voidsetInDefaultEventSet(booleaninDefaultEventSet); public voidsetUnicast(booleanunicast); }
Hierarchy:
Object->FeatureDescriptor->EventSetDescriptor
Returned By:
BeanInfo.getEventSetDescriptors(), SimpleBeanInfo.getEventSetDescriptors()