Simple single-color 8x8x8 LED Cube with AVRs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AnimationUtility.html 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!--NewPage-->
  3. <HTML>
  4. <HEAD>
  5. <!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 21:22:39 CET 2011 -->
  6. <TITLE>
  7. AnimationUtility
  8. </TITLE>
  9. <META NAME="date" CONTENT="2011-12-05">
  10. <LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
  11. <SCRIPT type="text/javascript">
  12. function windowTitle()
  13. {
  14. if (location.href.indexOf('is-external=true') == -1) {
  15. parent.document.title="AnimationUtility";
  16. }
  17. }
  18. </SCRIPT>
  19. <NOSCRIPT>
  20. </NOSCRIPT>
  21. </HEAD>
  22. <BODY BGCOLOR="white" onload="windowTitle();">
  23. <HR>
  24. <!-- ========= START OF TOP NAVBAR ======= -->
  25. <A NAME="navbar_top"><!-- --></A>
  26. <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
  27. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  28. <TR>
  29. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  30. <A NAME="navbar_top_firstrow"><!-- --></A>
  31. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  32. <TR ALIGN="center" VALIGN="top">
  33. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  34. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  35. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  36. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  37. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  38. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  39. </TR>
  40. </TABLE>
  41. </TD>
  42. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  43. </EM>
  44. </TD>
  45. </TR>
  46. <TR>
  47. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  48. &nbsp;<A HREF="Animation.html" title="class in &lt;Unnamed&gt;"><B>PREV CLASS</B></A>&nbsp;
  49. &nbsp;<A HREF="cubeWorker.html" title="class in &lt;Unnamed&gt;"><B>NEXT CLASS</B></A></FONT></TD>
  50. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  51. <A HREF="index.html?AnimationUtility.html" target="_top"><B>FRAMES</B></A> &nbsp;
  52. &nbsp;<A HREF="AnimationUtility.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  53. &nbsp;<SCRIPT type="text/javascript">
  54. <!--
  55. if(window==top) {
  56. document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
  57. }
  58. //-->
  59. </SCRIPT>
  60. <NOSCRIPT>
  61. <A HREF="allclasses-noframe.html"><B>All Classes</B></A>
  62. </NOSCRIPT>
  63. </FONT></TD>
  64. </TR>
  65. <TR>
  66. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  67. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  68. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  69. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  70. </TR>
  71. </TABLE>
  72. <A NAME="skip-navbar_top"></A>
  73. <!-- ========= END OF TOP NAVBAR ========= -->
  74. <HR>
  75. <!-- ======== START OF CLASS DATA ======== -->
  76. <H2>
  77. Class AnimationUtility</H2>
  78. <PRE>
  79. java.lang.Object
  80. <IMG SRC="./resources/inherit.gif" ALT="extended by "><B>AnimationUtility</B>
  81. </PRE>
  82. <HR>
  83. <DL>
  84. <DT><PRE>public class <B>AnimationUtility</B><DT>extends java.lang.Object</DL>
  85. </PRE>
  86. <P>
  87. A helper class that loads animations from a file or saves them to one.
  88. <P>
  89. <P>
  90. <HR>
  91. <P>
  92. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  93. <A NAME="constructor_summary"><!-- --></A>
  94. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  95. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  96. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  97. <B>Constructor Summary</B></FONT></TH>
  98. </TR>
  99. <TR BGCOLOR="white" CLASS="TableRowColor">
  100. <TD><CODE><B><A HREF="AnimationUtility.html#AnimationUtility()">AnimationUtility</A></B>()</CODE>
  101. <BR>
  102. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  103. </TR>
  104. </TABLE>
  105. &nbsp;
  106. <!-- ========== METHOD SUMMARY =========== -->
  107. <A NAME="method_summary"><!-- --></A>
  108. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  109. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  110. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  111. <B>Method Summary</B></FONT></TH>
  112. </TR>
  113. <TR BGCOLOR="white" CLASS="TableRowColor">
  114. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  115. <CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
  116. <TD><CODE><B><A HREF="AnimationUtility.html#getLastError()">getLastError</A></B>()</CODE>
  117. <BR>
  118. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the last error that occured while writing</TD>
  119. </TR>
  120. <TR BGCOLOR="white" CLASS="TableRowColor">
  121. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  122. <CODE>static&nbsp;java.util.ArrayList&lt;<A HREF="Animation.html" title="class in &lt;Unnamed&gt;">Animation</A>&gt;</CODE></FONT></TD>
  123. <TD><CODE><B><A HREF="AnimationUtility.html#readFile(java.lang.String)">readFile</A></B>(java.lang.String&nbsp;path)</CODE>
  124. <BR>
  125. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read a file, return ArrayList with all animations in the file.</TD>
  126. </TR>
  127. <TR BGCOLOR="white" CLASS="TableRowColor">
  128. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  129. <CODE>static&nbsp;void</CODE></FONT></TD>
  130. <TD><CODE><B><A HREF="AnimationUtility.html#writeFile(java.lang.String, java.util.ArrayList)">writeFile</A></B>(java.lang.String&nbsp;path,
  131. java.util.ArrayList&lt;<A HREF="Animation.html" title="class in &lt;Unnamed&gt;">Animation</A>&gt;&nbsp;animations)</CODE>
  132. <BR>
  133. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write a file with all Animations of an ArrayList</TD>
  134. </TR>
  135. </TABLE>
  136. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  137. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  138. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  139. <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
  140. </TR>
  141. <TR BGCOLOR="white" CLASS="TableRowColor">
  142. <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
  143. </TR>
  144. </TABLE>
  145. &nbsp;
  146. <P>
  147. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  148. <A NAME="constructor_detail"><!-- --></A>
  149. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  150. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  151. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  152. <B>Constructor Detail</B></FONT></TH>
  153. </TR>
  154. </TABLE>
  155. <A NAME="AnimationUtility()"><!-- --></A><H3>
  156. AnimationUtility</H3>
  157. <PRE>
  158. public <B>AnimationUtility</B>()</PRE>
  159. <DL>
  160. </DL>
  161. <!-- ============ METHOD DETAIL ========== -->
  162. <A NAME="method_detail"><!-- --></A>
  163. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  164. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  165. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  166. <B>Method Detail</B></FONT></TH>
  167. </TR>
  168. </TABLE>
  169. <A NAME="readFile(java.lang.String)"><!-- --></A><H3>
  170. readFile</H3>
  171. <PRE>
  172. public static java.util.ArrayList&lt;<A HREF="Animation.html" title="class in &lt;Unnamed&gt;">Animation</A>&gt; <B>readFile</B>(java.lang.String&nbsp;path)
  173. throws java.lang.Exception</PRE>
  174. <DL>
  175. <DD>Read a file, return ArrayList with all animations in the file.
  176. <P>
  177. <DD><DL>
  178. <DT><B>Parameters:</B><DD><CODE>path</CODE> - Path of file
  179. <DT><B>Returns:</B><DD>Populated ArrayList
  180. <DT><B>Throws:</B>
  181. <DD><CODE>Excpetion</CODE> - When something goes wrong with the Scanner...
  182. <DD><CODE>java.lang.Exception</CODE></DL>
  183. </DD>
  184. </DL>
  185. <HR>
  186. <A NAME="writeFile(java.lang.String, java.util.ArrayList)"><!-- --></A><H3>
  187. writeFile</H3>
  188. <PRE>
  189. public static void <B>writeFile</B>(java.lang.String&nbsp;path,
  190. java.util.ArrayList&lt;<A HREF="Animation.html" title="class in &lt;Unnamed&gt;">Animation</A>&gt;&nbsp;animations)</PRE>
  191. <DL>
  192. <DD>Write a file with all Animations of an ArrayList
  193. <P>
  194. <DD><DL>
  195. <DT><B>Parameters:</B><DD><CODE>path</CODE> - Path to write to<DD><CODE>animations</CODE> - ArrayList with all animations to be saved<DT><B>See Also:</B><DD><A HREF="AnimationUtility.html#getLastError()"><CODE>getLastError()</CODE></A></DL>
  196. </DD>
  197. </DL>
  198. <HR>
  199. <A NAME="getLastError()"><!-- --></A><H3>
  200. getLastError</H3>
  201. <PRE>
  202. public static java.lang.String <B>getLastError</B>()</PRE>
  203. <DL>
  204. <DD>Get the last error that occured while writing
  205. <P>
  206. <DD><DL>
  207. <DT><B>Returns:</B><DD>Text of the exception that occured<DT><B>See Also:</B><DD><A HREF="AnimationUtility.html#writeFile(java.lang.String, java.util.ArrayList)"><CODE>writeFile()</CODE></A></DL>
  208. </DD>
  209. </DL>
  210. <!-- ========= END OF CLASS DATA ========= -->
  211. <HR>
  212. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  213. <A NAME="navbar_bottom"><!-- --></A>
  214. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  215. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  216. <TR>
  217. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  218. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  219. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  220. <TR ALIGN="center" VALIGN="top">
  221. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  222. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  223. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  224. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  225. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  226. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  227. </TR>
  228. </TABLE>
  229. </TD>
  230. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  231. </EM>
  232. </TD>
  233. </TR>
  234. <TR>
  235. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  236. &nbsp;<A HREF="Animation.html" title="class in &lt;Unnamed&gt;"><B>PREV CLASS</B></A>&nbsp;
  237. &nbsp;<A HREF="cubeWorker.html" title="class in &lt;Unnamed&gt;"><B>NEXT CLASS</B></A></FONT></TD>
  238. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  239. <A HREF="index.html?AnimationUtility.html" target="_top"><B>FRAMES</B></A> &nbsp;
  240. &nbsp;<A HREF="AnimationUtility.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  241. &nbsp;<SCRIPT type="text/javascript">
  242. <!--
  243. if(window==top) {
  244. document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
  245. }
  246. //-->
  247. </SCRIPT>
  248. <NOSCRIPT>
  249. <A HREF="allclasses-noframe.html"><B>All Classes</B></A>
  250. </NOSCRIPT>
  251. </FONT></TD>
  252. </TR>
  253. <TR>
  254. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  255. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  256. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  257. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  258. </TR>
  259. </TABLE>
  260. <A NAME="skip-navbar_bottom"></A>
  261. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  262. <HR>
  263. </BODY>
  264. </HTML>