| 
 | JavaTM Platform Standard Ed. 6 | |||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjava.beans.FeatureDescriptor
java.beans.EventSetDescriptor
public class EventSetDescriptor
描述给定 Java bean 激发的一组事件的 EventSetDescriptor。
给定的事件组都是作为方法调用在单个事件侦听器接口上传递的,事件侦听器对象可以通过调用事件源提供的注册方法进行注册。
| 构造方法摘要 | |
|---|---|
| EventSetDescriptor(Class<?> sourceClass,
                   String eventSetName,
                   Class<?> listenerType,
                   String listenerMethodName)假定按照最简单的标准设计模式创建 EventSetDescriptor,其中指定事件 "fred" 是 (1) 作为接口 FredListener 的单个方法上的调用传递的;(2) 它有一个 FredEvent 类型的参数;(3) 其中 FredListener 可以通过调用源组件的 addFredListener 方法注册,并通过调用 removeFredListener 方法移除。 | |
| EventSetDescriptor(Class<?> sourceClass,
                   String eventSetName,
                   Class<?> listenerType,
                   String[] listenerMethodNames,
                   String addListenerMethodName,
                   String removeListenerMethodName)使用字符串名称从头开始创建 EventSetDescriptor。 | |
| EventSetDescriptor(Class<?> sourceClass,
                   String eventSetName,
                   Class<?> listenerType,
                   String[] listenerMethodNames,
                   String addListenerMethodName,
                   String removeListenerMethodName,
                   String getListenerMethodName)此构造方法使用字符串名称从头开始创建 EventSetDescriptor。 | |
| EventSetDescriptor(String eventSetName,
                   Class<?> listenerType,
                   Method[] listenerMethods,
                   Method addListenerMethod,
                   Method removeListenerMethod)使用 java.lang.reflect.Method 和 java.lang.Class 对象从头开始创建 EventSetDescriptor。 | |
| EventSetDescriptor(String eventSetName,
                   Class<?> listenerType,
                   Method[] listenerMethods,
                   Method addListenerMethod,
                   Method removeListenerMethod,
                   Method getListenerMethod)此构造方法使用 java.lang.reflect.Method 和 java.lang.Class 对象从头开始创建 EventSetDescriptor。 | |
| EventSetDescriptor(String eventSetName,
                   Class<?> listenerType,
                   MethodDescriptor[] listenerMethodDescriptors,
                   Method addListenerMethod,
                   Method removeListenerMethod)使用 java.lang.reflect.MethodDescriptor 和 java.lang.Class 对象从头开始创建 EventSetDescriptor。 | |
| 方法摘要 | |
|---|---|
|  Method | getAddListenerMethod()获得用来添加事件侦听器的方法。 | 
|  Method | getGetListenerMethod()获得用来访问已注册事件侦听器的方法。 | 
|  MethodDescriptor[] | getListenerMethodDescriptors()获得目标侦听器接口的 MethodDescriptor。 | 
|  Method[] | getListenerMethods()获得目标侦听器接口的方法。 | 
|  Class<?> | getListenerType()获得目标接口的 Class 对象。 | 
|  Method | getRemoveListenerMethod()获得用来移除事件侦听器的方法。 | 
|  boolean | isInDefaultEventSet()报告事件集是否在“默认”集合中。 | 
|  boolean | isUnicast()通常事件源是多播的。 | 
|  void | setInDefaultEventSet(boolean inDefaultEventSet)将事件集标记为“默认”集合(或非默认集合)。 | 
|  void | setUnicast(boolean unicast)将事件集标记为单播(或非单播)。 | 
| 从类 java.beans.FeatureDescriptor 继承的方法 | 
|---|
| attributeNames, getDisplayName, getName, getShortDescription, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription, setValue | 
| 从类 java.lang.Object 继承的方法 | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| 构造方法详细信息 | 
|---|
public EventSetDescriptor(Class<?> sourceClass,
                          String eventSetName,
                          Class<?> listenerType,
                          String listenerMethodName)
                   throws IntrospectionException
sourceClass - 激发事件的类。eventSetName - 事件的编程名称。例如 "fred"。注意,此参数通常应该以小写字母开头。listenerType - 事件将被传递到的目标接口。listenerMethodName - 事件传递到其目标侦听器接口时调用的方法。
IntrospectionException - 如果在内省期间发生异常。
public EventSetDescriptor(Class<?> sourceClass,
                          String eventSetName,
                          Class<?> listenerType,
                          String[] listenerMethodNames,
                          String addListenerMethodName,
                          String removeListenerMethodName)
                   throws IntrospectionException
sourceClass - 激发事件的类。eventSetName - 事件集的编程名称。注意,此参数通常应该以小写字母开头。listenerType - 事件将被传递到的目标接口的 Class。listenerMethodNames - 事件传递到其目标侦听器接口时调用的方法的名称。addListenerMethodName - 可用来注册事件侦听器对象的事件源上的方法名称。removeListenerMethodName - 可用来取消注册事件侦听器对象的事件源上的方法名称。
IntrospectionException - 如果在内省期间发生异常。
public EventSetDescriptor(Class<?> sourceClass,
                          String eventSetName,
                          Class<?> listenerType,
                          String[] listenerMethodNames,
                          String addListenerMethodName,
                          String removeListenerMethodName,
                          String getListenerMethodName)
                   throws IntrospectionException
sourceClass - 激发事件的类。eventSetName - 事件集的编程名称。注意,此参数通常应该以小写字母开头。listenerType - 事件将被传递到的目标接口的 Class。listenerMethodNames - 事件传递到其目标侦听器接口时调用的方法的名称。addListenerMethodName - 可用来注册事件侦听器对象的事件源上的方法名称。removeListenerMethodName - 可用来取消注册事件侦听器对象的事件源上的方法名称。getListenerMethodName - 可用来访问事件侦听器对象数组的事件源上的方法。
IntrospectionException - 如果在内省期间发生异常。
public EventSetDescriptor(String eventSetName,
                          Class<?> listenerType,
                          Method[] listenerMethods,
                          Method addListenerMethod,
                          Method removeListenerMethod)
                   throws IntrospectionException
eventSetName - 事件集的编程名称。listenerType - 侦听器接口的 Class。listenerMethods - 描述处理目标侦听器中方法的每个事件的 Method 对象数组。addListenerMethod - 可用来注册事件侦听器对象的事件源上的方法。removeListenerMethod - 可用来取消注册事件侦听器对象的事件源上的方法。
IntrospectionException - 如果在内省期间发生异常。
public EventSetDescriptor(String eventSetName,
                          Class<?> listenerType,
                          Method[] listenerMethods,
                          Method addListenerMethod,
                          Method removeListenerMethod,
                          Method getListenerMethod)
                   throws IntrospectionException
eventSetName - 事件集的编程名称。listenerType - 侦听器接口的 Class。listenerMethods - 描述处理目标侦听器中方法的每个事件的 Method 对象数组。addListenerMethod - 可用来注册事件侦听器对象的事件源上的方法。removeListenerMethod - 可用来取消注册事件侦听器对象的事件源上的方法。getListenerMethod - 可用来访问事件侦听器对象数组的事件源上的方法。
IntrospectionException - 如果在内省期间发生异常。
public EventSetDescriptor(String eventSetName,
                          Class<?> listenerType,
                          MethodDescriptor[] listenerMethodDescriptors,
                          Method addListenerMethod,
                          Method removeListenerMethod)
                   throws IntrospectionException
eventSetName - 事件集的编程名称。listenerType - 侦听器接口的 Class。listenerMethodDescriptors - 描述处理目标侦听器中方法的每个事件的 MethodDescriptor 对象数组。addListenerMethod - 可用来注册事件侦听器对象的事件源上的方法。removeListenerMethod - 可用来取消注册事件侦听器对象的事件源上的方法。
IntrospectionException - 如果在内省期间发生异常。| 方法详细信息 | 
|---|
public Class<?> getListenerType()
public Method[] getListenerMethods()
public MethodDescriptor[] getListenerMethodDescriptors()
MethodDescriptor。
MethodDescriptor 对象数组。public Method getAddListenerMethod()
public Method getRemoveListenerMethod()
public Method getGetListenerMethod()
public void setUnicast(boolean unicast)
unicast - 如果事件集是单播的,则该参数为 true。public boolean isUnicast()
public void setInDefaultEventSet(boolean inDefaultEventSet)
inDefaultEventSet - 如果事件集在“默认”集合中,则该参数为 true,否则为 falsepublic boolean isInDefaultEventSet()
| 
 | JavaTM Platform Standard Ed. 6 | |||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。