|
@@ -4,7 +4,7 @@
|
4
|
4
|
*
|
5
|
5
|
* Copyright 2011 Thomas Buck <xythobuz@me.com>
|
6
|
6
|
* Copyright 2011 Max Nuding <max.nuding@gmail.com>
|
7
|
|
-* Copyright 2011 Felix Bäder <baeder.felix@gmail.com>
|
|
7
|
+* Copyright 2011 Felix Bäder <baeder.felix@gmail.com>
|
8
|
8
|
*
|
9
|
9
|
* This file is part of LED-Cube.
|
10
|
10
|
*
|
|
@@ -42,13 +42,15 @@ public class layerEditFrame extends JFrame {
|
42
|
42
|
cubeWorker worker = null;
|
43
|
43
|
int animI;
|
44
|
44
|
int frameI;
|
|
45
|
+ frame LedFrame;
|
45
|
46
|
|
46
|
47
|
// Ende Attribute
|
47
|
48
|
|
48
|
|
- public layerEditFrame(int animIndex, int frameIndex, int layerIndex, cubeWorker work) {
|
|
49
|
+ public layerEditFrame(int animIndex, int frameIndex, int layerIndex, cubeWorker work, frame LEDframe) {
|
49
|
50
|
// Frame-Initialisierung
|
50
|
51
|
super("Layer Edit");
|
51
|
52
|
worker = work;
|
|
53
|
+ LedFrame = LEDframe;
|
52
|
54
|
animI = animIndex;
|
53
|
55
|
frameI = frameIndex;
|
54
|
56
|
//frame = byteToShortArray(worker.getFrame(animIndex, frameIndex));
|
|
@@ -144,8 +146,12 @@ public class layerEditFrame extends JFrame {
|
144
|
146
|
}
|
145
|
147
|
|
146
|
148
|
}
|
|
149
|
+
|
|
150
|
+ public boolean isFinished(){
|
|
151
|
+ return finish;
|
|
152
|
+ }
|
147
|
153
|
|
148
|
|
- short[] getFinalFrame(){
|
|
154
|
+ public short[] getFinalFrame(){
|
149
|
155
|
if (finish == false) {
|
150
|
156
|
return null;
|
151
|
157
|
}
|
|
@@ -184,8 +190,9 @@ public class layerEditFrame extends JFrame {
|
184
|
190
|
reihe = 0;
|
185
|
191
|
}
|
186
|
192
|
frame = tmpFrame;
|
187
|
|
- //worker.setFrame(shortToByteArray(frame), animI, frameI);
|
188
|
193
|
worker.setFrame(frame, animI, frameI);
|
|
194
|
+ ListSelectionEvent layerChanged = new ListSelectionEvent(LedFrame.frameList, LedFrame.frameList.getSelectedIndex(), LedFrame.frameList.getSelectedIndex(), false);
|
|
195
|
+ LedFrame.valueChanged(layerChanged);
|
189
|
196
|
dispose();
|
190
|
197
|
}
|
191
|
198
|
|
|
@@ -219,4 +226,3 @@ public class layerEditFrame extends JFrame {
|
219
|
226
|
}
|
220
|
227
|
|
221
|
228
|
|
222
|
|
-
|