|
@@ -2,7 +2,7 @@
|
2
|
2
|
<!--NewPage-->
|
3
|
3
|
<HTML>
|
4
|
4
|
<HEAD>
|
5
|
|
-<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 16:34:29 CET 2011 -->
|
|
5
|
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:17 CET 2011 -->
|
6
|
6
|
<TITLE>
|
7
|
7
|
cubeWorker
|
8
|
8
|
</TITLE>
|
|
@@ -96,6 +96,10 @@ java.lang.Object
|
96
|
96
|
</PRE>
|
97
|
97
|
|
98
|
98
|
<P>
|
|
99
|
+This class holds all Data of the Application. Additionally it performs the transmission of animation data to/from the cube and saves/loads animations in/from a file.
|
|
100
|
+<P>
|
|
101
|
+
|
|
102
|
+<P>
|
99
|
103
|
<HR>
|
100
|
104
|
|
101
|
105
|
<P>
|
|
@@ -114,7 +118,7 @@ java.lang.Object
|
114
|
118
|
<TD><CODE><B><A HREF="cubeWorker.html#addAnimation()">addAnimation</A></B>()</CODE>
|
115
|
119
|
|
116
|
120
|
<BR>
|
117
|
|
- </TD>
|
|
121
|
+ Add an animation.</TD>
|
118
|
122
|
</TR>
|
119
|
123
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
120
|
124
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
@@ -122,7 +126,7 @@ java.lang.Object
|
122
|
126
|
<TD><CODE><B><A HREF="cubeWorker.html#addFrame(int)">addFrame</A></B>(int anim)</CODE>
|
123
|
127
|
|
124
|
128
|
<BR>
|
125
|
|
- </TD>
|
|
129
|
+ Add a Frame to an animation.</TD>
|
126
|
130
|
</TR>
|
127
|
131
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
128
|
132
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
@@ -130,7 +134,7 @@ java.lang.Object
|
130
|
134
|
<TD><CODE><B><A HREF="cubeWorker.html#changedStateSinceSave()">changedStateSinceSave</A></B>()</CODE>
|
131
|
135
|
|
132
|
136
|
<BR>
|
133
|
|
- </TD>
|
|
137
|
+ Check if something changed after loading/saving.</TD>
|
134
|
138
|
</TR>
|
135
|
139
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
136
|
140
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
@@ -138,7 +142,7 @@ java.lang.Object
|
138
|
142
|
<TD><CODE><B><A HREF="cubeWorker.html#downloadState(java.lang.String)">downloadState</A></B>(java.lang.String port)</CODE>
|
139
|
143
|
|
140
|
144
|
<BR>
|
141
|
|
- </TD>
|
|
145
|
+ Get all animations from the cube, place it in this object</TD>
|
142
|
146
|
</TR>
|
143
|
147
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
144
|
148
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
@@ -146,7 +150,7 @@ java.lang.Object
|
146
|
150
|
<TD><CODE><B><A HREF="cubeWorker.html#framesRemaining()">framesRemaining</A></B>()</CODE>
|
147
|
151
|
|
148
|
152
|
<BR>
|
149
|
|
- </TD>
|
|
153
|
+ Get the number of frames you can add until the Cubes memory is full.</TD>
|
150
|
154
|
</TR>
|
151
|
155
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
152
|
156
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
@@ -154,7 +158,7 @@ java.lang.Object
|
154
|
158
|
<TD><CODE><B><A HREF="cubeWorker.html#getAnimationName(int)">getAnimationName</A></B>(int selectedAnimation)</CODE>
|
155
|
159
|
|
156
|
160
|
<BR>
|
157
|
|
- </TD>
|
|
161
|
+ Get the name of an animation</TD>
|
158
|
162
|
</TR>
|
159
|
163
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
160
|
164
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
@@ -163,7 +167,7 @@ java.lang.Object
|
163
|
167
|
int frame)</CODE>
|
164
|
168
|
|
165
|
169
|
<BR>
|
166
|
|
- </TD>
|
|
170
|
+ Get the data of a frame.</TD>
|
167
|
171
|
</TR>
|
168
|
172
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
169
|
173
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
@@ -172,7 +176,7 @@ java.lang.Object
|
172
|
176
|
int frame)</CODE>
|
173
|
177
|
|
174
|
178
|
<BR>
|
175
|
|
- </TD>
|
|
179
|
+ Get the name of a frame.</TD>
|
176
|
180
|
</TR>
|
177
|
181
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
178
|
182
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
@@ -181,7 +185,7 @@ java.lang.Object
|
181
|
185
|
int frame)</CODE>
|
182
|
186
|
|
183
|
187
|
<BR>
|
184
|
|
- </TD>
|
|
188
|
+ Get frame duration.</TD>
|
185
|
189
|
</TR>
|
186
|
190
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
187
|
191
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
@@ -189,7 +193,7 @@ java.lang.Object
|
189
|
193
|
<TD><CODE><B><A HREF="cubeWorker.html#getSerialPorts()">getSerialPorts</A></B>()</CODE>
|
190
|
194
|
|
191
|
195
|
<BR>
|
192
|
|
- </TD>
|
|
196
|
+ Get the names of all available serial ports.</TD>
|
193
|
197
|
</TR>
|
194
|
198
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
195
|
199
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
@@ -197,7 +201,7 @@ java.lang.Object
|
197
|
201
|
<TD><CODE><B><A HREF="cubeWorker.html#loadState(java.lang.String)">loadState</A></B>(java.lang.String path)</CODE>
|
198
|
202
|
|
199
|
203
|
<BR>
|
200
|
|
- </TD>
|
|
204
|
+ Loads an animation file into this worker.</TD>
|
201
|
205
|
</TR>
|
202
|
206
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
203
|
207
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
@@ -206,7 +210,7 @@ java.lang.Object
|
206
|
210
|
int selectedAnimation)</CODE>
|
207
|
211
|
|
208
|
212
|
<BR>
|
209
|
|
- </TD>
|
|
213
|
+ Move an animation UP or DOWN.</TD>
|
210
|
214
|
</TR>
|
211
|
215
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
212
|
216
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
@@ -216,7 +220,7 @@ java.lang.Object
|
216
|
220
|
int frame)</CODE>
|
217
|
221
|
|
218
|
222
|
<BR>
|
219
|
|
- </TD>
|
|
223
|
+ Move a frame.</TD>
|
220
|
224
|
</TR>
|
221
|
225
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
222
|
226
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
@@ -224,7 +228,7 @@ java.lang.Object
|
224
|
228
|
<TD><CODE><B><A HREF="cubeWorker.html#numOfAnimations()">numOfAnimations</A></B>()</CODE>
|
225
|
229
|
|
226
|
230
|
<BR>
|
227
|
|
- </TD>
|
|
231
|
+ Get the number of animations in this worker.</TD>
|
228
|
232
|
</TR>
|
229
|
233
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
230
|
234
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
@@ -232,7 +236,7 @@ java.lang.Object
|
232
|
236
|
<TD><CODE><B><A HREF="cubeWorker.html#numOfFrames(int)">numOfFrames</A></B>(int selectedAnimation)</CODE>
|
233
|
237
|
|
234
|
238
|
<BR>
|
235
|
|
- </TD>
|
|
239
|
+ Get the number of frames in an animation.</TD>
|
236
|
240
|
</TR>
|
237
|
241
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
238
|
242
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
@@ -240,7 +244,7 @@ java.lang.Object
|
240
|
244
|
<TD><CODE><B><A HREF="cubeWorker.html#removeAnimation(int)">removeAnimation</A></B>(int selectedAnimation)</CODE>
|
241
|
245
|
|
242
|
246
|
<BR>
|
243
|
|
- </TD>
|
|
247
|
+ Remove an animation.</TD>
|
244
|
248
|
</TR>
|
245
|
249
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
246
|
250
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
@@ -249,7 +253,7 @@ java.lang.Object
|
249
|
253
|
int frame)</CODE>
|
250
|
254
|
|
251
|
255
|
<BR>
|
252
|
|
- </TD>
|
|
256
|
+ Remove a frame.</TD>
|
253
|
257
|
</TR>
|
254
|
258
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
255
|
259
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
@@ -257,7 +261,7 @@ java.lang.Object
|
257
|
261
|
<TD><CODE><B><A HREF="cubeWorker.html#saveState(java.lang.String)">saveState</A></B>(java.lang.String path)</CODE>
|
258
|
262
|
|
259
|
263
|
<BR>
|
260
|
|
- </TD>
|
|
264
|
+ Save the state of this object into a file.</TD>
|
261
|
265
|
</TR>
|
262
|
266
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
263
|
267
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
@@ -266,7 +270,8 @@ java.lang.Object
|
266
|
270
|
int selectedAnimation)</CODE>
|
267
|
271
|
|
268
|
272
|
<BR>
|
269
|
|
- </TD>
|
|
273
|
+ Set the name of an animation
|
|
274
|
+ @param s New name</TD>
|
270
|
275
|
</TR>
|
271
|
276
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
272
|
277
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
@@ -276,7 +281,7 @@ java.lang.Object
|
276
|
281
|
int frame)</CODE>
|
277
|
282
|
|
278
|
283
|
<BR>
|
279
|
|
- </TD>
|
|
284
|
+ Set the data of a frame</TD>
|
280
|
285
|
</TR>
|
281
|
286
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
282
|
287
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
@@ -286,7 +291,7 @@ java.lang.Object
|
286
|
291
|
int frame)</CODE>
|
287
|
292
|
|
288
|
293
|
<BR>
|
289
|
|
- </TD>
|
|
294
|
+ Set the name of a frame.</TD>
|
290
|
295
|
</TR>
|
291
|
296
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
292
|
297
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
@@ -296,7 +301,7 @@ java.lang.Object
|
296
|
301
|
int frame)</CODE>
|
297
|
302
|
|
298
|
303
|
<BR>
|
299
|
|
- </TD>
|
|
304
|
+ Set the frames duration.</TD>
|
300
|
305
|
</TR>
|
301
|
306
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
302
|
307
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
@@ -304,7 +309,7 @@ java.lang.Object
|
304
|
309
|
<TD><CODE><B><A HREF="cubeWorker.html#uploadState(java.lang.String)">uploadState</A></B>(java.lang.String port)</CODE>
|
305
|
310
|
|
306
|
311
|
<BR>
|
307
|
|
- </TD>
|
|
312
|
+ Send all animations to the cube.</TD>
|
308
|
313
|
</TR>
|
309
|
314
|
</TABLE>
|
310
|
315
|
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
|
@@ -334,8 +339,11 @@ numOfAnimations</H3>
|
334
|
339
|
<PRE>
|
335
|
340
|
public int <B>numOfAnimations</B>()</PRE>
|
336
|
341
|
<DL>
|
|
342
|
+<DD>Get the number of animations in this worker.
|
|
343
|
+<P>
|
337
|
344
|
<DD><DL>
|
338
|
|
-</DL>
|
|
345
|
+
|
|
346
|
+<DT><B>Returns:</B><DD>number of animations</DL>
|
339
|
347
|
</DD>
|
340
|
348
|
</DL>
|
341
|
349
|
<HR>
|
|
@@ -345,8 +353,11 @@ numOfFrames</H3>
|
345
|
353
|
<PRE>
|
346
|
354
|
public int <B>numOfFrames</B>(int selectedAnimation)</PRE>
|
347
|
355
|
<DL>
|
|
356
|
+<DD>Get the number of frames in an animation.
|
|
357
|
+<P>
|
348
|
358
|
<DD><DL>
|
349
|
|
-</DL>
|
|
359
|
+<DT><B>Parameters:</B><DD><CODE>selectedAnimation</CODE> - the animation you want to check
|
|
360
|
+<DT><B>Returns:</B><DD>number of frames in this animation</DL>
|
350
|
361
|
</DD>
|
351
|
362
|
</DL>
|
352
|
363
|
<HR>
|
|
@@ -356,8 +367,11 @@ framesRemaining</H3>
|
356
|
367
|
<PRE>
|
357
|
368
|
public int <B>framesRemaining</B>()</PRE>
|
358
|
369
|
<DL>
|
|
370
|
+<DD>Get the number of frames you can add until the Cubes memory is full.
|
|
371
|
+<P>
|
359
|
372
|
<DD><DL>
|
360
|
|
-</DL>
|
|
373
|
+
|
|
374
|
+<DT><B>Returns:</B><DD>number of frames remaining</DL>
|
361
|
375
|
</DD>
|
362
|
376
|
</DL>
|
363
|
377
|
<HR>
|
|
@@ -367,8 +381,11 @@ addAnimation</H3>
|
367
|
381
|
<PRE>
|
368
|
382
|
public int <B>addAnimation</B>()</PRE>
|
369
|
383
|
<DL>
|
|
384
|
+<DD>Add an animation.
|
|
385
|
+<P>
|
370
|
386
|
<DD><DL>
|
371
|
|
-</DL>
|
|
387
|
+
|
|
388
|
+<DT><B>Returns:</B><DD>Index of new animation, or -1 if not enough space remaining.</DL>
|
372
|
389
|
</DD>
|
373
|
390
|
</DL>
|
374
|
391
|
<HR>
|
|
@@ -378,8 +395,10 @@ removeAnimation</H3>
|
378
|
395
|
<PRE>
|
379
|
396
|
public void <B>removeAnimation</B>(int selectedAnimation)</PRE>
|
380
|
397
|
<DL>
|
|
398
|
+<DD>Remove an animation.
|
|
399
|
+<P>
|
381
|
400
|
<DD><DL>
|
382
|
|
-</DL>
|
|
401
|
+<DT><B>Parameters:</B><DD><CODE>selectedAnimation</CODE> - the animation you want to delete</DL>
|
383
|
402
|
</DD>
|
384
|
403
|
</DL>
|
385
|
404
|
<HR>
|
|
@@ -389,8 +408,11 @@ getAnimationName</H3>
|
389
|
408
|
<PRE>
|
390
|
409
|
public java.lang.String <B>getAnimationName</B>(int selectedAnimation)</PRE>
|
391
|
410
|
<DL>
|
|
411
|
+<DD>Get the name of an animation
|
|
412
|
+<P>
|
392
|
413
|
<DD><DL>
|
393
|
|
-</DL>
|
|
414
|
+<DT><B>Parameters:</B><DD><CODE>selectedAnimation</CODE> - The animation you want to get the name from
|
|
415
|
+<DT><B>Returns:</B><DD>The name</DL>
|
394
|
416
|
</DD>
|
395
|
417
|
</DL>
|
396
|
418
|
<HR>
|
|
@@ -401,8 +423,11 @@ setAnimationName</H3>
|
401
|
423
|
public void <B>setAnimationName</B>(java.lang.String s,
|
402
|
424
|
int selectedAnimation)</PRE>
|
403
|
425
|
<DL>
|
|
426
|
+<DD>Set the name of an animation
|
|
427
|
+ @param s New name
|
|
428
|
+<P>
|
404
|
429
|
<DD><DL>
|
405
|
|
-</DL>
|
|
430
|
+<DT><B>Parameters:</B><DD><CODE>selectedAnimation</CODE> - Index of the animation you want to change</DL>
|
406
|
431
|
</DD>
|
407
|
432
|
</DL>
|
408
|
433
|
<HR>
|
|
@@ -413,8 +438,10 @@ moveAnimation</H3>
|
413
|
438
|
public void <B>moveAnimation</B>(int dir,
|
414
|
439
|
int selectedAnimation)</PRE>
|
415
|
440
|
<DL>
|
|
441
|
+<DD>Move an animation UP or DOWN.
|
|
442
|
+<P>
|
416
|
443
|
<DD><DL>
|
417
|
|
-</DL>
|
|
444
|
+<DT><B>Parameters:</B><DD><CODE>dir</CODE> - Direction. Use UP and DOWN defined in cubeWorker<DD><CODE>selectedAnimation</CODE> - Animation you want to move</DL>
|
418
|
445
|
</DD>
|
419
|
446
|
</DL>
|
420
|
447
|
<HR>
|
|
@@ -425,8 +452,10 @@ getFrameName</H3>
|
425
|
452
|
public java.lang.String <B>getFrameName</B>(int anim,
|
426
|
453
|
int frame)</PRE>
|
427
|
454
|
<DL>
|
|
455
|
+<DD>Get the name of a frame.
|
|
456
|
+<P>
|
428
|
457
|
<DD><DL>
|
429
|
|
-</DL>
|
|
458
|
+<DT><B>Parameters:</B><DD><CODE>anim</CODE> - Animation the frame is in<DD><CODE>frame</CODE> - Index of the frame</DL>
|
430
|
459
|
</DD>
|
431
|
460
|
</DL>
|
432
|
461
|
<HR>
|
|
@@ -438,8 +467,10 @@ public void <B>setFrameName</B>(java.lang.String s,
|
438
|
467
|
int anim,
|
439
|
468
|
int frame)</PRE>
|
440
|
469
|
<DL>
|
|
470
|
+<DD>Set the name of a frame.
|
|
471
|
+<P>
|
441
|
472
|
<DD><DL>
|
442
|
|
-</DL>
|
|
473
|
+<DT><B>Parameters:</B><DD><CODE>s</CODE> - New name<DD><CODE>anim</CODE> - Animation Index<DD><CODE>frame</CODE> - Frame Index</DL>
|
443
|
474
|
</DD>
|
444
|
475
|
</DL>
|
445
|
476
|
<HR>
|
|
@@ -449,8 +480,11 @@ addFrame</H3>
|
449
|
480
|
<PRE>
|
450
|
481
|
public int <B>addFrame</B>(int anim)</PRE>
|
451
|
482
|
<DL>
|
|
483
|
+<DD>Add a Frame to an animation.
|
|
484
|
+<P>
|
452
|
485
|
<DD><DL>
|
453
|
|
-</DL>
|
|
486
|
+<DT><B>Parameters:</B><DD><CODE>anim</CODE> - Animation Index
|
|
487
|
+<DT><B>Returns:</B><DD>Index of new Frame or -1 if not enough space</DL>
|
454
|
488
|
</DD>
|
455
|
489
|
</DL>
|
456
|
490
|
<HR>
|
|
@@ -461,8 +495,10 @@ removeFrame</H3>
|
461
|
495
|
public void <B>removeFrame</B>(int anim,
|
462
|
496
|
int frame)</PRE>
|
463
|
497
|
<DL>
|
|
498
|
+<DD>Remove a frame.
|
|
499
|
+<P>
|
464
|
500
|
<DD><DL>
|
465
|
|
-</DL>
|
|
501
|
+<DT><B>Parameters:</B><DD><CODE>anim</CODE> - Animation Index<DD><CODE>frame</CODE> - Frame you want to remove</DL>
|
466
|
502
|
</DD>
|
467
|
503
|
</DL>
|
468
|
504
|
<HR>
|
|
@@ -473,8 +509,12 @@ getFrame</H3>
|
473
|
509
|
public short[] <B>getFrame</B>(int anim,
|
474
|
510
|
int frame)</PRE>
|
475
|
511
|
<DL>
|
|
512
|
+<DD>Get the data of a frame.
|
|
513
|
+<P>
|
476
|
514
|
<DD><DL>
|
477
|
|
-</DL>
|
|
515
|
+<DT><B>Parameters:</B><DD><CODE>anim</CODE> - Animation Index
|
|
516
|
+ @param frame Frame Index
|
|
517
|
+<DT><B>Returns:</B><DD>64 byte array with data (8 bits per byte => 512 bits)</DL>
|
478
|
518
|
</DD>
|
479
|
519
|
</DL>
|
480
|
520
|
<HR>
|
|
@@ -486,8 +526,10 @@ public void <B>setFrame</B>(short[] data,
|
486
|
526
|
int anim,
|
487
|
527
|
int frame)</PRE>
|
488
|
528
|
<DL>
|
|
529
|
+<DD>Set the data of a frame
|
|
530
|
+<P>
|
489
|
531
|
<DD><DL>
|
490
|
|
-</DL>
|
|
532
|
+<DT><B>Parameters:</B><DD><CODE>data</CODE> - 64 byte array with data<DD><CODE>anim</CODE> - Animation Index<DD><CODE>frame</CODE> - Frame Index<DT><B>See Also:</B><DD><A HREF="cubeWorker.html#getFrame(int, int)"><CODE>getFrame()</CODE></A></DL>
|
491
|
533
|
</DD>
|
492
|
534
|
</DL>
|
493
|
535
|
<HR>
|
|
@@ -498,8 +540,11 @@ getFrameTime</H3>
|
498
|
540
|
public short <B>getFrameTime</B>(int anim,
|
499
|
541
|
int frame)</PRE>
|
500
|
542
|
<DL>
|
|
543
|
+<DD>Get frame duration.
|
|
544
|
+<P>
|
501
|
545
|
<DD><DL>
|
502
|
|
-</DL>
|
|
546
|
+<DT><B>Parameters:</B><DD><CODE>anim</CODE> - Animation Index<DD><CODE>frame</CODE> - Frame Index
|
|
547
|
+<DT><B>Returns:</B><DD>Duration. 0 means 1/24th of a second.</DL>
|
503
|
548
|
</DD>
|
504
|
549
|
</DL>
|
505
|
550
|
<HR>
|
|
@@ -511,8 +556,10 @@ public void <B>setFrameTime</B>(short time,
|
511
|
556
|
int anim,
|
512
|
557
|
int frame)</PRE>
|
513
|
558
|
<DL>
|
|
559
|
+<DD>Set the frames duration.
|
|
560
|
+<P>
|
514
|
561
|
<DD><DL>
|
515
|
|
-</DL>
|
|
562
|
+<DT><B>Parameters:</B><DD><CODE>time</CODE> - New duration<DD><CODE>anim</CODE> - Animation Index<DD><CODE>frame</CODE> - Frame Index<DT><B>See Also:</B><DD><A HREF="cubeWorker.html#getFrameTime(int, int)"><CODE>getFrameTime()</CODE></A></DL>
|
516
|
563
|
</DD>
|
517
|
564
|
</DL>
|
518
|
565
|
<HR>
|
|
@@ -524,8 +571,10 @@ public void <B>moveFrame</B>(int dir,
|
524
|
571
|
int anim,
|
525
|
572
|
int frame)</PRE>
|
526
|
573
|
<DL>
|
|
574
|
+<DD>Move a frame.
|
|
575
|
+<P>
|
527
|
576
|
<DD><DL>
|
528
|
|
-</DL>
|
|
577
|
+<DT><B>Parameters:</B><DD><CODE>dir</CODE> - Direction to move. Use UP and DOWN from cubeWorker<DD><CODE>anim</CODE> - Animation Index<DD><CODE>frame</CODE> - Frame Index<DT><B>See Also:</B><DD><A HREF="cubeWorker.html#moveAnimation(int, int)"><CODE>moveAnimation()</CODE></A></DL>
|
529
|
578
|
</DD>
|
530
|
579
|
</DL>
|
531
|
580
|
<HR>
|
|
@@ -535,8 +584,11 @@ loadState</H3>
|
535
|
584
|
<PRE>
|
536
|
585
|
public int <B>loadState</B>(java.lang.String path)</PRE>
|
537
|
586
|
<DL>
|
|
587
|
+<DD>Loads an animation file into this worker.
|
|
588
|
+<P>
|
538
|
589
|
<DD><DL>
|
539
|
|
-</DL>
|
|
590
|
+<DT><B>Parameters:</B><DD><CODE>path</CODE> - Path of file to load
|
|
591
|
+<DT><B>Returns:</B><DD>0 on success, -1 on error.</DL>
|
540
|
592
|
</DD>
|
541
|
593
|
</DL>
|
542
|
594
|
<HR>
|
|
@@ -546,8 +598,11 @@ saveState</H3>
|
546
|
598
|
<PRE>
|
547
|
599
|
public int <B>saveState</B>(java.lang.String path)</PRE>
|
548
|
600
|
<DL>
|
|
601
|
+<DD>Save the state of this object into a file.
|
|
602
|
+<P>
|
549
|
603
|
<DD><DL>
|
550
|
|
-</DL>
|
|
604
|
+<DT><B>Parameters:</B><DD><CODE>path</CODE> - Path to save file in
|
|
605
|
+<DT><B>Returns:</B><DD>0 on success, -1 on error</DL>
|
551
|
606
|
</DD>
|
552
|
607
|
</DL>
|
553
|
608
|
<HR>
|
|
@@ -557,8 +612,11 @@ changedStateSinceSave</H3>
|
557
|
612
|
<PRE>
|
558
|
613
|
public boolean <B>changedStateSinceSave</B>()</PRE>
|
559
|
614
|
<DL>
|
|
615
|
+<DD>Check if something changed after loading/saving.
|
|
616
|
+<P>
|
560
|
617
|
<DD><DL>
|
561
|
|
-</DL>
|
|
618
|
+
|
|
619
|
+<DT><B>Returns:</B><DD>TRUE if something changed, FALSE otherwise</DL>
|
562
|
620
|
</DD>
|
563
|
621
|
</DL>
|
564
|
622
|
<HR>
|
|
@@ -568,8 +626,11 @@ uploadState</H3>
|
568
|
626
|
<PRE>
|
569
|
627
|
public int <B>uploadState</B>(java.lang.String port)</PRE>
|
570
|
628
|
<DL>
|
|
629
|
+<DD>Send all animations to the cube.
|
|
630
|
+<P>
|
571
|
631
|
<DD><DL>
|
572
|
|
-</DL>
|
|
632
|
+<DT><B>Parameters:</B><DD><CODE>port</CODE> - Name of serial port to use
|
|
633
|
+<DT><B>Returns:</B><DD>0 on success, -1 on error</DL>
|
573
|
634
|
</DD>
|
574
|
635
|
</DL>
|
575
|
636
|
<HR>
|
|
@@ -579,8 +640,11 @@ downloadState</H3>
|
579
|
640
|
<PRE>
|
580
|
641
|
public int <B>downloadState</B>(java.lang.String port)</PRE>
|
581
|
642
|
<DL>
|
|
643
|
+<DD>Get all animations from the cube, place it in this object
|
|
644
|
+<P>
|
582
|
645
|
<DD><DL>
|
583
|
|
-</DL>
|
|
646
|
+<DT><B>Parameters:</B><DD><CODE>port</CODE> - Name of serial port to use
|
|
647
|
+ @return 0 on success, -1 on error</DL>
|
584
|
648
|
</DD>
|
585
|
649
|
</DL>
|
586
|
650
|
<HR>
|
|
@@ -590,8 +654,11 @@ getSerialPorts</H3>
|
590
|
654
|
<PRE>
|
591
|
655
|
public java.lang.String[] <B>getSerialPorts</B>()</PRE>
|
592
|
656
|
<DL>
|
|
657
|
+<DD>Get the names of all available serial ports.
|
|
658
|
+<P>
|
593
|
659
|
<DD><DL>
|
594
|
|
-</DL>
|
|
660
|
+
|
|
661
|
+<DT><B>Returns:</B><DD>Array of port names. First entry is always "Select serial port..."</DL>
|
595
|
662
|
</DD>
|
596
|
663
|
</DL>
|
597
|
664
|
<!-- ========= END OF CLASS DATA ========= -->
|