Переглянути джерело

Added more documentation...

Thomas Buck 12 роки тому
джерело
коміт
3814bc0590

+ 144
- 31
Cube Control/cubeWorker.java Переглянути файл

25
  * This class handles one animation file. This file can contain
25
  * This class handles one animation file. This file can contain
26
  * many animations, but has to be only 1Mbit in size (128*1024 Byte).
26
  * many animations, but has to be only 1Mbit in size (128*1024 Byte).
27
  */
27
  */
28
-
29
-
30
 import java.util.ArrayList;
28
 import java.util.ArrayList;
31
 import java.util.Collections;
29
 import java.util.Collections;
32
 import java.util.StringTokenizer;
30
 import java.util.StringTokenizer;
33
 
31
 
32
+/**
33
+ * 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.
34
+ * @author Thomas Buck
35
+ * @author Felix Bäder
36
+ * @author Max Nuding
37
+ * @version 1.0
38
+ */
39
+
34
 public class cubeWorker {
40
 public class cubeWorker {
35
 
41
 
36
 // --------------------
42
 // --------------------
50
 
56
 
51
 // --------------------
57
 // --------------------
52
 
58
 
59
+  /**
60
+   * Creates a worker with one animation, containing an empty frame.
61
+   */
53
   cubeWorker() {
62
   cubeWorker() {
54
   animations.add(new Animation());
63
   animations.add(new Animation());
55
   animations.get(0).setName("Animation 1");
64
   animations.get(0).setName("Animation 1");
57
   animations.get(0).get(0).setName("Frame 1");
66
   animations.get(0).get(0).setName("Frame 1");
58
   framesRemaining--;
67
   framesRemaining--;
59
   }
68
   }
60
-
69
+  
70
+  /**
71
+   * Creates a worker from the given animation list
72
+   * @param anims List of animations
73
+   */
61
   cubeWorker(ArrayList<Animation> anims) {
74
   cubeWorker(ArrayList<Animation> anims) {
62
     animations = anims;
75
     animations = anims;
63
   }
76
   }
66
 // Misc. Methods
79
 // Misc. Methods
67
 // --------------------
80
 // --------------------
68
 
81
 
69
-  // Returns how many animations are defined
82
+	/**
83
+	 * Get the number of animations in this worker.
84
+	 * @return number of animations
85
+	 */
70
     public int numOfAnimations() {
86
     public int numOfAnimations() {
71
            return animations.size();
87
            return animations.size();
72
     }
88
     }
73
 
89
 
74
-    // Returns how many frames are in the current animation
90
+	/**
91
+	 * Get the number of frames in an animation.
92
+	 * @param selectedAnimation the animation you want to check
93
+	 * @return number of frames in this animation
94
+	 */
75
     public int numOfFrames(int selectedAnimation) {
95
     public int numOfFrames(int selectedAnimation) {
76
            return animations.get(selectedAnimation).size();
96
            return animations.get(selectedAnimation).size();
77
     }
97
     }
78
 
98
 
79
-  // Tells how many Frames you can add until you reached 1 Mbit...
99
+    /**
100
+	 * Get the number of frames you can add until the Cubes memory is full.
101
+	 * @return number of frames remaining
102
+	 */
80
     public int framesRemaining() {
103
     public int framesRemaining() {
81
            return framesRemaining;
104
            return framesRemaining;
82
     }
105
     }
86
 // Animation Specific
109
 // Animation Specific
87
 // --------------------
110
 // --------------------
88
 
111
 
89
-  // Adds a new Animation
90
-    // Returns id if ok, -1 if error or not enough space for
91
-    // another animation
112
+	/**
113
+	 * Add an animation.
114
+	 * @return Index of new animation, or -1 if not enough space remaining.
115
+	 */
92
     public int addAnimation() {
116
     public int addAnimation() {
93
-    changedState = true;
94
-    if (framesRemaining <= 0) {
117
+    	changedState = true;
118
+    	if (framesRemaining <= 0) {
95
           return -1;
119
           return -1;
96
-    } else {
97
-      int s = animations.size();
98
-      animations.add(s, new Animation());
99
-      animations.get(s).setName("Animation " + animations.size());
100
-      return s;
101
-    }
120
+    	} else {
121
+    	  int s = animations.size();
122
+    	  animations.add(s, new Animation());
123
+    	  animations.get(s).setName("Animation " + animations.size());
124
+    	  return s;
125
+    	}
102
     }
126
     }
103
 
127
 
104
-    // Removes an animation
128
+	/**
129
+	 * Remove an animation.
130
+	 * @param selectedAnimation the animation you want to delete
131
+	 */
105
     public void removeAnimation(int selectedAnimation) {
132
     public void removeAnimation(int selectedAnimation) {
106
     changedState = true;
133
     changedState = true;
107
     animations.remove(selectedAnimation);
134
     animations.remove(selectedAnimation);
108
-    selectedAnimation = 0;
109
     }
135
     }
110
 
136
 
137
+	/**
138
+	 * Get the name of an animation
139
+	 * @return The name
140
+	 * @param selectedAnimation The animation you want to get the name from
141
+	 */
111
   public String getAnimationName(int selectedAnimation) {
142
   public String getAnimationName(int selectedAnimation) {
112
       return animations.get(selectedAnimation).getName();
143
       return animations.get(selectedAnimation).getName();
113
     }
144
     }
114
 
145
 
146
+	/**
147
+	 * Set the name of an animation
148
+	 * @param s New name
149
+	 * @param selectedAnimation Index of the animation you want to change
150
+	 */
115
   public void setAnimationName(String s, int selectedAnimation) {
151
   public void setAnimationName(String s, int selectedAnimation) {
116
       changedState = true;
152
       changedState = true;
117
     animations.get(selectedAnimation).setName(s);
153
     animations.get(selectedAnimation).setName(s);
118
     }
154
     }
119
 
155
 
156
+	/**
157
+	 * Move an animation UP or DOWN.
158
+	 * @param dir Direction. Use UP and DOWN defined in cubeWorker
159
+	 * @param selectedAnimation Animation you want to move
160
+	 */
120
   public void moveAnimation(int dir, int selectedAnimation) {
161
   public void moveAnimation(int dir, int selectedAnimation) {
121
   changedState = true;
162
   changedState = true;
122
     if (dir == UP){
163
     if (dir == UP){
136
 // Frame Specific
177
 // Frame Specific
137
 // --------------------
178
 // --------------------
138
 
179
 
180
+	/**
181
+	 * Get the name of a frame.
182
+	 * @param anim Animation the frame is in
183
+	 * @param frame Index of the frame
184
+	 */
139
   public String getFrameName(int anim, int frame) {
185
   public String getFrameName(int anim, int frame) {
140
       return animations.get(anim).get(frame).getName();
186
       return animations.get(anim).get(frame).getName();
141
     }
187
     }
142
 
188
 
189
+	/**
190
+	 * Set the name of a frame.
191
+	 * @param s New name
192
+	 * @param anim Animation Index
193
+	 * @param frame Frame Index
194
+	 */
143
     public void setFrameName(String s, int anim, int frame) {
195
     public void setFrameName(String s, int anim, int frame) {
144
     changedState = true;
196
     changedState = true;
145
     animations.get(anim).get(frame).setName(s);
197
     animations.get(anim).get(frame).setName(s);
146
     }
198
     }
147
 
199
 
148
-    // Adds a Frame to the current animation.
149
-    // Returns id if okay, -1 if error
200
+	/**
201
+	 * Add a Frame to an animation.
202
+	 * @return Index of new Frame or -1 if not enough space
203
+	 * @param anim Animation Index
204
+	 */
150
     public int addFrame(int anim) {
205
     public int addFrame(int anim) {
151
     changedState = true;
206
     changedState = true;
152
     if (framesRemaining <= 0) {
207
     if (framesRemaining <= 0) {
159
     return s;
214
     return s;
160
     }
215
     }
161
 
216
 
162
-    // Remove the frame
217
+    /**
218
+	 * Remove a frame.
219
+	 * @param anim Animation Index
220
+	 * @param frame Frame you want to remove
221
+	 */
163
     public void removeFrame(int anim, int frame) {
222
     public void removeFrame(int anim, int frame) {
164
     changedState = true;
223
     changedState = true;
165
     animations.get(anim).remove(frame);
224
     animations.get(anim).remove(frame);
166
     }
225
     }
167
 
226
 
168
-    // Returns array with 64 bytes with led values
227
+	/**
228
+	 * Get the data of a frame.
229
+	 * @param anim Animation Index
230
+	 * @param frame Frame Index
231
+	 * @return 64 byte array with data (8 bits per byte => 512 bits)
232
+	 */
169
     public short[] getFrame(int anim, int frame) {
233
     public short[] getFrame(int anim, int frame) {
170
     return animations.get(anim).get(frame).getData();
234
     return animations.get(anim).get(frame).getData();
171
   }
235
   }
172
 
236
 
237
+	/**
238
+	 * Set the data of a frame
239
+	 * @param data 64 byte array with data
240
+	 * @param anim Animation Index
241
+	 * @param frame Frame Index
242
+	 * @see cubeWorker#getFrame(int, int) getFrame()
243
+	 */
173
     public void setFrame(short[] data, int anim, int frame) {
244
     public void setFrame(short[] data, int anim, int frame) {
174
     changedState = true;
245
     changedState = true;
175
     animations.get(anim).get(frame).setData(data);
246
     animations.get(anim).get(frame).setData(data);
176
     }
247
     }
177
 
248
 
178
-  // Frame duration in 1/24th of a second
249
+  /**
250
+   * Get frame duration.
251
+   * @param anim Animation Index
252
+   * @param frame Frame Index
253
+   * @return Duration. 0 means 1/24th of a second.
254
+   */
179
   public short getFrameTime(int anim, int frame) {
255
   public short getFrameTime(int anim, int frame) {
180
     return animations.get(anim).get(frame).getTime();
256
     return animations.get(anim).get(frame).getTime();
181
   }
257
   }
182
 
258
 
259
+  /**
260
+   * Set the frames duration.
261
+   * @param time New duration
262
+   * @param anim Animation Index
263
+   * @param frame Frame Index
264
+   * @see cubeWorker#getFrameTime(int, int) getFrameTime()
265
+   */
183
   public void setFrameTime(short time, int anim, int frame) {
266
   public void setFrameTime(short time, int anim, int frame) {
184
     changedState = true;
267
     changedState = true;
185
     animations.get(anim).get(frame).setTime(time);
268
     animations.get(anim).get(frame).setTime(time);
186
   }
269
   }
187
 
270
 
271
+  /**
272
+   * Move a frame.
273
+   * @param dir Direction to move. Use UP and DOWN from cubeWorker
274
+   * @param anim Animation Index
275
+   * @param frame Frame Index
276
+   * @see cubeWorker#moveAnimation(int, int) moveAnimation()
277
+   */
188
   public void moveFrame(int dir, int anim, int frame){
278
   public void moveFrame(int dir, int anim, int frame){
189
   changedState = true;
279
   changedState = true;
190
     if (dir == UP){
280
     if (dir == UP){
204
 // File Specific
294
 // File Specific
205
 // --------------------
295
 // --------------------
206
 
296
 
207
-    // Loads an animation file into this object
297
+	/**
298
+	 * Loads an animation file into this worker.
299
+	 * @param path Path of file to load
300
+	 * @return 0 on success, -1 on error.
301
+	 */
208
     public int loadState(String path) {
302
     public int loadState(String path) {
209
       changedState = false;
303
       changedState = false;
210
     try {
304
     try {
225
         return 0;
319
         return 0;
226
     }
320
     }
227
 
321
 
228
-    // Saves the state of this object in an animation file
322
+	/**
323
+	 * Save the state of this object into a file.
324
+	 * @param path Path to save file in
325
+	 * @return 0 on success, -1 on error
326
+	 */
229
     public int saveState(String path) {
327
     public int saveState(String path) {
230
            changedState = false;
328
            changedState = false;
231
        AnimationUtility.writeFile(path, animations);
329
        AnimationUtility.writeFile(path, animations);
236
            return 0;
334
            return 0;
237
     }
335
     }
238
 
336
 
239
-  // Returns true if last saved state != current state
337
+	/**
338
+	 * Check if something changed after loading/saving.
339
+	 * @return TRUE if something changed, FALSE otherwise
340
+	 */
240
     public boolean changedStateSinceSave() {
341
     public boolean changedStateSinceSave() {
241
            return changedState;
342
            return changedState;
242
     }
343
     }
245
 // Serial Port Specific
346
 // Serial Port Specific
246
 // --------------------
347
 // --------------------
247
 
348
 
248
-    // sends state of object to led cube
349
+    /**
350
+	 * Send all animations to the cube.
351
+	 * @param port Name of serial port to use
352
+	 * @return 0 on success, -1 on error
353
+	 */
249
     public int uploadState(String port) {
354
     public int uploadState(String port) {
250
 
355
 
251
-           return 0;
356
+           return -1;
252
     }
357
     }
253
 
358
 
254
-    // loads all state from the cube into this object
359
+	/**
360
+	 * Get all animations from the cube, place it in this object
361
+	 * @param port Name of serial port to use
362
+	 * @return 0 on success, -1 on error
363
+	 */
255
     public int downloadState(String port) {
364
     public int downloadState(String port) {
256
 
365
 
257
-           return 0;
366
+           return -1;
258
     }
367
     }
259
 
368
 
369
+	/**
370
+	 * Get the names of all available serial ports.
371
+	 * @return Array of port names. First entry is always "Select serial port..."
372
+	 */
260
     public String[] getSerialPorts() {
373
     public String[] getSerialPorts() {
261
 		String[] ports = {"Select serial port..."};
374
 		String[] ports = {"Select serial port..."};
262
 		String helperName;
375
 		String helperName;

+ 1
- 1
Cube Control/doc/AFrame.html Переглянути файл

2
 <!--NewPage-->
2
 <!--NewPage-->
3
 <HTML>
3
 <HTML>
4
 <HEAD>
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
 <TITLE>
6
 <TITLE>
7
 AFrame
7
 AFrame
8
 </TITLE>
8
 </TITLE>

+ 1
- 1
Cube Control/doc/Animation.html Переглянути файл

2
 <!--NewPage-->
2
 <!--NewPage-->
3
 <HTML>
3
 <HTML>
4
 <HEAD>
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
 <TITLE>
6
 <TITLE>
7
 Animation
7
 Animation
8
 </TITLE>
8
 </TITLE>

+ 1
- 1
Cube Control/doc/AnimationUtility.html Переглянути файл

2
 <!--NewPage-->
2
 <!--NewPage-->
3
 <HTML>
3
 <HTML>
4
 <HEAD>
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
 <TITLE>
6
 <TITLE>
7
 AnimationUtility
7
 AnimationUtility
8
 </TITLE>
8
 </TITLE>

+ 1
- 1
Cube Control/doc/HelperUtility.html Переглянути файл

2
 <!--NewPage-->
2
 <!--NewPage-->
3
 <HTML>
3
 <HTML>
4
 <HEAD>
4
 <HEAD>
5
-<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 16:34:30 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:18 CET 2011 -->
6
 <TITLE>
6
 <TITLE>
7
 HelperUtility
7
 HelperUtility
8
 </TITLE>
8
 </TITLE>

+ 1
- 1
Cube Control/doc/Led3D.html Переглянути файл

2
 <!--NewPage-->
2
 <!--NewPage-->
3
 <HTML>
3
 <HTML>
4
 <HEAD>
4
 <HEAD>
5
-<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 16:34:31 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:19 CET 2011 -->
6
 <TITLE>
6
 <TITLE>
7
 Led3D
7
 Led3D
8
 </TITLE>
8
 </TITLE>

+ 1
- 1
Cube Control/doc/allclasses-frame.html Переглянути файл

2
 <!--NewPage-->
2
 <!--NewPage-->
3
 <HTML>
3
 <HTML>
4
 <HEAD>
4
 <HEAD>
5
-<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 16:34:31 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:19 CET 2011 -->
6
 <TITLE>
6
 <TITLE>
7
 All Classes
7
 All Classes
8
 </TITLE>
8
 </TITLE>

+ 1
- 1
Cube Control/doc/allclasses-noframe.html Переглянути файл

2
 <!--NewPage-->
2
 <!--NewPage-->
3
 <HTML>
3
 <HTML>
4
 <HEAD>
4
 <HEAD>
5
-<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 16:34:31 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:19 CET 2011 -->
6
 <TITLE>
6
 <TITLE>
7
 All Classes
7
 All Classes
8
 </TITLE>
8
 </TITLE>

+ 1
- 1
Cube Control/doc/constant-values.html Переглянути файл

2
 <!--NewPage-->
2
 <!--NewPage-->
3
 <HTML>
3
 <HTML>
4
 <HEAD>
4
 <HEAD>
5
-<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 16:34:31 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:19 CET 2011 -->
6
 <TITLE>
6
 <TITLE>
7
 Constant Field Values
7
 Constant Field Values
8
 </TITLE>
8
 </TITLE>

+ 114
- 47
Cube Control/doc/cubeWorker.html Переглянути файл

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

+ 1
- 1
Cube Control/doc/deprecated-list.html Переглянути файл

2
 <!--NewPage-->
2
 <!--NewPage-->
3
 <HTML>
3
 <HTML>
4
 <HEAD>
4
 <HEAD>
5
-<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 16:34:31 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:19 CET 2011 -->
6
 <TITLE>
6
 <TITLE>
7
 Deprecated List
7
 Deprecated List
8
 </TITLE>
8
 </TITLE>

+ 1
- 1
Cube Control/doc/frame.html Переглянути файл

2
 <!--NewPage-->
2
 <!--NewPage-->
3
 <HTML>
3
 <HTML>
4
 <HEAD>
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
 <TITLE>
6
 <TITLE>
7
 Frame
7
 Frame
8
 </TITLE>
8
 </TITLE>

+ 1
- 1
Cube Control/doc/help-doc.html Переглянути файл

2
 <!--NewPage-->
2
 <!--NewPage-->
3
 <HTML>
3
 <HTML>
4
 <HEAD>
4
 <HEAD>
5
-<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 16:34:31 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:19 CET 2011 -->
6
 <TITLE>
6
 <TITLE>
7
 API Help
7
 API Help
8
 </TITLE>
8
 </TITLE>

+ 32
- 31
Cube Control/doc/index-all.html Переглянути файл

2
 <!--NewPage-->
2
 <!--NewPage-->
3
 <HTML>
3
 <HTML>
4
 <HEAD>
4
 <HEAD>
5
-<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 16:34:31 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:19 CET 2011 -->
6
 <TITLE>
6
 <TITLE>
7
 Index
7
 Index
8
 </TITLE>
8
 </TITLE>
88
 <DD>Add a specified frame at the specified position
88
 <DD>Add a specified frame at the specified position
89
 <DT><A HREF="./cubeWorker.html#addAnimation()"><B>addAnimation()</B></A> - 
89
 <DT><A HREF="./cubeWorker.html#addAnimation()"><B>addAnimation()</B></A> - 
90
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
90
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
91
-<DD>&nbsp;
91
+<DD>Add an animation.
92
 <DT><A HREF="./cubeWorker.html#addFrame(int)"><B>addFrame(int)</B></A> - 
92
 <DT><A HREF="./cubeWorker.html#addFrame(int)"><B>addFrame(int)</B></A> - 
93
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
93
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
94
-<DD>&nbsp;
94
+<DD>Add a Frame to an animation.
95
 <DT><A HREF="./AFrame.html" title="class in &lt;Unnamed&gt;"><B>AFrame</B></A> - Class in <A HREF="./package-summary.html">&lt;Unnamed&gt;</A><DD>The representation of a single frame.<DT><A HREF="./AFrame.html#AFrame()"><B>AFrame()</B></A> - 
95
 <DT><A HREF="./AFrame.html" title="class in &lt;Unnamed&gt;"><B>AFrame</B></A> - Class in <A HREF="./package-summary.html">&lt;Unnamed&gt;</A><DD>The representation of a single frame.<DT><A HREF="./AFrame.html#AFrame()"><B>AFrame()</B></A> - 
96
 Constructor for class <A HREF="./AFrame.html" title="class in &lt;Unnamed&gt;">AFrame</A>
96
 Constructor for class <A HREF="./AFrame.html" title="class in &lt;Unnamed&gt;">AFrame</A>
97
 <DD>&nbsp;
97
 <DD>&nbsp;
120
 <DL>
120
 <DL>
121
 <DT><A HREF="./layerEditFrame.html#btnClicked(int, int)"><B>btnClicked(int, int)</B></A> - 
121
 <DT><A HREF="./layerEditFrame.html#btnClicked(int, int)"><B>btnClicked(int, int)</B></A> - 
122
 Method in class <A HREF="./layerEditFrame.html" title="class in &lt;Unnamed&gt;">layerEditFrame</A>
122
 Method in class <A HREF="./layerEditFrame.html" title="class in &lt;Unnamed&gt;">layerEditFrame</A>
123
-<DD>&nbsp;
123
+<DD>Gets called when the user clicks on a Toggle Button.
124
 </DL>
124
 </DL>
125
 <HR>
125
 <HR>
126
 <A NAME="_C_"><!-- --></A><H2>
126
 <A NAME="_C_"><!-- --></A><H2>
128
 <DL>
128
 <DL>
129
 <DT><A HREF="./layerEditFrame.html#cancel()"><B>cancel()</B></A> - 
129
 <DT><A HREF="./layerEditFrame.html#cancel()"><B>cancel()</B></A> - 
130
 Method in class <A HREF="./layerEditFrame.html" title="class in &lt;Unnamed&gt;">layerEditFrame</A>
130
 Method in class <A HREF="./layerEditFrame.html" title="class in &lt;Unnamed&gt;">layerEditFrame</A>
131
-<DD>&nbsp;
131
+<DD>Action of Cancel Button.
132
 <DT><A HREF="./cubeWorker.html#changedStateSinceSave()"><B>changedStateSinceSave()</B></A> - 
132
 <DT><A HREF="./cubeWorker.html#changedStateSinceSave()"><B>changedStateSinceSave()</B></A> - 
133
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
133
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
134
-<DD>&nbsp;
135
-<DT><A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;"><B>cubeWorker</B></A> - Class in <A HREF="./package-summary.html">&lt;Unnamed&gt;</A><DD>&nbsp;</DL>
134
+<DD>Check if something changed after loading/saving.
135
+<DT><A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;"><B>cubeWorker</B></A> - Class in <A HREF="./package-summary.html">&lt;Unnamed&gt;</A><DD>This class holds all Data of the Application.</DL>
136
 <HR>
136
 <HR>
137
 <A NAME="_D_"><!-- --></A><H2>
137
 <A NAME="_D_"><!-- --></A><H2>
138
 <B>D</B></H2>
138
 <B>D</B></H2>
142
 <DD>&nbsp;
142
 <DD>&nbsp;
143
 <DT><A HREF="./cubeWorker.html#downloadState(java.lang.String)"><B>downloadState(String)</B></A> - 
143
 <DT><A HREF="./cubeWorker.html#downloadState(java.lang.String)"><B>downloadState(String)</B></A> - 
144
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
144
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
145
-<DD>&nbsp;
145
+<DD>Get all animations from the cube, place it in this object
146
 </DL>
146
 </DL>
147
 <HR>
147
 <HR>
148
 <A NAME="_E_"><!-- --></A><H2>
148
 <A NAME="_E_"><!-- --></A><H2>
194
 <DD>&nbsp;
194
 <DD>&nbsp;
195
 <DT><A HREF="./cubeWorker.html#framesRemaining()"><B>framesRemaining()</B></A> - 
195
 <DT><A HREF="./cubeWorker.html#framesRemaining()"><B>framesRemaining()</B></A> - 
196
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
196
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
197
-<DD>&nbsp;
197
+<DD>Get the number of frames you can add until the Cubes memory is full.
198
 <DT><A HREF="./Frame.html#frameUp_ActionPerformed(java.awt.event.ActionEvent)"><B>frameUp_ActionPerformed(ActionEvent)</B></A> - 
198
 <DT><A HREF="./Frame.html#frameUp_ActionPerformed(java.awt.event.ActionEvent)"><B>frameUp_ActionPerformed(ActionEvent)</B></A> - 
199
 Method in class <A HREF="./Frame.html" title="class in &lt;Unnamed&gt;">Frame</A>
199
 Method in class <A HREF="./Frame.html" title="class in &lt;Unnamed&gt;">Frame</A>
200
 <DD>&nbsp;
200
 <DD>&nbsp;
211
 <DD>&nbsp;
211
 <DD>&nbsp;
212
 <DT><A HREF="./cubeWorker.html#getAnimationName(int)"><B>getAnimationName(int)</B></A> - 
212
 <DT><A HREF="./cubeWorker.html#getAnimationName(int)"><B>getAnimationName(int)</B></A> - 
213
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
213
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
214
-<DD>&nbsp;
214
+<DD>Get the name of an animation
215
 <DT><A HREF="./AFrame.html#getData()"><B>getData()</B></A> - 
215
 <DT><A HREF="./AFrame.html#getData()"><B>getData()</B></A> - 
216
 Method in class <A HREF="./AFrame.html" title="class in &lt;Unnamed&gt;">AFrame</A>
216
 Method in class <A HREF="./AFrame.html" title="class in &lt;Unnamed&gt;">AFrame</A>
217
 <DD>Gets tha Data of this Frame
217
 <DD>Gets tha Data of this Frame
218
 <DT><A HREF="./layerEditFrame.html#getFinalFrame()"><B>getFinalFrame()</B></A> - 
218
 <DT><A HREF="./layerEditFrame.html#getFinalFrame()"><B>getFinalFrame()</B></A> - 
219
 Method in class <A HREF="./layerEditFrame.html" title="class in &lt;Unnamed&gt;">layerEditFrame</A>
219
 Method in class <A HREF="./layerEditFrame.html" title="class in &lt;Unnamed&gt;">layerEditFrame</A>
220
-<DD>&nbsp;
220
+<DD>Get the edited data back.
221
 <DT><A HREF="./cubeWorker.html#getFrame(int, int)"><B>getFrame(int, int)</B></A> - 
221
 <DT><A HREF="./cubeWorker.html#getFrame(int, int)"><B>getFrame(int, int)</B></A> - 
222
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
222
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
223
-<DD>&nbsp;
223
+<DD>Get the data of a frame.
224
 <DT><A HREF="./cubeWorker.html#getFrameName(int, int)"><B>getFrameName(int, int)</B></A> - 
224
 <DT><A HREF="./cubeWorker.html#getFrameName(int, int)"><B>getFrameName(int, int)</B></A> - 
225
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
225
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
226
-<DD>&nbsp;
226
+<DD>Get the name of a frame.
227
 <DT><A HREF="./cubeWorker.html#getFrameTime(int, int)"><B>getFrameTime(int, int)</B></A> - 
227
 <DT><A HREF="./cubeWorker.html#getFrameTime(int, int)"><B>getFrameTime(int, int)</B></A> - 
228
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
228
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
229
-<DD>&nbsp;
229
+<DD>Get frame duration.
230
 <DT><A HREF="./AnimationUtility.html#getLastError()"><B>getLastError()</B></A> - 
230
 <DT><A HREF="./AnimationUtility.html#getLastError()"><B>getLastError()</B></A> - 
231
 Static method in class <A HREF="./AnimationUtility.html" title="class in &lt;Unnamed&gt;">AnimationUtility</A>
231
 Static method in class <A HREF="./AnimationUtility.html" title="class in &lt;Unnamed&gt;">AnimationUtility</A>
232
 <DD>Get the last error that occured while writing
232
 <DD>Get the last error that occured while writing
241
 <DD>Gets the name of this animation
241
 <DD>Gets the name of this animation
242
 <DT><A HREF="./cubeWorker.html#getSerialPorts()"><B>getSerialPorts()</B></A> - 
242
 <DT><A HREF="./cubeWorker.html#getSerialPorts()"><B>getSerialPorts()</B></A> - 
243
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
243
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
244
-<DD>&nbsp;
244
+<DD>Get the names of all available serial ports.
245
 <DT><A HREF="./AFrame.html#getTime()"><B>getTime()</B></A> - 
245
 <DT><A HREF="./AFrame.html#getTime()"><B>getTime()</B></A> - 
246
 Method in class <A HREF="./AFrame.html" title="class in &lt;Unnamed&gt;">AFrame</A>
246
 Method in class <A HREF="./AFrame.html" title="class in &lt;Unnamed&gt;">AFrame</A>
247
 <DD>Gets the Duration of this Frame
247
 <DD>Gets the Duration of this Frame
258
 <A NAME="_L_"><!-- --></A><H2>
258
 <A NAME="_L_"><!-- --></A><H2>
259
 <B>L</B></H2>
259
 <B>L</B></H2>
260
 <DL>
260
 <DL>
261
-<DT><A HREF="./layerEditFrame.html" title="class in &lt;Unnamed&gt;"><B>layerEditFrame</B></A> - Class in <A HREF="./package-summary.html">&lt;Unnamed&gt;</A><DD>&nbsp;<DT><A HREF="./layerEditFrame.html#layerEditFrame(int, int, int, cubeWorker, Frame)"><B>layerEditFrame(int, int, int, cubeWorker, Frame)</B></A> - 
261
+<DT><A HREF="./layerEditFrame.html" title="class in &lt;Unnamed&gt;"><B>layerEditFrame</B></A> - Class in <A HREF="./package-summary.html">&lt;Unnamed&gt;</A><DD>Shows a windows that allows the user to toggle the state of 64 LEDs.<DT><A HREF="./layerEditFrame.html#layerEditFrame(int, int, int, cubeWorker, Frame)"><B>layerEditFrame(int, int, int, cubeWorker, Frame)</B></A> - 
262
 Constructor for class <A HREF="./layerEditFrame.html" title="class in &lt;Unnamed&gt;">layerEditFrame</A>
262
 Constructor for class <A HREF="./layerEditFrame.html" title="class in &lt;Unnamed&gt;">layerEditFrame</A>
263
-<DD>&nbsp;
263
+<DD>Create a new layer editor.
264
 <DT><A HREF="./Led3D.html" title="class in &lt;Unnamed&gt;"><B>Led3D</B></A> - Class in <A HREF="./package-summary.html">&lt;Unnamed&gt;</A><DD>This class is responsible for displaying the 3D View of our Cube.<DT><A HREF="./Led3D.html#Led3D(javax.media.j3d.Canvas3D)"><B>Led3D(Canvas3D)</B></A> - 
264
 <DT><A HREF="./Led3D.html" title="class in &lt;Unnamed&gt;"><B>Led3D</B></A> - Class in <A HREF="./package-summary.html">&lt;Unnamed&gt;</A><DD>This class is responsible for displaying the 3D View of our Cube.<DT><A HREF="./Led3D.html#Led3D(javax.media.j3d.Canvas3D)"><B>Led3D(Canvas3D)</B></A> - 
265
 Constructor for class <A HREF="./Led3D.html" title="class in &lt;Unnamed&gt;">Led3D</A>
265
 Constructor for class <A HREF="./Led3D.html" title="class in &lt;Unnamed&gt;">Led3D</A>
266
 <DD>&nbsp;
266
 <DD>&nbsp;
269
 <DD>&nbsp;
269
 <DD>&nbsp;
270
 <DT><A HREF="./cubeWorker.html#loadState(java.lang.String)"><B>loadState(String)</B></A> - 
270
 <DT><A HREF="./cubeWorker.html#loadState(java.lang.String)"><B>loadState(String)</B></A> - 
271
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
271
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
272
-<DD>&nbsp;
272
+<DD>Loads an animation file into this worker.
273
 </DL>
273
 </DL>
274
 <HR>
274
 <HR>
275
 <A NAME="_M_"><!-- --></A><H2>
275
 <A NAME="_M_"><!-- --></A><H2>
280
 <DD>&nbsp;
280
 <DD>&nbsp;
281
 <DT><A HREF="./cubeWorker.html#moveAnimation(int, int)"><B>moveAnimation(int, int)</B></A> - 
281
 <DT><A HREF="./cubeWorker.html#moveAnimation(int, int)"><B>moveAnimation(int, int)</B></A> - 
282
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
282
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
283
-<DD>&nbsp;
283
+<DD>Move an animation UP or DOWN.
284
 <DT><A HREF="./cubeWorker.html#moveFrame(int, int, int)"><B>moveFrame(int, int, int)</B></A> - 
284
 <DT><A HREF="./cubeWorker.html#moveFrame(int, int, int)"><B>moveFrame(int, int, int)</B></A> - 
285
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
285
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
286
-<DD>&nbsp;
286
+<DD>Move a frame.
287
 </DL>
287
 </DL>
288
 <HR>
288
 <HR>
289
 <A NAME="_N_"><!-- --></A><H2>
289
 <A NAME="_N_"><!-- --></A><H2>
291
 <DL>
291
 <DL>
292
 <DT><A HREF="./cubeWorker.html#numOfAnimations()"><B>numOfAnimations()</B></A> - 
292
 <DT><A HREF="./cubeWorker.html#numOfAnimations()"><B>numOfAnimations()</B></A> - 
293
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
293
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
294
-<DD>&nbsp;
294
+<DD>Get the number of animations in this worker.
295
 <DT><A HREF="./cubeWorker.html#numOfFrames(int)"><B>numOfFrames(int)</B></A> - 
295
 <DT><A HREF="./cubeWorker.html#numOfFrames(int)"><B>numOfFrames(int)</B></A> - 
296
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
296
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
297
-<DD>&nbsp;
297
+<DD>Get the number of frames in an animation.
298
 </DL>
298
 </DL>
299
 <HR>
299
 <HR>
300
 <A NAME="_P_"><!-- --></A><H2>
300
 <A NAME="_P_"><!-- --></A><H2>
316
 <DD>Removes a frame.
316
 <DD>Removes a frame.
317
 <DT><A HREF="./cubeWorker.html#removeAnimation(int)"><B>removeAnimation(int)</B></A> - 
317
 <DT><A HREF="./cubeWorker.html#removeAnimation(int)"><B>removeAnimation(int)</B></A> - 
318
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
318
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
319
-<DD>&nbsp;
319
+<DD>Remove an animation.
320
 <DT><A HREF="./cubeWorker.html#removeFrame(int, int)"><B>removeFrame(int, int)</B></A> - 
320
 <DT><A HREF="./cubeWorker.html#removeFrame(int, int)"><B>removeFrame(int, int)</B></A> - 
321
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
321
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
322
-<DD>&nbsp;
322
+<DD>Remove a frame.
323
 <DT><A HREF="./HelperUtility.html#runHelper(java.lang.String[])"><B>runHelper(String[])</B></A> - 
323
 <DT><A HREF="./HelperUtility.html#runHelper(java.lang.String[])"><B>runHelper(String[])</B></A> - 
324
 Static method in class <A HREF="./HelperUtility.html" title="class in &lt;Unnamed&gt;">HelperUtility</A>
324
 Static method in class <A HREF="./HelperUtility.html" title="class in &lt;Unnamed&gt;">HelperUtility</A>
325
 <DD>Run the serialHelper with the given arguments
325
 <DD>Run the serialHelper with the given arguments
330
 <DL>
330
 <DL>
331
 <DT><A HREF="./layerEditFrame.html#save()"><B>save()</B></A> - 
331
 <DT><A HREF="./layerEditFrame.html#save()"><B>save()</B></A> - 
332
 Method in class <A HREF="./layerEditFrame.html" title="class in &lt;Unnamed&gt;">layerEditFrame</A>
332
 Method in class <A HREF="./layerEditFrame.html" title="class in &lt;Unnamed&gt;">layerEditFrame</A>
333
-<DD>&nbsp;
333
+<DD>Gets called when clicking the save button.
334
 <DT><A HREF="./Frame.html#save_ActionPerformed(java.awt.event.ActionEvent)"><B>save_ActionPerformed(ActionEvent)</B></A> - 
334
 <DT><A HREF="./Frame.html#save_ActionPerformed(java.awt.event.ActionEvent)"><B>save_ActionPerformed(ActionEvent)</B></A> - 
335
 Method in class <A HREF="./Frame.html" title="class in &lt;Unnamed&gt;">Frame</A>
335
 Method in class <A HREF="./Frame.html" title="class in &lt;Unnamed&gt;">Frame</A>
336
 <DD>&nbsp;
336
 <DD>&nbsp;
339
 <DD>&nbsp;
339
 <DD>&nbsp;
340
 <DT><A HREF="./cubeWorker.html#saveState(java.lang.String)"><B>saveState(String)</B></A> - 
340
 <DT><A HREF="./cubeWorker.html#saveState(java.lang.String)"><B>saveState(String)</B></A> - 
341
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
341
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
342
-<DD>&nbsp;
342
+<DD>Save the state of this object into a file.
343
 <DT><A HREF="./Animation.html#set(AFrame, int)"><B>set(AFrame, int)</B></A> - 
343
 <DT><A HREF="./Animation.html#set(AFrame, int)"><B>set(AFrame, int)</B></A> - 
344
 Method in class <A HREF="./Animation.html" title="class in &lt;Unnamed&gt;">Animation</A>
344
 Method in class <A HREF="./Animation.html" title="class in &lt;Unnamed&gt;">Animation</A>
345
 <DD>Sets the selected Frame
345
 <DD>Sets the selected Frame
346
 <DT><A HREF="./cubeWorker.html#setAnimationName(java.lang.String, int)"><B>setAnimationName(String, int)</B></A> - 
346
 <DT><A HREF="./cubeWorker.html#setAnimationName(java.lang.String, int)"><B>setAnimationName(String, int)</B></A> - 
347
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
347
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
348
-<DD>&nbsp;
348
+<DD>Set the name of an animation
349
+ @param s New name
349
 <DT><A HREF="./AFrame.html#setData(short[])"><B>setData(short[])</B></A> - 
350
 <DT><A HREF="./AFrame.html#setData(short[])"><B>setData(short[])</B></A> - 
350
 Method in class <A HREF="./AFrame.html" title="class in &lt;Unnamed&gt;">AFrame</A>
351
 Method in class <A HREF="./AFrame.html" title="class in &lt;Unnamed&gt;">AFrame</A>
351
 <DD>Sets the Data of this Frame
352
 <DD>Sets the Data of this Frame
354
 <DD>Sets the data that is displayed by the LEDs
355
 <DD>Sets the data that is displayed by the LEDs
355
 <DT><A HREF="./cubeWorker.html#setFrame(short[], int, int)"><B>setFrame(short[], int, int)</B></A> - 
356
 <DT><A HREF="./cubeWorker.html#setFrame(short[], int, int)"><B>setFrame(short[], int, int)</B></A> - 
356
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
357
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
357
-<DD>&nbsp;
358
+<DD>Set the data of a frame
358
 <DT><A HREF="./cubeWorker.html#setFrameName(java.lang.String, int, int)"><B>setFrameName(String, int, int)</B></A> - 
359
 <DT><A HREF="./cubeWorker.html#setFrameName(java.lang.String, int, int)"><B>setFrameName(String, int, int)</B></A> - 
359
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
360
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
360
-<DD>&nbsp;
361
+<DD>Set the name of a frame.
361
 <DT><A HREF="./cubeWorker.html#setFrameTime(short, int, int)"><B>setFrameTime(short, int, int)</B></A> - 
362
 <DT><A HREF="./cubeWorker.html#setFrameTime(short, int, int)"><B>setFrameTime(short, int, int)</B></A> - 
362
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
363
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
363
-<DD>&nbsp;
364
+<DD>Set the frames duration.
364
 <DT><A HREF="./AFrame.html#setName(java.lang.String)"><B>setName(String)</B></A> - 
365
 <DT><A HREF="./AFrame.html#setName(java.lang.String)"><B>setName(String)</B></A> - 
365
 Method in class <A HREF="./AFrame.html" title="class in &lt;Unnamed&gt;">AFrame</A>
366
 Method in class <A HREF="./AFrame.html" title="class in &lt;Unnamed&gt;">AFrame</A>
366
 <DD>Sets the Name of this Frame
367
 <DD>Sets the Name of this Frame
383
 <DD>&nbsp;
384
 <DD>&nbsp;
384
 <DT><A HREF="./cubeWorker.html#uploadState(java.lang.String)"><B>uploadState(String)</B></A> - 
385
 <DT><A HREF="./cubeWorker.html#uploadState(java.lang.String)"><B>uploadState(String)</B></A> - 
385
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
386
 Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>
386
-<DD>&nbsp;
387
+<DD>Send all animations to the cube.
387
 </DL>
388
 </DL>
388
 <HR>
389
 <HR>
389
 <A NAME="_V_"><!-- --></A><H2>
390
 <A NAME="_V_"><!-- --></A><H2>

+ 1
- 1
Cube Control/doc/index.html Переглянути файл

2
 <!--NewPage-->
2
 <!--NewPage-->
3
 <HTML>
3
 <HTML>
4
 <HEAD>
4
 <HEAD>
5
-<!-- Generated by javadoc on Mon Dec 05 16:34:31 CET 2011-->
5
+<!-- Generated by javadoc on Mon Dec 05 17:23:19 CET 2011-->
6
 <TITLE>
6
 <TITLE>
7
 Generated Documentation (Untitled)
7
 Generated Documentation (Untitled)
8
 </TITLE>
8
 </TITLE>

+ 25
- 8
Cube Control/doc/layerEditFrame.html Переглянути файл

2
 <!--NewPage-->
2
 <!--NewPage-->
3
 <HTML>
3
 <HTML>
4
 <HEAD>
4
 <HEAD>
5
-<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 16:34:30 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:18 CET 2011 -->
6
 <TITLE>
6
 <TITLE>
7
 layerEditFrame
7
 layerEditFrame
8
 </TITLE>
8
 </TITLE>
104
 </PRE>
104
 </PRE>
105
 
105
 
106
 <P>
106
 <P>
107
+Shows a windows that allows the user to toggle the state of 64 LEDs.
108
+<P>
109
+
110
+<P>
107
 <DL>
111
 <DL>
108
 <DT><B>See Also:</B><DD><A HREF="serialized-form.html#layerEditFrame">Serialized Form</A></DL>
112
 <DT><B>See Also:</B><DD><A HREF="serialized-form.html#layerEditFrame">Serialized Form</A></DL>
109
 <HR>
113
 <HR>
239
                <A HREF="Frame.html" title="class in &lt;Unnamed&gt;">Frame</A>&nbsp;LEDframe)</CODE>
243
                <A HREF="Frame.html" title="class in &lt;Unnamed&gt;">Frame</A>&nbsp;LEDframe)</CODE>
240
 
244
 
241
 <BR>
245
 <BR>
242
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
246
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new layer editor.</TD>
243
 </TR>
247
 </TR>
244
 </TABLE>
248
 </TABLE>
245
 &nbsp;
249
 &nbsp;
258
            int&nbsp;j)</CODE>
262
            int&nbsp;j)</CODE>
259
 
263
 
260
 <BR>
264
 <BR>
261
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
265
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets called when the user clicks on a Toggle Button.</TD>
262
 </TR>
266
 </TR>
263
 <TR BGCOLOR="white" CLASS="TableRowColor">
267
 <TR BGCOLOR="white" CLASS="TableRowColor">
264
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
268
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
266
 <TD><CODE><B><A HREF="layerEditFrame.html#cancel()">cancel</A></B>()</CODE>
270
 <TD><CODE><B><A HREF="layerEditFrame.html#cancel()">cancel</A></B>()</CODE>
267
 
271
 
268
 <BR>
272
 <BR>
269
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
273
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Action of Cancel Button.</TD>
270
 </TR>
274
 </TR>
271
 <TR BGCOLOR="white" CLASS="TableRowColor">
275
 <TR BGCOLOR="white" CLASS="TableRowColor">
272
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
276
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
274
 <TD><CODE><B><A HREF="layerEditFrame.html#getFinalFrame()">getFinalFrame</A></B>()</CODE>
278
 <TD><CODE><B><A HREF="layerEditFrame.html#getFinalFrame()">getFinalFrame</A></B>()</CODE>
275
 
279
 
276
 <BR>
280
 <BR>
277
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
281
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the edited data back.</TD>
278
 </TR>
282
 </TR>
279
 <TR BGCOLOR="white" CLASS="TableRowColor">
283
 <TR BGCOLOR="white" CLASS="TableRowColor">
280
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
284
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
282
 <TD><CODE><B><A HREF="layerEditFrame.html#save()">save</A></B>()</CODE>
286
 <TD><CODE><B><A HREF="layerEditFrame.html#save()">save</A></B>()</CODE>
283
 
287
 
284
 <BR>
288
 <BR>
285
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
289
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets called when clicking the save button.</TD>
286
 </TR>
290
 </TR>
287
 </TABLE>
291
 </TABLE>
288
 &nbsp;<A NAME="methods_inherited_from_class_javax.swing.JFrame"><!-- --></A>
292
 &nbsp;<A NAME="methods_inherited_from_class_javax.swing.JFrame"><!-- --></A>
370
                       <A HREF="cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>&nbsp;work,
374
                       <A HREF="cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>&nbsp;work,
371
                       <A HREF="Frame.html" title="class in &lt;Unnamed&gt;">Frame</A>&nbsp;LEDframe)</PRE>
375
                       <A HREF="Frame.html" title="class in &lt;Unnamed&gt;">Frame</A>&nbsp;LEDframe)</PRE>
372
 <DL>
376
 <DL>
377
+<DD>Create a new layer editor.
378
+<P>
379
+<DL>
380
+<DT><B>Parameters:</B><DD><CODE>animIndex</CODE> - Current animation<DD><CODE>frameIndex</CODE> - Current frame<DD><CODE>layerIndex</CODE> - Layer to edit<DD><CODE>work</CODE> - the cubeWorker containing the data<DD><CODE>LEDframe</CODE> - Used to call valueChanged, to trigger 3D View update</DL>
373
 </DL>
381
 </DL>
374
 
382
 
375
 <!-- ============ METHOD DETAIL ========== -->
383
 <!-- ============ METHOD DETAIL ========== -->
387
 <PRE>
395
 <PRE>
388
 public short[] <B>getFinalFrame</B>()</PRE>
396
 public short[] <B>getFinalFrame</B>()</PRE>
389
 <DL>
397
 <DL>
398
+<DD>Get the edited data back. NOTE: The worker is updated automagically!
399
+<P>
390
 <DD><DL>
400
 <DD><DL>
391
-</DL>
401
+
402
+<DT><B>Returns:</B><DD>Now changed 64 byte array.</DL>
392
 </DD>
403
 </DD>
393
 </DL>
404
 </DL>
394
 <HR>
405
 <HR>
399
 public void <B>btnClicked</B>(int&nbsp;i,
410
 public void <B>btnClicked</B>(int&nbsp;i,
400
                        int&nbsp;j)</PRE>
411
                        int&nbsp;j)</PRE>
401
 <DL>
412
 <DL>
413
+<DD>Gets called when the user clicks on a Toggle Button.
414
+<P>
402
 <DD><DL>
415
 <DD><DL>
403
-</DL>
416
+<DT><B>Parameters:</B><DD><CODE>i</CODE> - X-Coordinate of Button<DD><CODE>j</CODE> - Y-Coordinate of Button</DL>
404
 </DD>
417
 </DD>
405
 </DL>
418
 </DL>
406
 <HR>
419
 <HR>
410
 <PRE>
423
 <PRE>
411
 public void <B>cancel</B>()</PRE>
424
 public void <B>cancel</B>()</PRE>
412
 <DL>
425
 <DL>
426
+<DD>Action of Cancel Button. Removes this window...
427
+<P>
413
 <DD><DL>
428
 <DD><DL>
414
 </DL>
429
 </DL>
415
 </DD>
430
 </DD>
421
 <PRE>
436
 <PRE>
422
 public void <B>save</B>()</PRE>
437
 public void <B>save</B>()</PRE>
423
 <DL>
438
 <DL>
439
+<DD>Gets called when clicking the save button. Puts data back into Worker and fires ListSelectionEvent in Worker, so that the 3D View is updated.
440
+<P>
424
 <DD><DL>
441
 <DD><DL>
425
 </DL>
442
 </DL>
426
 </DD>
443
 </DD>

+ 1
- 1
Cube Control/doc/overview-tree.html Переглянути файл

2
 <!--NewPage-->
2
 <!--NewPage-->
3
 <HTML>
3
 <HTML>
4
 <HEAD>
4
 <HEAD>
5
-<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 16:34:31 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:19 CET 2011 -->
6
 <TITLE>
6
 <TITLE>
7
 Class Hierarchy
7
 Class Hierarchy
8
 </TITLE>
8
 </TITLE>

+ 1
- 1
Cube Control/doc/package-frame.html Переглянути файл

2
 <!--NewPage-->
2
 <!--NewPage-->
3
 <HTML>
3
 <HTML>
4
 <HEAD>
4
 <HEAD>
5
-<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 16:34:31 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:19 CET 2011 -->
6
 <TITLE>
6
 <TITLE>
7
 &lt;Unnamed&gt;
7
 &lt;Unnamed&gt;
8
 </TITLE>
8
 </TITLE>

+ 3
- 3
Cube Control/doc/package-summary.html Переглянути файл

2
 <!--NewPage-->
2
 <!--NewPage-->
3
 <HTML>
3
 <HTML>
4
 <HEAD>
4
 <HEAD>
5
-<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 16:34:31 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:19 CET 2011 -->
6
 <TITLE>
6
 <TITLE>
7
 
7
 
8
 </TITLE>
8
 </TITLE>
90
 </TR>
90
 </TR>
91
 <TR BGCOLOR="white" CLASS="TableRowColor">
91
 <TR BGCOLOR="white" CLASS="TableRowColor">
92
 <TD WIDTH="15%"><B><A HREF="cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A></B></TD>
92
 <TD WIDTH="15%"><B><A HREF="cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A></B></TD>
93
-<TD>&nbsp;</TD>
93
+<TD>This class holds all Data of the Application.</TD>
94
 </TR>
94
 </TR>
95
 <TR BGCOLOR="white" CLASS="TableRowColor">
95
 <TR BGCOLOR="white" CLASS="TableRowColor">
96
 <TD WIDTH="15%"><B><A HREF="Frame.html" title="class in &lt;Unnamed&gt;">Frame</A></B></TD>
96
 <TD WIDTH="15%"><B><A HREF="Frame.html" title="class in &lt;Unnamed&gt;">Frame</A></B></TD>
102
 </TR>
102
 </TR>
103
 <TR BGCOLOR="white" CLASS="TableRowColor">
103
 <TR BGCOLOR="white" CLASS="TableRowColor">
104
 <TD WIDTH="15%"><B><A HREF="layerEditFrame.html" title="class in &lt;Unnamed&gt;">layerEditFrame</A></B></TD>
104
 <TD WIDTH="15%"><B><A HREF="layerEditFrame.html" title="class in &lt;Unnamed&gt;">layerEditFrame</A></B></TD>
105
-<TD>&nbsp;</TD>
105
+<TD>Shows a windows that allows the user to toggle the state of 64 LEDs.</TD>
106
 </TR>
106
 </TR>
107
 <TR BGCOLOR="white" CLASS="TableRowColor">
107
 <TR BGCOLOR="white" CLASS="TableRowColor">
108
 <TD WIDTH="15%"><B><A HREF="Led3D.html" title="class in &lt;Unnamed&gt;">Led3D</A></B></TD>
108
 <TD WIDTH="15%"><B><A HREF="Led3D.html" title="class in &lt;Unnamed&gt;">Led3D</A></B></TD>

+ 1
- 1
Cube Control/doc/package-tree.html Переглянути файл

2
 <!--NewPage-->
2
 <!--NewPage-->
3
 <HTML>
3
 <HTML>
4
 <HEAD>
4
 <HEAD>
5
-<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 16:34:31 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:19 CET 2011 -->
6
 <TITLE>
6
 <TITLE>
7
  Class Hierarchy
7
  Class Hierarchy
8
 </TITLE>
8
 </TITLE>

+ 1
- 1
Cube Control/doc/serialized-form.html Переглянути файл

2
 <!--NewPage-->
2
 <!--NewPage-->
3
 <HTML>
3
 <HTML>
4
 <HEAD>
4
 <HEAD>
5
-<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 16:34:31 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:19 CET 2011 -->
6
 <TITLE>
6
 <TITLE>
7
 Serialized Form
7
 Serialized Form
8
 </TITLE>
8
 </TITLE>

+ 31
- 3
Cube Control/layerEditFrame.java Переглянути файл

27
 import javax.swing.*;
27
 import javax.swing.*;
28
 import javax.swing.event.*;
28
 import javax.swing.event.*;
29
 
29
 
30
+/**
31
+ * Shows a windows that allows the user to toggle the state of 64 LEDs.
32
+ * @author Max Nuding
33
+ * @author Thomas Buck
34
+ * @author Felix Bäder
35
+ * @version 1.0
36
+ */
30
 
37
 
31
 public class layerEditFrame extends JFrame {
38
 public class layerEditFrame extends JFrame {
32
   // Anfang Attribute
39
   // Anfang Attribute
40
+
33
   private JPanel panelLED1 = new JPanel(null, true);
41
   private JPanel panelLED1 = new JPanel(null, true);
34
   JButton[][] ledPanels = new JButton[8][8];
42
   JButton[][] ledPanels = new JButton[8][8];
35
   ImageIcon on = new ImageIcon(getClass().getResource("LEDon.png"));
43
   ImageIcon on = new ImageIcon(getClass().getResource("LEDon.png"));
45
   Frame LedFrame;
53
   Frame LedFrame;
46
 
54
 
47
   // Ende Attribute
55
   // Ende Attribute
48
-
56
+  /**
57
+   * Create a new layer editor.
58
+   * @param animIndex Current animation
59
+   * @param frameIndex Current frame
60
+   * @param layerIndex Layer to edit
61
+   * @param work the cubeWorker containing the data
62
+   * @param LEDframe Used to call valueChanged, to trigger 3D View update
63
+   */
49
   public layerEditFrame(int animIndex, int frameIndex, int layerIndex, cubeWorker work, Frame LEDframe) {
64
   public layerEditFrame(int animIndex, int frameIndex, int layerIndex, cubeWorker work, Frame LEDframe) {
50
     // Frame-Initialisierung
65
     // Frame-Initialisierung
51
     super("Layer Edit");
66
     super("Layer Edit");
147
 
162
 
148
   }
163
   }
149
 
164
 
165
+	/**
166
+	 * Get the edited data back. NOTE: The worker is updated automagically!
167
+	 * @return Now changed 64 byte array.
168
+	 */
150
    public short[] getFinalFrame(){
169
    public short[] getFinalFrame(){
151
       if (finish == false) {
170
       if (finish == false) {
152
         return null;
171
         return null;
153
       }
172
       }
154
-      //return shortToByteArray(frame);
155
       return frame;
173
       return frame;
156
    }
174
    }
157
 
175
 
176
+	/**
177
+	 * Gets called when the user clicks on a Toggle Button.
178
+	 * @param i X-Coordinate of Button
179
+	 * @param j Y-Coordinate of Button
180
+	 */
158
   public void btnClicked(int i, int j){
181
   public void btnClicked(int i, int j){
159
     changedStateSinceSave = true;
182
     changedStateSinceSave = true;
160
     if (ledPanels[i][j].getIcon() == on){
183
     if (ledPanels[i][j].getIcon() == on){
167
 
190
 
168
   }
191
   }
169
 
192
 
193
+	/**
194
+	 * Action of Cancel Button. Removes this window...
195
+	 */
170
   public void cancel(){
196
   public void cancel(){
171
     dispose();
197
     dispose();
172
   }
198
   }
173
 
199
 
174
-
200
+	/**
201
+	 * Gets called when clicking the save button. Puts data back into Worker and fires ListSelectionEvent in Worker, so that the 3D View is updated.
202
+	 */
175
   public void save(){
203
   public void save(){
176
     int ctr = 0;
204
     int ctr = 0;
177
     short[] tmpFrame = frame;
205
     short[] tmpFrame = frame;

Завантаження…
Відмінити
Зберегти