eventqueue.html
来自「API資料大全」· HTML 代码 · 共 452 行 · 第 1/2 页
HTML
452 行
<!-- ============ 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="postEvent(java.awt.AWTEvent)"><!-- --></A><H3>postEvent</H3><PRE>public void <B>postEvent</B>(<A HREF="../../java/awt/AWTEvent.html">AWTEvent</A> theEvent)</PRE><DL><DD>Post a 1.1-style event to the EventQueue. If there is an existing event on the queue with the same ID and event source, the source Component's coalesceEvents method will be called.<DD><DL><DT><B>Parameters:</B><DD><CODE>theEvent</CODE> - an instance of java.awt.AWTEvent, or a subclass of it.</DL></DD></DL><HR><A NAME="getNextEvent()"><!-- --></A><H3>getNextEvent</H3><PRE>public <A HREF="../../java/awt/AWTEvent.html">AWTEvent</A> <B>getNextEvent</B>() throws <A HREF="../../java/lang/InterruptedException.html">InterruptedException</A></PRE><DL><DD>Remove an event from the EventQueue and return it. This method will block until an event has been posted by another thread.<DD><DL><DT><B>Returns:</B><DD>the next AWTEvent<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/InterruptedException.html">InterruptedException</A></CODE> - if another thread has interrupted this thread.</DL></DD></DL><HR><A NAME="peekEvent()"><!-- --></A><H3>peekEvent</H3><PRE>public <A HREF="../../java/awt/AWTEvent.html">AWTEvent</A> <B>peekEvent</B>()</PRE><DL><DD>Return the first event on the EventQueue without removing it.<DD><DL><DT><B>Returns:</B><DD>the first event</DL></DD></DL><HR><A NAME="peekEvent(int)"><!-- --></A><H3>peekEvent</H3><PRE>public <A HREF="../../java/awt/AWTEvent.html">AWTEvent</A> <B>peekEvent</B>(int id)</PRE><DL><DD>Return the first event with the specified id, if any.<DD><DL><DT><B>Parameters:</B><DD><CODE>id</CODE> - the id of the type of event desired.<DT><B>Returns:</B><DD>the first event of the specified id</DL></DD></DL><HR><A NAME="dispatchEvent(java.awt.AWTEvent)"><!-- --></A><H3>dispatchEvent</H3><PRE>protected void <B>dispatchEvent</B>(<A HREF="../../java/awt/AWTEvent.html">AWTEvent</A> event)</PRE><DL><DD>Dispatch an event. The manner in which the event is dispatched depends upon the type of the event and the type of the event's source object: <p> </p> <table border> <tr> <th>Event Type</th> <th>Source Type</th> <th>Dispatched To</th> </tr> <tr> <td>ActiveEvent</td> <td>Any</td> <td>event.dispatch()</td> </tr> <tr> <td>Other</td> <td>Component</td> <td>source.dispatchEvent(AWTEvent)</td> </tr> <tr> <td>Other</td> <td>MenuComponent</td> <td>source.dispatchEvent(AWTEvent)</td> </tr> <tr> <td>Other</td> <td>Other</td> <td>No action (ignored)</td> </tr> </table> <p> </p><DD><DL><DT><B>Parameters:</B><DD><CODE>theEvent</CODE> - an instance of java.awt.AWTEvent, or a subclass of it.</DL></DD></DL><HR><A NAME="push(java.awt.EventQueue)"><!-- --></A><H3>push</H3><PRE>public void <B>push</B>(<A HREF="../../java/awt/EventQueue.html">EventQueue</A> newEventQueue)</PRE><DL><DD>Replace the existing EventQueue with the specified one. Any pending events are transferred to the new EventQueue for processing by it.<DD><DL><DT><B>Parameters:</B><DD><CODE>an</CODE> - EventQueue (or subclass thereof) instance to be used.<DT><B>See Also: </B><DD><A HREF="../../java/awt/EventQueue.html#pop()"><CODE>pop()</CODE></A></DL></DD></DL><HR><A NAME="pop()"><!-- --></A><H3>pop</H3><PRE>protected void <B>pop</B>() throws <A HREF="../../java/util/EmptyStackException.html">EmptyStackException</A></PRE><DL><DD>Stop dispatching events using this EventQueue instance. Any pending events are transferred to the previous EventQueue for processing by it.<DD><DL><DT><B>Throws:</B><DD><CODE>if</CODE> - no previous push was made on this EventQueue.<DT><B>See Also: </B><DD><A HREF="../../java/awt/EventQueue.html#push(java.awt.EventQueue)"><CODE>push(java.awt.EventQueue)</CODE></A></DL></DD></DL><HR><A NAME="isDispatchThread()"><!-- --></A><H3>isDispatchThread</H3><PRE>public static boolean <B>isDispatchThread</B>()</PRE><DL><DD>Returns true if the calling thread is the current AWT EventQueue's dispatch thread. Use this call the ensure that a given task is being executed (or not being) on the current AWT EventDispatchThread.<DD><DL><DT><B>Returns:</B><DD>true if running on the current AWT EventQueue's dispatch thread.</DL></DD></DL><HR><A NAME="invokeLater(java.lang.Runnable)"><!-- --></A><H3>invokeLater</H3><PRE>public static void <B>invokeLater</B>(<A HREF="../../java/lang/Runnable.html">Runnable</A> runnable)</PRE><DL><DD>Causes <i>runnable</i> to have its run() method called in the dispatch thread of the EventQueue. This will happen after all pending events are processed.<DD><DL><DT><B>Parameters:</B><DD><CODE>runnable</CODE> - the Runnable whose run() method should be executed synchronously on the EventQueue<DT><B>Since: </B><DD>1.2</DD><DT><B>See Also: </B><DD><A HREF="../../java/awt/EventQueue.html#invokeAndWait(java.lang.Runnable)"><CODE>invokeAndWait(java.lang.Runnable)</CODE></A></DL></DD></DL><HR><A NAME="invokeAndWait(java.lang.Runnable)"><!-- --></A><H3>invokeAndWait</H3><PRE>public static void <B>invokeAndWait</B>(<A HREF="../../java/lang/Runnable.html">Runnable</A> runnable) throws <A HREF="../../java/lang/InterruptedException.html">InterruptedException</A>, <A HREF="../../java/lang/reflect/InvocationTargetException.html">InvocationTargetException</A></PRE><DL><DD>Causes <i>runnable</i> to have its run() method called in the dispatch thread of the EventQueue. This will happen after all pending events are processed. The call blocks until this has happened. This method will throw an Error if called from the event dispatcher thread.<DD><DL><DT><B>Parameters:</B><DD><CODE>runnable</CODE> - the Runnable whose run() method should be executed synchronously on the EventQueue<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/InterruptedException.html">InterruptedException</A></CODE> - if another thread has interrupted this thread<DD><CODE><A HREF="../../java/lang/reflect/InvocationTargetException.html">InvocationTargetException</A></CODE> - if an exception is thrown when running <i>runnable</i><DT><B>Since: </B><DD>1.2</DD><DT><B>See Also: </B><DD><A HREF="../../java/awt/EventQueue.html#invokeLater(java.lang.Runnable)"><CODE>invokeLater(java.lang.Runnable)</CODE></A></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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/EventQueue.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../java/awt/Event.html"><B>PREV CLASS</B></A> <A HREF="../../java/awt/FileDialog.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> <A HREF="EventQueue.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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 + =
减小字号Ctrl + -
显示快捷键?