|
@@ -9,28 +9,28 @@ import javax.media.j3d.*;
|
9
|
9
|
import javax.vecmath.*;
|
10
|
10
|
|
11
|
11
|
/*
|
12
|
|
- * frame.java
|
13
|
|
- *
|
14
|
|
- *
|
15
|
|
- * Copyright 2011 Thomas Buck <xythobuz@me.com>
|
16
|
|
- * Copyright 2011 Max Nuding <max.nuding@gmail.com>
|
17
|
|
- * Copyright 2011 Felix Bäder <baeder.felix@gmail.com>
|
18
|
|
- *
|
19
|
|
- * This file is part of LED-Cube.
|
20
|
|
- *
|
21
|
|
- * LED-Cube is free software: you can redistribute it and/or modify
|
22
|
|
- * it under the terms of the GNU General Public License as published by
|
23
|
|
- * the Free Software Foundation, either version 3 of the License, or
|
24
|
|
- * (at your option) any later version.
|
25
|
|
- *
|
26
|
|
- * LED-Cube is distributed in the hope that it will be useful,
|
27
|
|
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
28
|
|
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
29
|
|
- * GNU General Public License for more details.
|
30
|
|
- *
|
31
|
|
- * You should have received a copy of the GNU General Public License
|
32
|
|
- * along with LED-Cube. If not, see <http://www.gnu.org/licenses/>.
|
33
|
|
- */
|
|
12
|
+* frame.java
|
|
13
|
+*
|
|
14
|
+*
|
|
15
|
+* Copyright 2011 Thomas Buck <xythobuz@me.com>
|
|
16
|
+* Copyright 2011 Max Nuding <max.nuding@gmail.com>
|
|
17
|
+* Copyright 2011 Felix Bäder <baeder.felix@gmail.com>
|
|
18
|
+*
|
|
19
|
+* This file is part of LED-Cube.
|
|
20
|
+*
|
|
21
|
+* LED-Cube is free software: you can redistribute it and/or modify
|
|
22
|
+* it under the terms of the GNU General Public License as published by
|
|
23
|
+* the Free Software Foundation, either version 3 of the License, or
|
|
24
|
+* (at your option) any later version.
|
|
25
|
+*
|
|
26
|
+* LED-Cube is distributed in the hope that it will be useful,
|
|
27
|
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
28
|
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
29
|
+* GNU General Public License for more details.
|
|
30
|
+*
|
|
31
|
+* You should have received a copy of the GNU General Public License
|
|
32
|
+* along with LED-Cube. If not, see <http://www.gnu.org/licenses/>.
|
|
33
|
+*/
|
34
|
34
|
|
35
|
35
|
public class frame extends JFrame implements ListSelectionListener {
|
36
|
36
|
// Anfang Variablen
|
|
@@ -154,7 +154,7 @@ public class frame extends JFrame implements ListSelectionListener {
|
154
|
154
|
for(int i = 0; i < sPorts.length; i++){
|
155
|
155
|
jComboBox1.addItem(sPorts[i]);
|
156
|
156
|
}
|
157
|
|
-
|
|
157
|
+
|
158
|
158
|
for(int i = 0; i < worker.numOfAnimations(); i++){
|
159
|
159
|
animModel.addElement(worker.getAnimationName(i));
|
160
|
160
|
}
|
|
@@ -171,7 +171,7 @@ public class frame extends JFrame implements ListSelectionListener {
|
171
|
171
|
System.exit(0);
|
172
|
172
|
}
|
173
|
173
|
});
|
174
|
|
- int frameWidth = 661;
|
|
174
|
+ int frameWidth = 661;
|
175
|
175
|
int frameHeight = 417;
|
176
|
176
|
setSize(frameWidth, frameHeight);
|
177
|
177
|
Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
|
|
@@ -198,9 +198,9 @@ public class frame extends JFrame implements ListSelectionListener {
|
198
|
198
|
branchgroup = new BranchGroup();
|
199
|
199
|
branchgroup.addChild(transroot);
|
200
|
200
|
universe.addBranchGraph(branchgroup);
|
201
|
|
-
|
202
|
|
-
|
203
|
|
-
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
204
|
204
|
//-------------
|
205
|
205
|
|
206
|
206
|
editA.setBounds(264, 8, 107, 25);
|
|
@@ -354,12 +354,12 @@ public class frame extends JFrame implements ListSelectionListener {
|
354
|
354
|
frameRemove_ActionPerformed(evt);
|
355
|
355
|
}
|
356
|
356
|
});
|
357
|
|
-
|
|
357
|
+
|
358
|
358
|
frmLngthLbl.setBounds(536, 160, 113, 24);
|
359
|
359
|
frmLngthLbl.setText("Length of a frame");
|
360
|
360
|
frmLngthLbl.setFont(new Font("Dialog", Font.PLAIN, 13));
|
361
|
361
|
cp.add(frmLngthLbl);
|
362
|
|
-
|
|
362
|
+
|
363
|
363
|
frmLngthTxt.setBounds(536, 184, 113, 24);
|
364
|
364
|
frmLngthTxt.setText("0");
|
365
|
365
|
frmLngthTxt.setFont(new Font("Dialog", Font.PLAIN, 13));
|
|
@@ -511,11 +511,11 @@ public class frame extends JFrame implements ListSelectionListener {
|
511
|
511
|
}
|
512
|
512
|
|
513
|
513
|
public void editB_ActionPerformed(ActionEvent evt) {
|
514
|
|
- // layerEditFrame layerFrame1 = new layerEditFrame(worker.getLayer(1));
|
|
514
|
+ layerEditFrame layerFrame1 = new layerEditFrame(animList.getSelectedIndex(), frameList.getSelectedIndex(), 1, worker);
|
515
|
515
|
}
|
516
|
516
|
|
517
|
517
|
public void editC_ActionPerformed(ActionEvent evt) {
|
518
|
|
- // layerEditFrame layerFrame1 = new layerEditFrame(worker.getLayer(2));
|
|
518
|
+ layerEditFrame layerFrame1 = new layerEditFrame(animList.getSelectedIndex(), frameList.getSelectedIndex(), 2, worker);
|
519
|
519
|
}
|
520
|
520
|
|
521
|
521
|
public void editD_ActionPerformed(ActionEvent evt) {
|
|
@@ -612,8 +612,8 @@ public class frame extends JFrame implements ListSelectionListener {
|
612
|
612
|
int n = worker.numOfAnimations() - 1;
|
613
|
613
|
// would have 0 anims after successfully adding one...
|
614
|
614
|
/*if (n < 0) {
|
615
|
|
- n = 0;
|
616
|
|
- }*/
|
|
615
|
+n = 0;
|
|
616
|
+}*/
|
617
|
617
|
animModel.clear();
|
618
|
618
|
for (int i = 0; i < (n + 1); i++) {
|
619
|
619
|
animModel.add(i, worker.getAnimationName(i));
|
|
@@ -708,3 +708,5 @@ public class frame extends JFrame implements ListSelectionListener {
|
708
|
708
|
// Ende Methoden
|
709
|
709
|
}
|
710
|
710
|
|
|
711
|
+
|
|
712
|
+
|