mediatracker.html
来自「API資料大全」· HTML 代码 · 共 1,050 行 · 第 1/4 页
HTML
1,050 行
public boolean <B>checkID</B>(int id, boolean load)</PRE><DL><DD>Checks to see if all images tracked by this media tracker that are tagged with the specified identifier have finished loading. <p> If the value of the <code>load</code> flag is <code>true</code>, then this method starts loading any images that are not yet being loaded. <p> If there is an error while loading or scaling an image, then that image is considered to have finished loading. Use the <code>isErrorAny</code> or <code>isErrorID</code> methods to check for errors.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>id</CODE> - the identifier of the images to check.<DD><CODE>load</CODE> - if <code>true</code>, start loading any images that are not yet being loaded.<DT><B>Returns:</B><DD><code>true</code> if all images have finished loading, have been aborted, or have encountered an error; <code>false</code> otherwise.<DT><B>See Also: </B><DD><A HREF="../../java/awt/MediaTracker.html#checkID(int, boolean)"><CODE>checkID(int, boolean)</CODE></A>, <A HREF="../../java/awt/MediaTracker.html#checkAll()"><CODE>checkAll()</CODE></A>, <A HREF="../../java/awt/MediaTracker.html#isErrorAny()"><CODE>isErrorAny()</CODE></A>, <A HREF="../../java/awt/MediaTracker.html#isErrorID(int)"><CODE>isErrorID(int)</CODE></A></DL></DD></DL><HR><A NAME="isErrorID(int)"><!-- --></A><H3>isErrorID</H3><PRE>public boolean <B>isErrorID</B>(int id)</PRE><DL><DD>Checks the error status of all of the images tracked by this media tracker with the specified identifier.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>id</CODE> - the identifier of the images to check.<DT><B>Returns:</B><DD><code>true</code> if any of the images with the specified identifier had an error during loading; <code>false</code> otherwise.<DT><B>See Also: </B><DD><A HREF="../../java/awt/MediaTracker.html#isErrorAny()"><CODE>isErrorAny()</CODE></A>, <A HREF="../../java/awt/MediaTracker.html#getErrorsID(int)"><CODE>getErrorsID(int)</CODE></A></DL></DD></DL><HR><A NAME="getErrorsID(int)"><!-- --></A><H3>getErrorsID</H3><PRE>public <A HREF="../../java/lang/Object.html">Object</A>[] <B>getErrorsID</B>(int id)</PRE><DL><DD>Returns a list of media with the specified ID that have encountered an error.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>id</CODE> - the identifier of the images to check.<DT><B>Returns:</B><DD>an array of media objects tracked by this media tracker with the specified identifier that have encountered an error, or <code>null</code> if there are none with errors.<DT><B>See Also: </B><DD><A HREF="../../java/awt/MediaTracker.html#isErrorID(int)"><CODE>isErrorID(int)</CODE></A>, <A HREF="../../java/awt/MediaTracker.html#isErrorAny()"><CODE>isErrorAny()</CODE></A>, <A HREF="../../java/awt/MediaTracker.html#getErrorsAny()"><CODE>getErrorsAny()</CODE></A></DL></DD></DL><HR><A NAME="waitForID(int)"><!-- --></A><H3>waitForID</H3><PRE>public void <B>waitForID</B>(int id) throws <A HREF="../../java/lang/InterruptedException.html">InterruptedException</A></PRE><DL><DD>Starts loading all images tracked by this media tracker with the specified identifier. This method waits until all the images with the specified identifier have finished loading. <p> If there is an error while loading or scaling an image, then that image is considered to have finished loading. Use the <code>isErrorAny</code> and <code>isErrorID</code> methods to check for errors.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>id</CODE> - the identifier of the images to check.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/InterruptedException.html">InterruptedException</A></CODE> - if another thread has interrupted this thread.<DT><B>See Also: </B><DD><A HREF="../../java/awt/MediaTracker.html#waitForAll()"><CODE>waitForAll()</CODE></A>, <A HREF="../../java/awt/MediaTracker.html#isErrorAny()"><CODE>isErrorAny()</CODE></A>, <A HREF="../../java/awt/MediaTracker.html#isErrorID(int)"><CODE>isErrorID(int)</CODE></A></DL></DD></DL><HR><A NAME="waitForID(int, long)"><!-- --></A><H3>waitForID</H3><PRE>public boolean <B>waitForID</B>(int id, long ms) throws <A HREF="../../java/lang/InterruptedException.html">InterruptedException</A></PRE><DL><DD>Starts loading all images tracked by this media tracker with the specified identifier. This method waits until all the images with the specified identifier have finished loading, or until the length of time specified in milliseconds by the <code>ms</code> argument has passed. <p> If there is an error while loading or scaling an image, then that image is considered to have finished loading. Use the <code>statusID</code>, <code>isErrorID</code>, and <code>isErrorAny</code> methods to check for errors.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>id</CODE> - the identifier of the images to check.<DD><CODE>ms</CODE> - the length of time, in milliseconds, to wait for the loading to complete.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/InterruptedException.html">InterruptedException</A></CODE> - if another thread has interrupted this thread.<DT><B>See Also: </B><DD><A HREF="../../java/awt/MediaTracker.html#waitForAll()"><CODE>waitForAll()</CODE></A>, <A HREF="../../java/awt/MediaTracker.html#waitForID(int)"><CODE>waitForID(int)</CODE></A>, <A HREF="../../java/awt/MediaTracker.html#statusID(int, boolean)"><CODE>statusID(int, boolean)</CODE></A>, <A HREF="../../java/awt/MediaTracker.html#isErrorAny()"><CODE>isErrorAny()</CODE></A>, <A HREF="../../java/awt/MediaTracker.html#isErrorID(int)"><CODE>isErrorID(int)</CODE></A></DL></DD></DL><HR><A NAME="statusID(int, boolean)"><!-- --></A><H3>statusID</H3><PRE>public int <B>statusID</B>(int id, boolean load)</PRE><DL><DD>Calculates and returns the bitwise inclusive <b>OR</b> of the status of all media with the specified identifier that are tracked by this media tracker. <p> Possible flags defined by the <code>MediaTracker</code> class are <code>LOADING</code>, <code>ABORTED</code>, <code>ERRORED</code>, and <code>COMPLETE</code>. An image that hasn't started loading has zero as its status. <p> If the value of <code>load</code> is <code>true</code>, then this method starts loading any images that are not yet being loaded.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>id</CODE> - the identifier of the images to check.<DD><CODE>load</CODE> - if <code>true</code>, start loading any images that are not yet being loaded.<DT><B>Returns:</B><DD>the bitwise inclusive <b>OR</b> of the status of all of the media with the specified identifier that are being tracked.<DT><B>See Also: </B><DD><A HREF="../../java/awt/MediaTracker.html#statusAll(boolean)"><CODE>statusAll(boolean)</CODE></A>, <A HREF="../../java/awt/MediaTracker.html#LOADING"><CODE>LOADING</CODE></A>, <A HREF="../../java/awt/MediaTracker.html#ABORTED"><CODE>ABORTED</CODE></A>, <A HREF="../../java/awt/MediaTracker.html#ERRORED"><CODE>ERRORED</CODE></A>, <A HREF="../../java/awt/MediaTracker.html#COMPLETE"><CODE>COMPLETE</CODE></A></DL></DD></DL><HR><A NAME="removeImage(java.awt.Image)"><!-- --></A><H3>removeImage</H3><PRE>public void <B>removeImage</B>(<A HREF="../../java/awt/Image.html">Image</A> image)</PRE><DL><DD>Remove the specified image from this media tracker. All instances of the specified image are removed, regardless of scale or ID.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>image</CODE> - the image to be removed<DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../java/awt/MediaTracker.html#removeImage(java.awt.Image, int)"><CODE>removeImage(java.awt.Image, int)</CODE></A>, <A HREF="../../java/awt/MediaTracker.html#removeImage(java.awt.Image, int, int, int)"><CODE>removeImage(java.awt.Image, int, int, int)</CODE></A></DL></DD></DL><HR><A NAME="removeImage(java.awt.Image, int)"><!-- --></A><H3>removeImage</H3><PRE>public void <B>removeImage</B>(<A HREF="../../java/awt/Image.html">Image</A> image, int id)</PRE><DL><DD>Remove the specified image from the specified tracking ID of this media tracker. All instances of <code>Image</code> being tracked under the specified ID are removed regardless of scale.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>image</CODE> - the image to be removed.<DD><CODE>id</CODE> - the tracking ID frrom which to remove the image.<DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../java/awt/MediaTracker.html#removeImage(java.awt.Image)"><CODE>removeImage(java.awt.Image)</CODE></A>, <A HREF="../../java/awt/MediaTracker.html#removeImage(java.awt.Image, int, int, int)"><CODE>removeImage(java.awt.Image, int, int, int)</CODE></A></DL></DD></DL><HR><A NAME="removeImage(java.awt.Image, int, int, int)"><!-- --></A><H3>removeImage</H3><PRE>public void <B>removeImage</B>(<A HREF="../../java/awt/Image.html">Image</A> image, int id, int width, int height)</PRE><DL><DD>Remove the specified image with the specified width, height, and ID from this media tracker. Only the specified instance (with any duplicates) is removed.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>image</CODE> - the image to be removed<DD><CODE>id</CODE> - the tracking ID from which to remove the image.<DD><CODE>width</CODE> - the width to remove (-1 for unscaled).<DD><CODE>height</CODE> - the height to remove (-1 for unscaled).<DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../java/awt/MediaTracker.html#removeImage(java.awt.Image)"><CODE>removeImage(java.awt.Image)</CODE></A>, <A HREF="../../java/awt/MediaTracker.html#removeImage(java.awt.Image, int)"><CODE>removeImage(java.awt.Image, int)</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/MediaTracker.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/List.AccessibleAWTList.AccessibleAWTListChild.html"><B>PREV CLASS</B></A> <A HREF="../../java/awt/Menu.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="MediaTracker.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <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 + -
显示快捷键?