Browse Source

Added more documentation...

Thomas Buck 12 years ago
parent
commit
3814bc0590

+ 144
- 31
Cube Control/cubeWorker.java View File

@@ -25,12 +25,18 @@
25 25
  * This class handles one animation file. This file can contain
26 26
  * many animations, but has to be only 1Mbit in size (128*1024 Byte).
27 27
  */
28
-
29
-
30 28
 import java.util.ArrayList;
31 29
 import java.util.Collections;
32 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 40
 public class cubeWorker {
35 41
 
36 42
 // --------------------
@@ -50,6 +56,9 @@ public class cubeWorker {
50 56
 
51 57
 // --------------------
52 58
 
59
+  /**
60
+   * Creates a worker with one animation, containing an empty frame.
61
+   */
53 62
   cubeWorker() {
54 63
   animations.add(new Animation());
55 64
   animations.get(0).setName("Animation 1");
@@ -57,7 +66,11 @@ public class cubeWorker {
57 66
   animations.get(0).get(0).setName("Frame 1");
58 67
   framesRemaining--;
59 68
   }
60
-
69
+  
70
+  /**
71
+   * Creates a worker from the given animation list
72
+   * @param anims List of animations
73
+   */
61 74
   cubeWorker(ArrayList<Animation> anims) {
62 75
     animations = anims;
63 76
   }
@@ -66,17 +79,27 @@ public class cubeWorker {
66 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 86
     public int numOfAnimations() {
71 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 95
     public int numOfFrames(int selectedAnimation) {
76 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 103
     public int framesRemaining() {
81 104
            return framesRemaining;
82 105
     }
@@ -86,37 +109,55 @@ public class cubeWorker {
86 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 116
     public int addAnimation() {
93
-    changedState = true;
94
-    if (framesRemaining <= 0) {
117
+    	changedState = true;
118
+    	if (framesRemaining <= 0) {
95 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 132
     public void removeAnimation(int selectedAnimation) {
106 133
     changedState = true;
107 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 142
   public String getAnimationName(int selectedAnimation) {
112 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 151
   public void setAnimationName(String s, int selectedAnimation) {
116 152
       changedState = true;
117 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 161
   public void moveAnimation(int dir, int selectedAnimation) {
121 162
   changedState = true;
122 163
     if (dir == UP){
@@ -136,17 +177,31 @@ public class cubeWorker {
136 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 185
   public String getFrameName(int anim, int frame) {
140 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 195
     public void setFrameName(String s, int anim, int frame) {
144 196
     changedState = true;
145 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 205
     public int addFrame(int anim) {
151 206
     changedState = true;
152 207
     if (framesRemaining <= 0) {
@@ -159,32 +214,67 @@ public class cubeWorker {
159 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 222
     public void removeFrame(int anim, int frame) {
164 223
     changedState = true;
165 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 233
     public short[] getFrame(int anim, int frame) {
170 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 244
     public void setFrame(short[] data, int anim, int frame) {
174 245
     changedState = true;
175 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 255
   public short getFrameTime(int anim, int frame) {
180 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 266
   public void setFrameTime(short time, int anim, int frame) {
184 267
     changedState = true;
185 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 278
   public void moveFrame(int dir, int anim, int frame){
189 279
   changedState = true;
190 280
     if (dir == UP){
@@ -204,7 +294,11 @@ public class cubeWorker {
204 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 302
     public int loadState(String path) {
209 303
       changedState = false;
210 304
     try {
@@ -225,7 +319,11 @@ public class cubeWorker {
225 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 327
     public int saveState(String path) {
230 328
            changedState = false;
231 329
        AnimationUtility.writeFile(path, animations);
@@ -236,7 +334,10 @@ public class cubeWorker {
236 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 341
     public boolean changedStateSinceSave() {
241 342
            return changedState;
242 343
     }
@@ -245,18 +346,30 @@ public class cubeWorker {
245 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 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 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 373
     public String[] getSerialPorts() {
261 374
 		String[] ports = {"Select serial port..."};
262 375
 		String helperName;

+ 1
- 1
Cube Control/doc/AFrame.html View File

@@ -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
 AFrame
8 8
 </TITLE>

+ 1
- 1
Cube Control/doc/Animation.html View File

@@ -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
 Animation
8 8
 </TITLE>

+ 1
- 1
Cube Control/doc/AnimationUtility.html View File

@@ -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
 AnimationUtility
8 8
 </TITLE>

+ 1
- 1
Cube Control/doc/HelperUtility.html View File

@@ -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:30 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:18 CET 2011 -->
6 6
 <TITLE>
7 7
 HelperUtility
8 8
 </TITLE>

+ 1
- 1
Cube Control/doc/Led3D.html View File

@@ -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:31 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:19 CET 2011 -->
6 6
 <TITLE>
7 7
 Led3D
8 8
 </TITLE>

+ 1
- 1
Cube Control/doc/allclasses-frame.html View File

@@ -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:31 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:19 CET 2011 -->
6 6
 <TITLE>
7 7
 All Classes
8 8
 </TITLE>

+ 1
- 1
Cube Control/doc/allclasses-noframe.html View File

@@ -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:31 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:19 CET 2011 -->
6 6
 <TITLE>
7 7
 All Classes
8 8
 </TITLE>

+ 1
- 1
Cube Control/doc/constant-values.html View File

@@ -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:31 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:19 CET 2011 -->
6 6
 <TITLE>
7 7
 Constant Field Values
8 8
 </TITLE>

+ 114
- 47
Cube Control/doc/cubeWorker.html View File

@@ -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
-&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 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&nbsp;anim)</CODE>
123 127
 
124 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 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
-&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 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&nbsp;port)</CODE>
139 143
 
140 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 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
-&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 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&nbsp;selectedAnimation)</CODE>
155 159
 
156 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 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&nbsp;frame)</CODE>
164 168
 
165 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 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&nbsp;frame)</CODE>
173 177
 
174 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 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&nbsp;frame)</CODE>
182 186
 
183 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 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
-&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 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&nbsp;path)</CODE>
198 202
 
199 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 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&nbsp;selectedAnimation)</CODE>
207 211
 
208 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 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&nbsp;frame)</CODE>
217 221
 
218 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 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
-&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 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&nbsp;selectedAnimation)</CODE>
233 237
 
234 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 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&nbsp;selectedAnimation)</CODE>
241 245
 
242 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 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&nbsp;frame)</CODE>
250 254
 
251 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 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&nbsp;path)</CODE>
258 262
 
259 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 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&nbsp;selectedAnimation)</CODE>
267 271
 
268 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 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&nbsp;frame)</CODE>
277 282
 
278 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 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&nbsp;frame)</CODE>
287 292
 
288 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 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&nbsp;frame)</CODE>
297 302
 
298 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 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&nbsp;port)</CODE>
305 310
 
306 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 313
 </TR>
309 314
 </TABLE>
310 315
 &nbsp;<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&nbsp;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&nbsp;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&nbsp;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&nbsp;s,
402 424
                              int&nbsp;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&nbsp;dir,
414 439
                           int&nbsp;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&nbsp;anim,
426 453
                                      int&nbsp;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&nbsp;s,
438 467
                          int&nbsp;anim,
439 468
                          int&nbsp;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&nbsp;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&nbsp;anim,
462 496
                         int&nbsp;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&nbsp;anim,
474 510
                         int&nbsp;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[]&nbsp;data,
486 526
                      int&nbsp;anim,
487 527
                      int&nbsp;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&nbsp;anim,
499 541
                           int&nbsp;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&nbsp;time,
511 556
                          int&nbsp;anim,
512 557
                          int&nbsp;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&nbsp;dir,
524 571
                       int&nbsp;anim,
525 572
                       int&nbsp;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&nbsp;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&nbsp;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&nbsp;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&nbsp;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 ========= -->

+ 1
- 1
Cube Control/doc/deprecated-list.html View File

@@ -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:31 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:19 CET 2011 -->
6 6
 <TITLE>
7 7
 Deprecated List
8 8
 </TITLE>

+ 1
- 1
Cube Control/doc/frame.html View File

@@ -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
 Frame
8 8
 </TITLE>

+ 1
- 1
Cube Control/doc/help-doc.html View File

@@ -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:31 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:19 CET 2011 -->
6 6
 <TITLE>
7 7
 API Help
8 8
 </TITLE>

+ 32
- 31
Cube Control/doc/index-all.html View File

@@ -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:31 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:19 CET 2011 -->
6 6
 <TITLE>
7 7
 Index
8 8
 </TITLE>
@@ -88,10 +88,10 @@ Method in class <A HREF="./Animation.html" title="class in &lt;Unnamed&gt;">Anim
88 88
 <DD>Add a specified frame at the specified position
89 89
 <DT><A HREF="./cubeWorker.html#addAnimation()"><B>addAnimation()</B></A> - 
90 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 92
 <DT><A HREF="./cubeWorker.html#addFrame(int)"><B>addFrame(int)</B></A> - 
93 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 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 96
 Constructor for class <A HREF="./AFrame.html" title="class in &lt;Unnamed&gt;">AFrame</A>
97 97
 <DD>&nbsp;
@@ -120,7 +120,7 @@ Method in class <A HREF="./Frame.html" title="class in &lt;Unnamed&gt;">Frame</A
120 120
 <DL>
121 121
 <DT><A HREF="./layerEditFrame.html#btnClicked(int, int)"><B>btnClicked(int, int)</B></A> - 
122 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 124
 </DL>
125 125
 <HR>
126 126
 <A NAME="_C_"><!-- --></A><H2>
@@ -128,11 +128,11 @@ Method in class <A HREF="./layerEditFrame.html" title="class in &lt;Unnamed&gt;"
128 128
 <DL>
129 129
 <DT><A HREF="./layerEditFrame.html#cancel()"><B>cancel()</B></A> - 
130 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 132
 <DT><A HREF="./cubeWorker.html#changedStateSinceSave()"><B>changedStateSinceSave()</B></A> - 
133 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 136
 <HR>
137 137
 <A NAME="_D_"><!-- --></A><H2>
138 138
 <B>D</B></H2>
@@ -142,7 +142,7 @@ Method in class <A HREF="./Frame.html" title="class in &lt;Unnamed&gt;">Frame</A
142 142
 <DD>&nbsp;
143 143
 <DT><A HREF="./cubeWorker.html#downloadState(java.lang.String)"><B>downloadState(String)</B></A> - 
144 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 146
 </DL>
147 147
 <HR>
148 148
 <A NAME="_E_"><!-- --></A><H2>
@@ -194,7 +194,7 @@ Method in class <A HREF="./Frame.html" title="class in &lt;Unnamed&gt;">Frame</A
194 194
 <DD>&nbsp;
195 195
 <DT><A HREF="./cubeWorker.html#framesRemaining()"><B>framesRemaining()</B></A> - 
196 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 198
 <DT><A HREF="./Frame.html#frameUp_ActionPerformed(java.awt.event.ActionEvent)"><B>frameUp_ActionPerformed(ActionEvent)</B></A> - 
199 199
 Method in class <A HREF="./Frame.html" title="class in &lt;Unnamed&gt;">Frame</A>
200 200
 <DD>&nbsp;
@@ -211,22 +211,22 @@ Method in class <A HREF="./Frame.html" title="class in &lt;Unnamed&gt;">Frame</A
211 211
 <DD>&nbsp;
212 212
 <DT><A HREF="./cubeWorker.html#getAnimationName(int)"><B>getAnimationName(int)</B></A> - 
213 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 215
 <DT><A HREF="./AFrame.html#getData()"><B>getData()</B></A> - 
216 216
 Method in class <A HREF="./AFrame.html" title="class in &lt;Unnamed&gt;">AFrame</A>
217 217
 <DD>Gets tha Data of this Frame
218 218
 <DT><A HREF="./layerEditFrame.html#getFinalFrame()"><B>getFinalFrame()</B></A> - 
219 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 221
 <DT><A HREF="./cubeWorker.html#getFrame(int, int)"><B>getFrame(int, int)</B></A> - 
222 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 224
 <DT><A HREF="./cubeWorker.html#getFrameName(int, int)"><B>getFrameName(int, int)</B></A> - 
225 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 227
 <DT><A HREF="./cubeWorker.html#getFrameTime(int, int)"><B>getFrameTime(int, int)</B></A> - 
228 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 230
 <DT><A HREF="./AnimationUtility.html#getLastError()"><B>getLastError()</B></A> - 
231 231
 Static method in class <A HREF="./AnimationUtility.html" title="class in &lt;Unnamed&gt;">AnimationUtility</A>
232 232
 <DD>Get the last error that occured while writing
@@ -241,7 +241,7 @@ Method in class <A HREF="./Animation.html" title="class in &lt;Unnamed&gt;">Anim
241 241
 <DD>Gets the name of this animation
242 242
 <DT><A HREF="./cubeWorker.html#getSerialPorts()"><B>getSerialPorts()</B></A> - 
243 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 245
 <DT><A HREF="./AFrame.html#getTime()"><B>getTime()</B></A> - 
246 246
 Method in class <A HREF="./AFrame.html" title="class in &lt;Unnamed&gt;">AFrame</A>
247 247
 <DD>Gets the Duration of this Frame
@@ -258,9 +258,9 @@ Constructor for class <A HREF="./HelperUtility.html" title="class in &lt;Unnamed
258 258
 <A NAME="_L_"><!-- --></A><H2>
259 259
 <B>L</B></H2>
260 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 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 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 265
 Constructor for class <A HREF="./Led3D.html" title="class in &lt;Unnamed&gt;">Led3D</A>
266 266
 <DD>&nbsp;
@@ -269,7 +269,7 @@ Method in class <A HREF="./Frame.html" title="class in &lt;Unnamed&gt;">Frame</A
269 269
 <DD>&nbsp;
270 270
 <DT><A HREF="./cubeWorker.html#loadState(java.lang.String)"><B>loadState(String)</B></A> - 
271 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 273
 </DL>
274 274
 <HR>
275 275
 <A NAME="_M_"><!-- --></A><H2>
@@ -280,10 +280,10 @@ Static method in class <A HREF="./Frame.html" title="class in &lt;Unnamed&gt;">F
280 280
 <DD>&nbsp;
281 281
 <DT><A HREF="./cubeWorker.html#moveAnimation(int, int)"><B>moveAnimation(int, int)</B></A> - 
282 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 284
 <DT><A HREF="./cubeWorker.html#moveFrame(int, int, int)"><B>moveFrame(int, int, int)</B></A> - 
285 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 287
 </DL>
288 288
 <HR>
289 289
 <A NAME="_N_"><!-- --></A><H2>
@@ -291,10 +291,10 @@ Method in class <A HREF="./cubeWorker.html" title="class in &lt;Unnamed&gt;">cub
291 291
 <DL>
292 292
 <DT><A HREF="./cubeWorker.html#numOfAnimations()"><B>numOfAnimations()</B></A> - 
293 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 295
 <DT><A HREF="./cubeWorker.html#numOfFrames(int)"><B>numOfFrames(int)</B></A> - 
296 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 298
 </DL>
299 299
 <HR>
300 300
 <A NAME="_P_"><!-- --></A><H2>
@@ -316,10 +316,10 @@ Method in class <A HREF="./Animation.html" title="class in &lt;Unnamed&gt;">Anim
316 316
 <DD>Removes a frame.
317 317
 <DT><A HREF="./cubeWorker.html#removeAnimation(int)"><B>removeAnimation(int)</B></A> - 
318 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 320
 <DT><A HREF="./cubeWorker.html#removeFrame(int, int)"><B>removeFrame(int, int)</B></A> - 
321 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 323
 <DT><A HREF="./HelperUtility.html#runHelper(java.lang.String[])"><B>runHelper(String[])</B></A> - 
324 324
 Static method in class <A HREF="./HelperUtility.html" title="class in &lt;Unnamed&gt;">HelperUtility</A>
325 325
 <DD>Run the serialHelper with the given arguments
@@ -330,7 +330,7 @@ Static method in class <A HREF="./HelperUtility.html" title="class in &lt;Unname
330 330
 <DL>
331 331
 <DT><A HREF="./layerEditFrame.html#save()"><B>save()</B></A> - 
332 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 334
 <DT><A HREF="./Frame.html#save_ActionPerformed(java.awt.event.ActionEvent)"><B>save_ActionPerformed(ActionEvent)</B></A> - 
335 335
 Method in class <A HREF="./Frame.html" title="class in &lt;Unnamed&gt;">Frame</A>
336 336
 <DD>&nbsp;
@@ -339,13 +339,14 @@ Method in class <A HREF="./Frame.html" title="class in &lt;Unnamed&gt;">Frame</A
339 339
 <DD>&nbsp;
340 340
 <DT><A HREF="./cubeWorker.html#saveState(java.lang.String)"><B>saveState(String)</B></A> - 
341 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 343
 <DT><A HREF="./Animation.html#set(AFrame, int)"><B>set(AFrame, int)</B></A> - 
344 344
 Method in class <A HREF="./Animation.html" title="class in &lt;Unnamed&gt;">Animation</A>
345 345
 <DD>Sets the selected Frame
346 346
 <DT><A HREF="./cubeWorker.html#setAnimationName(java.lang.String, int)"><B>setAnimationName(String, int)</B></A> - 
347 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 350
 <DT><A HREF="./AFrame.html#setData(short[])"><B>setData(short[])</B></A> - 
350 351
 Method in class <A HREF="./AFrame.html" title="class in &lt;Unnamed&gt;">AFrame</A>
351 352
 <DD>Sets the Data of this Frame
@@ -354,13 +355,13 @@ Method in class <A HREF="./Led3D.html" title="class in &lt;Unnamed&gt;">Led3D</A
354 355
 <DD>Sets the data that is displayed by the LEDs
355 356
 <DT><A HREF="./cubeWorker.html#setFrame(short[], int, int)"><B>setFrame(short[], int, int)</B></A> - 
356 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 359
 <DT><A HREF="./cubeWorker.html#setFrameName(java.lang.String, int, int)"><B>setFrameName(String, int, int)</B></A> - 
359 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 362
 <DT><A HREF="./cubeWorker.html#setFrameTime(short, int, int)"><B>setFrameTime(short, int, int)</B></A> - 
362 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 365
 <DT><A HREF="./AFrame.html#setName(java.lang.String)"><B>setName(String)</B></A> - 
365 366
 Method in class <A HREF="./AFrame.html" title="class in &lt;Unnamed&gt;">AFrame</A>
366 367
 <DD>Sets the Name of this Frame
@@ -383,7 +384,7 @@ Method in class <A HREF="./Frame.html" title="class in &lt;Unnamed&gt;">Frame</A
383 384
 <DD>&nbsp;
384 385
 <DT><A HREF="./cubeWorker.html#uploadState(java.lang.String)"><B>uploadState(String)</B></A> - 
385 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 388
 </DL>
388 389
 <HR>
389 390
 <A NAME="_V_"><!-- --></A><H2>

+ 1
- 1
Cube Control/doc/index.html View File

@@ -2,7 +2,7 @@
2 2
 <!--NewPage-->
3 3
 <HTML>
4 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 6
 <TITLE>
7 7
 Generated Documentation (Untitled)
8 8
 </TITLE>

+ 25
- 8
Cube Control/doc/layerEditFrame.html View File

@@ -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:30 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:18 CET 2011 -->
6 6
 <TITLE>
7 7
 layerEditFrame
8 8
 </TITLE>
@@ -104,6 +104,10 @@ java.lang.Object
104 104
 </PRE>
105 105
 
106 106
 <P>
107
+Shows a windows that allows the user to toggle the state of 64 LEDs.
108
+<P>
109
+
110
+<P>
107 111
 <DL>
108 112
 <DT><B>See Also:</B><DD><A HREF="serialized-form.html#layerEditFrame">Serialized Form</A></DL>
109 113
 <HR>
@@ -239,7 +243,7 @@ java.lang.Object
239 243
                <A HREF="Frame.html" title="class in &lt;Unnamed&gt;">Frame</A>&nbsp;LEDframe)</CODE>
240 244
 
241 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 247
 </TR>
244 248
 </TABLE>
245 249
 &nbsp;
@@ -258,7 +262,7 @@ java.lang.Object
258 262
            int&nbsp;j)</CODE>
259 263
 
260 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 266
 </TR>
263 267
 <TR BGCOLOR="white" CLASS="TableRowColor">
264 268
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
@@ -266,7 +270,7 @@ java.lang.Object
266 270
 <TD><CODE><B><A HREF="layerEditFrame.html#cancel()">cancel</A></B>()</CODE>
267 271
 
268 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 274
 </TR>
271 275
 <TR BGCOLOR="white" CLASS="TableRowColor">
272 276
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
@@ -274,7 +278,7 @@ java.lang.Object
274 278
 <TD><CODE><B><A HREF="layerEditFrame.html#getFinalFrame()">getFinalFrame</A></B>()</CODE>
275 279
 
276 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 282
 </TR>
279 283
 <TR BGCOLOR="white" CLASS="TableRowColor">
280 284
 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
@@ -282,7 +286,7 @@ java.lang.Object
282 286
 <TD><CODE><B><A HREF="layerEditFrame.html#save()">save</A></B>()</CODE>
283 287
 
284 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 290
 </TR>
287 291
 </TABLE>
288 292
 &nbsp;<A NAME="methods_inherited_from_class_javax.swing.JFrame"><!-- --></A>
@@ -370,6 +374,10 @@ public <B>layerEditFrame</B>(int&nbsp;animIndex,
370 374
                       <A HREF="cubeWorker.html" title="class in &lt;Unnamed&gt;">cubeWorker</A>&nbsp;work,
371 375
                       <A HREF="Frame.html" title="class in &lt;Unnamed&gt;">Frame</A>&nbsp;LEDframe)</PRE>
372 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 381
 </DL>
374 382
 
375 383
 <!-- ============ METHOD DETAIL ========== -->
@@ -387,8 +395,11 @@ getFinalFrame</H3>
387 395
 <PRE>
388 396
 public short[] <B>getFinalFrame</B>()</PRE>
389 397
 <DL>
398
+<DD>Get the edited data back. NOTE: The worker is updated automagically!
399
+<P>
390 400
 <DD><DL>
391
-</DL>
401
+
402
+<DT><B>Returns:</B><DD>Now changed 64 byte array.</DL>
392 403
 </DD>
393 404
 </DL>
394 405
 <HR>
@@ -399,8 +410,10 @@ btnClicked</H3>
399 410
 public void <B>btnClicked</B>(int&nbsp;i,
400 411
                        int&nbsp;j)</PRE>
401 412
 <DL>
413
+<DD>Gets called when the user clicks on a Toggle Button.
414
+<P>
402 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 417
 </DD>
405 418
 </DL>
406 419
 <HR>
@@ -410,6 +423,8 @@ cancel</H3>
410 423
 <PRE>
411 424
 public void <B>cancel</B>()</PRE>
412 425
 <DL>
426
+<DD>Action of Cancel Button. Removes this window...
427
+<P>
413 428
 <DD><DL>
414 429
 </DL>
415 430
 </DD>
@@ -421,6 +436,8 @@ save</H3>
421 436
 <PRE>
422 437
 public void <B>save</B>()</PRE>
423 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 441
 <DD><DL>
425 442
 </DL>
426 443
 </DD>

+ 1
- 1
Cube Control/doc/overview-tree.html View File

@@ -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:31 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:19 CET 2011 -->
6 6
 <TITLE>
7 7
 Class Hierarchy
8 8
 </TITLE>

+ 1
- 1
Cube Control/doc/package-frame.html View File

@@ -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:31 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:19 CET 2011 -->
6 6
 <TITLE>
7 7
 &lt;Unnamed&gt;
8 8
 </TITLE>

+ 3
- 3
Cube Control/doc/package-summary.html View File

@@ -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:31 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:19 CET 2011 -->
6 6
 <TITLE>
7 7
 
8 8
 </TITLE>
@@ -90,7 +90,7 @@ Package &lt;Unnamed&gt;
90 90
 </TR>
91 91
 <TR BGCOLOR="white" CLASS="TableRowColor">
92 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 94
 </TR>
95 95
 <TR BGCOLOR="white" CLASS="TableRowColor">
96 96
 <TD WIDTH="15%"><B><A HREF="Frame.html" title="class in &lt;Unnamed&gt;">Frame</A></B></TD>
@@ -102,7 +102,7 @@ Package &lt;Unnamed&gt;
102 102
 </TR>
103 103
 <TR BGCOLOR="white" CLASS="TableRowColor">
104 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 106
 </TR>
107 107
 <TR BGCOLOR="white" CLASS="TableRowColor">
108 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 View File

@@ -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:31 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:19 CET 2011 -->
6 6
 <TITLE>
7 7
  Class Hierarchy
8 8
 </TITLE>

+ 1
- 1
Cube Control/doc/serialized-form.html View File

@@ -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:31 CET 2011 -->
5
+<!-- Generated by javadoc (build 1.6.0_29) on Mon Dec 05 17:23:19 CET 2011 -->
6 6
 <TITLE>
7 7
 Serialized Form
8 8
 </TITLE>

+ 31
- 3
Cube Control/layerEditFrame.java View File

@@ -27,9 +27,17 @@ import java.awt.event.*;
27 27
 import javax.swing.*;
28 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 38
 public class layerEditFrame extends JFrame {
32 39
   // Anfang Attribute
40
+
33 41
   private JPanel panelLED1 = new JPanel(null, true);
34 42
   JButton[][] ledPanels = new JButton[8][8];
35 43
   ImageIcon on = new ImageIcon(getClass().getResource("LEDon.png"));
@@ -45,7 +53,14 @@ public class layerEditFrame extends JFrame {
45 53
   Frame LedFrame;
46 54
 
47 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 64
   public layerEditFrame(int animIndex, int frameIndex, int layerIndex, cubeWorker work, Frame LEDframe) {
50 65
     // Frame-Initialisierung
51 66
     super("Layer Edit");
@@ -147,14 +162,22 @@ public class layerEditFrame extends JFrame {
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 169
    public short[] getFinalFrame(){
151 170
       if (finish == false) {
152 171
         return null;
153 172
       }
154
-      //return shortToByteArray(frame);
155 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 181
   public void btnClicked(int i, int j){
159 182
     changedStateSinceSave = true;
160 183
     if (ledPanels[i][j].getIcon() == on){
@@ -167,11 +190,16 @@ public class layerEditFrame extends JFrame {
167 190
 
168 191
   }
169 192
 
193
+	/**
194
+	 * Action of Cancel Button. Removes this window...
195
+	 */
170 196
   public void cancel(){
171 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 203
   public void save(){
176 204
     int ctr = 0;
177 205
     short[] tmpFrame = frame;

Loading…
Cancel
Save