staticanimation.html.svn-base

来自「j2me设计的界面包」· SVN-BASE 代码 · 共 569 行 · 第 1/2 页

SVN-BASE
569
字号
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getFrameTime(int)"><!-- --></A><H3>
getFrameTime</H3>
<PRE>
public int <B>getFrameTime</B>(int&nbsp;frame)</PRE>
<DL>
<DD>The time in which the given frame should appear
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>frame</CODE> - must be a number bigger than -1 and smaller than getFrameCount()
<DT><B>Returns:</B><DD>the time in milliseconds for the frame to appear</DL>
</DD>
</DL>
<HR>

<A NAME="getTotalAnimationTime()"><!-- --></A><H3>
getTotalAnimationTime</H3>
<PRE>
public int <B>getTotalAnimationTime</B>()</PRE>
<DL>
<DD>Returns the duration for the entire animation used to determin when to loop
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>total animation time in milliseconds</DL>
</DD>
</DL>
<HR>

<A NAME="getFrameRGB(int)"><!-- --></A><H3>
getFrameRGB</H3>
<PRE>
public int[] <B>getFrameRGB</B>(int&nbsp;frame)</PRE>
<DL>
<DD>Returns the RGB for the given frame, this method is relatively slow and  it is recommended that you do not use it for realtime animations.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>frame</CODE> - must be a number bigger than -1 and smaller than getFrameCount()
<DT><B>Returns:</B><DD>ARGB pixels within the given frame</DL>
</DD>
</DL>
<HR>

<A NAME="createAnimation(java.io.DataInputStream)"><!-- --></A><H3>
createAnimation</H3>
<PRE>
public static <A HREF="../../../com/sun/lwuit/StaticAnimation.html" title="class in com.sun.lwuit">StaticAnimation</A> <B>createAnimation</B>(java.io.DataInputStream&nbsp;data)
                                       throws java.io.IOException</PRE>
<DL>
<DD>Creates an animation from the given stream, this method is used internally by Resources normally you should not create static animations manually.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>data</CODE> - input stream from which the animation is loaded
<DT><B>Returns:</B><DD>An instance of a static animation
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="animate()"><!-- --></A><H3>
animate</H3>
<PRE>
public boolean <B>animate</B>()</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../com/sun/lwuit/animations/Animation.html#animate()">Animation</A></CODE></B></DD>
<DD>Allows the animation to reduce "repaint" calls when it returns false. It is called once for every frame. Frames are defined by the <A HREF="../../../com/sun/lwuit/Display.html" title="class in com.sun.lwuit"><CODE>Display</CODE></A> class.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/sun/lwuit/animations/Animation.html#animate()">animate</A></CODE> in interface <CODE><A HREF="../../../com/sun/lwuit/animations/Animation.html" title="interface in com.sun.lwuit.animations">Animation</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>true if a repaint is desired or false if no repaint is necessary</DL>
</DD>
</DL>
<HR>

<A NAME="restart()"><!-- --></A><H3>
restart</H3>
<PRE>
public void <B>restart</B>()</PRE>
<DL>
<DD>Restarts the animation
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="paint(com.sun.lwuit.Graphics)"><!-- --></A><H3>
paint</H3>
<PRE>
public void <B>paint</B>(<A HREF="../../../com/sun/lwuit/Graphics.html" title="class in com.sun.lwuit">Graphics</A>&nbsp;g)</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../com/sun/lwuit/animations/Animation.html#paint(com.sun.lwuit.Graphics)">Animation</A></CODE></B></DD>
<DD>Draws the animation, within a component the standard paint method would be invoked since it bares the exact same signature.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/sun/lwuit/animations/Animation.html#paint(com.sun.lwuit.Graphics)">paint</A></CODE> in interface <CODE><A HREF="../../../com/sun/lwuit/animations/Animation.html" title="interface in com.sun.lwuit.animations">Animation</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="isLoop()"><!-- --></A><H3>
isLoop</H3>
<PRE>
public boolean <B>isLoop</B>()</PRE>
<DL>
<DD>Indicates whether the animation will run in a loop or run only once
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setLoop(boolean)"><!-- --></A><H3>
setLoop</H3>
<PRE>
public void <B>setLoop</B>(boolean&nbsp;loop)</PRE>
<DL>
<DD>Indicates whether the animation will run in a loop or run only once
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="scale(int, int)"><!-- --></A><H3>
scale</H3>
<PRE>
public void <B>scale</B>(int&nbsp;width,
                  int&nbsp;height)</PRE>
<DL>
<DD><B>Description copied from class: <CODE><A HREF="../../../com/sun/lwuit/Image.html#scale(int, int)">Image</A></CODE></B></DD>
<DD>Scale the image to the given width and height, this is a fast algorithm that preserves transulcent information
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/sun/lwuit/IndexedImage.html#scale(int, int)">scale</A></CODE> in class <CODE><A HREF="../../../com/sun/lwuit/IndexedImage.html" title="class in com.sun.lwuit">IndexedImage</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>width</CODE> - width for the scaling<DD><CODE>height</CODE> - height of the scaled image</DL>
</DD>
</DL>
<HR>

<A NAME="scaled(int, int)"><!-- --></A><H3>
scaled</H3>
<PRE>
public <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A> <B>scaled</B>(int&nbsp;width,
                    int&nbsp;height)</PRE>
<DL>
<DD><B>Description copied from class: <CODE><A HREF="../../../com/sun/lwuit/Image.html#scaled(int, int)">Image</A></CODE></B></DD>
<DD>Returns a scaled version of this image image using the given width and height,  this is a fast algorithm that preserves transulcent information
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/sun/lwuit/IndexedImage.html#scaled(int, int)">scaled</A></CODE> in class <CODE><A HREF="../../../com/sun/lwuit/IndexedImage.html" title="class in com.sun.lwuit">IndexedImage</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>width</CODE> - width for the scaling<DD><CODE>height</CODE> - height of the scaled image
<DT><B>Returns:</B><DD>new image instance scaled to the given height and width</DL>
</DD>
</DL>
<HR>

<A NAME="isAnimation()"><!-- --></A><H3>
isAnimation</H3>
<PRE>
public boolean <B>isAnimation</B>()</PRE>
<DL>
<DD><B>Description copied from class: <CODE><A HREF="../../../com/sun/lwuit/Image.html#isAnimation()">Image</A></CODE></B></DD>
<DD>Returns true if this is an animated image
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/sun/lwuit/Image.html#isAnimation()">isAnimation</A></CODE> in class <CODE><A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <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/StaticAnimation.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>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../com/sun/lwuit/RGBImage.html" title="class in com.sun.lwuit"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../com/sun/lwuit/TabbedPane.html" title="class in com.sun.lwuit"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html?com/sun/lwuit/StaticAnimation.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="StaticAnimation.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
</BODY>
</HTML>

⌨️ 快捷键说明

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