⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 eventsetdescriptor.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="EventSetDescriptor(java.lang.Class, java.lang.String, java.lang.Class, java.lang.String)"><!-- --></A><H3>EventSetDescriptor</H3><PRE>public <B>EventSetDescriptor</B>(<A HREF="../../java/lang/Class.html">Class</A>&nbsp;sourceClass,                          <A HREF="../../java/lang/String.html">String</A>&nbsp;eventSetName,                          <A HREF="../../java/lang/Class.html">Class</A>&nbsp;listenerType,                          <A HREF="../../java/lang/String.html">String</A>&nbsp;listenerMethodName)                   throws <A HREF="../../java/beans/IntrospectionException.html">IntrospectionException</A></PRE><DL><DD>This constructor creates an EventSetDescriptor assuming that you are following the most simple standard design pattern where a named event "fred" is (1) delivered as a call on the single method of interface FredListener, (2) has a single argument of type FredEvent, and (3) where the FredListener may be registered with a call on an addFredListener method of the source component and removed with a call on a removeFredListener method.<DD><DL><DT><B>Parameters:</B><DD><CODE>sourceClass</CODE> - The class firing the event.<DD><CODE>eventSetName</CODE> - The programmatic name of the event.  E.g. "fred".		Note that this should normally start with a lower-case character.<DD><CODE>listenerType</CODE> - The target interface that events		will get delivered to.<DD><CODE>listenerMethodName</CODE> - The method that will get called when the event gets		delivered to its target listener interface.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/beans/IntrospectionException.html">IntrospectionException</A></CODE> - if an exception occurs during              introspection.</DL></DD></DL><HR><A NAME="EventSetDescriptor(java.lang.Class, java.lang.String, java.lang.Class, java.lang.String[], java.lang.String, java.lang.String)"><!-- --></A><H3>EventSetDescriptor</H3><PRE>public <B>EventSetDescriptor</B>(<A HREF="../../java/lang/Class.html">Class</A>&nbsp;sourceClass,                          <A HREF="../../java/lang/String.html">String</A>&nbsp;eventSetName,                          <A HREF="../../java/lang/Class.html">Class</A>&nbsp;listenerType,                          <A HREF="../../java/lang/String.html">String</A>[]&nbsp;listenerMethodNames,                          <A HREF="../../java/lang/String.html">String</A>&nbsp;addListenerMethodName,                          <A HREF="../../java/lang/String.html">String</A>&nbsp;removeListenerMethodName)                   throws <A HREF="../../java/beans/IntrospectionException.html">IntrospectionException</A></PRE><DL><DD>This constructor creates an EventSetDescriptor from scratch using string names.<DD><DL><DT><B>Parameters:</B><DD><CODE>sourceClass</CODE> - The class firing the event.<DD><CODE>eventSetName</CODE> - The programmatic name of the event set.		Note that this should normally start with a lower-case character.<DD><CODE>listenerType</CODE> - The Class of the target interface that events		will get delivered to.<DD><CODE>listenerMethodNames</CODE> - The names of the methods that will get called 		when the event gets delivered to its target listener interface.<DD><CODE>addListenerMethodName</CODE> - The name of the method on the event source		that can be used to register an event listener object.<DD><CODE>removeListenerMethodName</CODE> - The name of the method on the event source		that can be used to de-register an event listener object.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/beans/IntrospectionException.html">IntrospectionException</A></CODE> - if an exception occurs during              introspection.</DL></DD></DL><HR><A NAME="EventSetDescriptor(java.lang.String, java.lang.Class, java.lang.reflect.Method[], java.lang.reflect.Method, java.lang.reflect.Method)"><!-- --></A><H3>EventSetDescriptor</H3><PRE>public <B>EventSetDescriptor</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;eventSetName,                          <A HREF="../../java/lang/Class.html">Class</A>&nbsp;listenerType,                          <A HREF="../../java/lang/reflect/Method.html">Method</A>[]&nbsp;listenerMethods,                          <A HREF="../../java/lang/reflect/Method.html">Method</A>&nbsp;addListenerMethod,                          <A HREF="../../java/lang/reflect/Method.html">Method</A>&nbsp;removeListenerMethod)                   throws <A HREF="../../java/beans/IntrospectionException.html">IntrospectionException</A></PRE><DL><DD>This constructor creates an EventSetDescriptor from scratch using java.lang.reflect.Method and java.lang.Class objects.<DD><DL><DT><B>Parameters:</B><DD><CODE>eventSetName</CODE> - The programmatic name of the event set.<DD><CODE>listenerType</CODE> - The Class for the listener interface.<DD><CODE>listenerMethods</CODE> - An array of Method objects describing each		of the event handling methods in the target listener.<DD><CODE>addListenerMethod</CODE> - The method on the event source		that can be used to register an event listener object.<DD><CODE>removeListenerMethod</CODE> - The method on the event source		that can be used to de-register an event listener object.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/beans/IntrospectionException.html">IntrospectionException</A></CODE> - if an exception occurs during              introspection.</DL></DD></DL><HR><A NAME="EventSetDescriptor(java.lang.String, java.lang.Class, java.beans.MethodDescriptor[], java.lang.reflect.Method, java.lang.reflect.Method)"><!-- --></A><H3>EventSetDescriptor</H3><PRE>public <B>EventSetDescriptor</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;eventSetName,                          <A HREF="../../java/lang/Class.html">Class</A>&nbsp;listenerType,                          <A HREF="../../java/beans/MethodDescriptor.html">MethodDescriptor</A>[]&nbsp;listenerMethodDescriptors,                          <A HREF="../../java/lang/reflect/Method.html">Method</A>&nbsp;addListenerMethod,                          <A HREF="../../java/lang/reflect/Method.html">Method</A>&nbsp;removeListenerMethod)                   throws <A HREF="../../java/beans/IntrospectionException.html">IntrospectionException</A></PRE><DL><DD>This constructor creates an EventSetDescriptor from scratch using java.lang.reflect.MethodDescriptor and java.lang.Class objects.<DD><DL><DT><B>Parameters:</B><DD><CODE>eventSetName</CODE> - The programmatic name of the event set.<DD><CODE>listenerType</CODE> - The Class for the listener interface.<DD><CODE>listenerMethodDescriptors</CODE> - An array of MethodDescriptor objects		 describing each of the event handling methods in the           target listener.<DD><CODE>addListenerMethod</CODE> - The method on the event source		that can be used to register an event listener object.<DD><CODE>removeListenerMethod</CODE> - The method on the event source		that can be used to de-register an event listener object.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/beans/IntrospectionException.html">IntrospectionException</A></CODE> - if an exception occurs during              introspection.</DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getListenerType()"><!-- --></A><H3>getListenerType</H3><PRE>public <A HREF="../../java/lang/Class.html">Class</A> <B>getListenerType</B>()</PRE><DL><DD>Gets the Class object for the target interface.<DD><DL><DT><B>Returns:</B><DD>The Class object for the target interface that will get invoked when the event is fired.</DL></DD></DL><HR><A NAME="getListenerMethods()"><!-- --></A><H3>getListenerMethods</H3><PRE>public <A HREF="../../java/lang/reflect/Method.html">Method</A>[] <B>getListenerMethods</B>()</PRE><DL><DD>Gets the methods of the target listener interface.<DD><DL><DT><B>Returns:</B><DD>An array of Method objects for the target methods within the target listener interface that will get called when events are fired.</DL></DD></DL><HR><A NAME="getListenerMethodDescriptors()"><!-- --></A><H3>getListenerMethodDescriptors</H3><PRE>public <A HREF="../../java/beans/MethodDescriptor.html">MethodDescriptor</A>[] <B>getListenerMethodDescriptors</B>()</PRE><DL><DD>Gets the <code>MethodDescriptor</code>s of the target listener interface.<DD><DL><DT><B>Returns:</B><DD>An array of MethodDescriptor objects for the target methods within the target listener interface that will get called when events are fired.</DL></DD></DL><HR><A NAME="getAddListenerMethod()"><!-- --></A><H3>getAddListenerMethod</H3><PRE>public <A HREF="../../java/lang/reflect/Method.html">Method</A> <B>getAddListenerMethod</B>()</PRE><DL><DD>Gets the method used to add event listeners.<DD><DL><DT><B>Returns:</B><DD>The method used to register a listener at the event source.</DL></DD></DL><HR><A NAME="getRemoveListenerMethod()"><!-- --></A><H3>getRemoveListenerMethod</H3><PRE>public <A HREF="../../java/lang/reflect/Method.html">Method</A> <B>getRemoveListenerMethod</B>()</PRE><DL><DD>Gets the method used to remove event listeners.<DD><DL><DT><B>Returns:</B><DD>The method used to remove a listener at the event source.</DL></DD></DL><HR><A NAME="setUnicast(boolean)"><!-- --></A><H3>setUnicast</H3><PRE>public void <B>setUnicast</B>(boolean&nbsp;unicast)</PRE><DL><DD>Mark an event set as unicast (or not).<DD><DL><DT><B>Parameters:</B><DD><CODE>unicast</CODE> - True if the event set is unicast.</DL></DD></DL><HR><A NAME="isUnicast()"><!-- --></A><H3>isUnicast</H3><PRE>public boolean <B>isUnicast</B>()</PRE><DL><DD>Normally event sources are multicast.  However there are some  exceptions that are strictly unicast.<DD><DL><DT><B>Returns:</B><DD>True if the event set is unicast.  Defaults to "false".</DL></DD></DL><HR><A NAME="setInDefaultEventSet(boolean)"><!-- --></A><H3>setInDefaultEventSet</H3><PRE>public void <B>setInDefaultEventSet</B>(boolean&nbsp;inDefaultEventSet)</PRE><DL><DD>Mark an event set as being in the "default" set (or not). By default this is true.<DD><DL><DT><B>Parameters:</B><DD><CODE>unicast</CODE> - True if the event set is unicast.</DL></DD></DL><HR><A NAME="isInDefaultEventSet()"><!-- --></A><H3>isInDefaultEventSet</H3><PRE>public boolean <B>isInDefaultEventSet</B>()</PRE><DL><DD>Report if an event set is in the "default set".<DD><DL><DT><B>Returns:</B><DD>True if the event set is in the "default set".  Defaults to "true".</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/EventSetDescriptor.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../java/beans/Beans.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../java/beans/FeatureDescriptor.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="EventSetDescriptor.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation  contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A.  All Rights Reserved.</font></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -