-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathAnimationController.java
More file actions
2183 lines (1870 loc) · 97.2 KB
/
AnimationController.java
File metadata and controls
2183 lines (1870 loc) · 97.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright 2009 Samuel Taylor
*
* This file is part of darkFunction Editor
*
* darkFunction Editor is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* darkFunction Editor is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with darkFunction Editor. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* AnimationController.java
*
* Created on 06-Dec-2009, 23:39:51
*/
package dfEditor.animation;
import dfEditor.*;
import dfEditor.command.*;
import dfEditor.commands.*;
import dfEditor.io.*;
import java.io.File;
import javax.imageio.ImageIO;
import java.io.IOException;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.event.*;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.awt.Point;
import javax.swing.*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import dfEditor.CustomComponents.*;
import dfEditor.animation.AnimationCell.GraphicZOrderPair;
import javax.swing.JTextField;
import javax.swing.plaf.basic.*;
import java.awt.Dimension;
import java.beans.PropertyVetoException;
import java.awt.*;
import java.awt.event.FocusListener;
/**
*
* @author Owner
*/
public class AnimationController extends dfEditorPanel implements
ListSelectionListener,
GraphicPanelChangeListener,
AnimationStripListener,
AnimationDataListener,
SpriteTreeListener,
NodeDroppedListener,
ActionListener,
InternalFrameListener
{
private BufferedImage bufferedImage = null;
private AnimationCell workingCell = null;
private File loadedSpritesheetFile = null;
private Timer spinnerStateTimer = null;
ArrayList<GraphicObject> _rotatingGraphics = null;
/** Creates new form AnimationController */
public AnimationController(CommandManager aCmdManager, boolean aNew, JLabel aHelpLabel, TaskChangeListener aListener, JFileChooser aChooser)
{
super(aCmdManager, aHelpLabel, aListener, aChooser);
initComponents();
viewPanel.addGraphicChangeListener(this);
animationStripPanel.setController(this);
animationStripPanel.setCommandManager(aCmdManager);
viewPanel.setCommandManager(aCmdManager);
animationList.addListSelectionListener(this);
spriteList.addListSelectionListener(this);
spriteList.addNodeDroppedListener(this);
spriteList.setDragSource(spriteTree);
spriteTree.addTreeListener(this);
viewPanel.addNodeDroppedListener(this);
viewPanel.setDragSource(spriteTree);
controlPanel.addInternalFrameListener(this);
spriteListControlPanel.addInternalFrameListener(this);
setWorkingCell(null);
if (aNew)
{
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
showSpritesheetChooser();
}
});
}
viewPanel.requestFocus();
postInit();
}
private void showSpritesheetChooser()
{
JFileChooser chooser = fileChooser;
CustomFilter filter = new CustomFilter();
filter.addExtension(CustomFilter.EXT_SPRITE);
chooser.resetChoosableFileFilters();
chooser.setFileFilter(filter);
chooser.setDialogTitle("Select spritesheet");
JFrame mainFrame = dfEditorApp.getApplication().getMainFrame();
int returnVal = chooser.showOpenDialog(mainFrame);
if(returnVal == JFileChooser.APPROVE_OPTION)
{
setSpritesheetFile(chooser.getSelectedFile());
}
}
private void setSpritesheetFile(File aFile)
{
SpritesheetReader reader = new SpritesheetReader(aFile);
loadedSpritesheetFile = aFile;
try
{
String imgPath = reader.getImagePath();
if (imgPath != null)
bufferedImage = ImageIO.read(new File(imgPath));
}
catch (IOException e)
{
showParseError();
return;
}
DefaultTreeModel model = reader.getTreeModel();
if (model != null)
{
spriteTree.setModel(model);
addAnimationButton.setEnabled(true);
}
else
{
showParseError();
return;
}
}
private void buildAnimatedGif(String filePath)
{
Animation animation = this.getWorkingAnimation();
if (animation != null && animation.numCells() > 0)
{
Rectangle firstCellRect = animation.getCellAtIndex(0).getSpreadRect();
Point topLeft = new Point(firstCellRect.x, firstCellRect.y);
Point bottomRight = new Point(firstCellRect.x + firstCellRect.width, firstCellRect.y + firstCellRect.height);
for (int i=1; i<animation.numCells(); i++)
{
Rectangle r = animation.getCellAtIndex(i).getSpreadRect();
if (r.x < topLeft.x)
topLeft.x = r.x;
if (r.y < topLeft.y)
topLeft.y = r.y;
if (r.x + r.width > bottomRight.x)
bottomRight.x = r.x + r.width;
if (r.y + r.height > bottomRight.y)
bottomRight.y = r.y + r.height;
}
AnimatedGifEncoder e = new AnimatedGifEncoder();
e.setTransparent(new Color(0,0,0,0));
e.start(filePath);
e.setRepeat(animation.getLoops());
e.setQuality(1);
e.setSize(bottomRight.x - topLeft.x, bottomRight.y - topLeft.y);
for (int i=0; i<animation.numCells(); i++)
{
BufferedImage image = new BufferedImage(bottomRight.x - topLeft.x, bottomRight.y - topLeft.y, BufferedImage.TYPE_INT_ARGB);
Graphics ig = image.getGraphics();
AnimationCell cell = animation.getCellAtIndex(i);
cell.rebuild();
Rectangle r = cell.getSpreadRect();
r.x -= topLeft.x;
r.y -= topLeft.y;
cell.draw(ig, r);
e.addFrame(image);
e.setDelay(cell.getDelay());
}
e.finish();
}
}
private void showParseError()
{
JOptionPane.showMessageDialog(this, "File could not be loaded", "Error", JOptionPane.ERROR_MESSAGE);
}
public void spriteTreeDoubleClicked(CustomNode aNode)
{
if (aNode != null && getWorkingCell() != null && aNode.isLeaf())
addNodeToCell(aNode, getWorkingCell(), new Point(0,0));
}
public void setWorkingCell(final AnimationCell aCell)
{
// commented out to force repaint
//if(aCell == workingCell)
// return;
if (workingCell != aCell)
viewPanel.unselectAllGraphics();
workingCell = aCell;
viewPanel.setCell(workingCell);
animationStripPanel.selectCell(aCell);
boolean bActiveCell = (aCell != null);
zoomInButton.setEnabled(bActiveCell);
zoomOutButton.setEnabled(bActiveCell);
onionSkinsCheckBox.setEnabled(bActiveCell);
spriteTree.setEnabled(bActiveCell);
viewPanel.setEnabled(bActiveCell);
delaySpinner.setEnabled(bActiveCell);
//addToFrameButton.setEnabled(bActiveCell);
spriteList.setEnabled(bActiveCell);
try {
spriteListControlPanel.setSelected(bActiveCell);
} catch (java.beans.PropertyVetoException e) {}
populateSpriteListFromCell(aCell);
if (bActiveCell)
delaySpinner.setValue(workingCell.getDelay());
if (aCell != null)
{
aCell.rebuild();
animationStripPanel.repaint();
}
setOnionSkins(onionSkinsCheckBox.isSelected());
this.repaint();
}
public void cellAdded(Animation aAnimation, AnimationCell aCell)
{
if (aAnimation == this.getWorkingAnimation())
{
boolean bPlayable = aAnimation.numCells() > 1;
if (!bPlayable)
{
animationStripPanel.stop();
}
playButton.setEnabled(bPlayable);
}
}
public void cellRemoved(Animation aAnimation, AnimationCell aCell)
{
if (aAnimation == this.getWorkingAnimation())
{
boolean bPlayable = aAnimation.numCells() > 1;
if (!bPlayable)
{
animationStripPanel.stop();
}
playButton.setEnabled(bPlayable);
setWorkingCell(aAnimation.getCurrentCell());
}
}
public void cellOrderChanged(Animation aAnimation)
{
if (aAnimation == this.getWorkingAnimation())
{
}
}
public AnimationCell getWorkingCell()
{
return workingCell;
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jScrollPane2 = new javax.swing.JScrollPane();
animationList = new JListMutable(new DefaultMutableListModel());
addAnimationButton = new javax.swing.JButton();
removeAnimationButton = new javax.swing.JButton();
duplicateAnimationButton = new javax.swing.JButton();
exportGifButton = new javax.swing.JButton();
jPanel2 = new javax.swing.JPanel();
animationPanel1 = new dfEditor.animation.AnimationPanel();
playButton = new javax.swing.JButton();
jPanel3 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
delaySpinner = new javax.swing.JSpinner();
addCellButton = new javax.swing.JButton();
removeCellButton = new javax.swing.JButton();
animationStripScrollPane = new javax.swing.JScrollPane();
animationStripPanel = new dfEditor.animation.AnimationStripPanel();
loopSpinner = new javax.swing.JSpinner();
loopLabel = new javax.swing.JLabel();
jPanel4 = new javax.swing.JPanel();
jScrollPane1 = new javax.swing.JScrollPane();
spriteTree = new dfEditor.SpriteTree();
spritePreviewPanel = new dfEditor.SimpleGraphicPanel();
addToFrameButton = new javax.swing.JButton();
spritePreviewTitle = new javax.swing.JLabel();
viewPanel = new dfEditor.animation.AnimationPanel();
zoomInButton = new javax.swing.JButton();
zoomOutButton = new javax.swing.JButton();
controlPanel = new javax.swing.JInternalFrame();
jToolBar1 = new javax.swing.JToolBar();
removeSpriteButton = new javax.swing.JButton();
rotateCWButton = new javax.swing.JButton();
rotateACWButton = new javax.swing.JButton();
jPanel7 = new javax.swing.JPanel();
flipVCheckBox = new javax.swing.JCheckBox();
flipHCheckBox = new javax.swing.JCheckBox();
jPanel6 = new javax.swing.JPanel();
angleLabel = new javax.swing.JLabel();
angleSpinner = new javax.swing.JSpinner(new RollOverSpinModel(0, 0, 360, 1));
jPanel5 = new javax.swing.JPanel();
zOrderLabel = new javax.swing.JLabel();
zOrderSpinner = new javax.swing.JSpinner(new CustomSpinModel());
spriteListControlPanel = new javax.swing.JInternalFrame();
jScrollPane3 = new javax.swing.JScrollPane();
spriteList = new dfEditor.SpriteList();
onionSkinsCheckBox = new javax.swing.JCheckBox();
spriteListToggle = new javax.swing.JToggleButton();
modifySpriteToggle = new javax.swing.JToggleButton();
setName("Untitled"); // NOI18N
setPreferredSize(new java.awt.Dimension(800, 600));
org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(dfEditor.dfEditorApp.class).getContext().getResourceMap(AnimationController.class);
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel1.border.title"))); // NOI18N
jPanel1.setFocusable(false);
jPanel1.setName("jPanel1"); // NOI18N
jPanel1.setPreferredSize(new java.awt.Dimension(180, 179));
jScrollPane2.setName("jScrollPane2"); // NOI18N
animationList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
animationList.setName("animationList"); // NOI18N
animationList.setPreferredSize(null);
jScrollPane2.setViewportView(animationList);
animationList.setModel(new DefaultMutableListModel());
((JListMutable)animationList).setListCellEditor(new DefaultListCellEditor(new JTextField()));
addAnimationButton.setIcon(resourceMap.getIcon("addAnimationButton.icon")); // NOI18N
addAnimationButton.setText(resourceMap.getString("addAnimationButton.text")); // NOI18N
addAnimationButton.setToolTipText(resourceMap.getString("addAnimationButton.toolTipText")); // NOI18N
addAnimationButton.setAlignmentX(0.5F);
addAnimationButton.setContentAreaFilled(false);
addAnimationButton.setEnabled(false);
addAnimationButton.setFocusable(false);
addAnimationButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
addAnimationButton.setMaximumSize(new java.awt.Dimension(30, 30));
addAnimationButton.setMinimumSize(new java.awt.Dimension(30, 30));
addAnimationButton.setName("addAnimationButton"); // NOI18N
addAnimationButton.setPreferredSize(new java.awt.Dimension(30, 30));
addAnimationButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
addAnimationButtonActionPerformed(evt);
}
});
removeAnimationButton.setIcon(resourceMap.getIcon("removeAnimationButton.icon")); // NOI18N
removeAnimationButton.setText(resourceMap.getString("removeAnimationButton.text")); // NOI18N
removeAnimationButton.setToolTipText(resourceMap.getString("removeAnimationButton.toolTipText")); // NOI18N
removeAnimationButton.setAlignmentX(0.5F);
removeAnimationButton.setContentAreaFilled(false);
removeAnimationButton.setEnabled(false);
removeAnimationButton.setFocusable(false);
removeAnimationButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
removeAnimationButton.setMargin(new java.awt.Insets(0, 0, 0, 0));
removeAnimationButton.setMaximumSize(new java.awt.Dimension(100, 100));
removeAnimationButton.setMinimumSize(new java.awt.Dimension(0, 0));
removeAnimationButton.setName("removeAnimationButton"); // NOI18N
removeAnimationButton.setPreferredSize(new java.awt.Dimension(30, 30));
removeAnimationButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
removeAnimationButtonActionPerformed(evt);
}
});
duplicateAnimationButton.setIcon(resourceMap.getIcon("duplicateAnimationButton.icon")); // NOI18N
duplicateAnimationButton.setText(resourceMap.getString("duplicateAnimationButton.text")); // NOI18N
duplicateAnimationButton.setToolTipText(resourceMap.getString("duplicateAnimationButton.toolTipText")); // NOI18N
duplicateAnimationButton.setAlignmentX(0.5F);
duplicateAnimationButton.setContentAreaFilled(false);
duplicateAnimationButton.setEnabled(false);
duplicateAnimationButton.setFocusable(false);
duplicateAnimationButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
duplicateAnimationButton.setMargin(new java.awt.Insets(0, 0, 0, 0));
duplicateAnimationButton.setMaximumSize(new java.awt.Dimension(100, 100));
duplicateAnimationButton.setMinimumSize(new java.awt.Dimension(0, 0));
duplicateAnimationButton.setName("duplicateAnimationButton"); // NOI18N
duplicateAnimationButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
duplicateAnimationButtonActionPerformed(evt);
}
});
exportGifButton.setIcon(resourceMap.getIcon("exportGif.icon")); // NOI18N
exportGifButton.setText(resourceMap.getString("exportGifButton.text")); // NOI18N
exportGifButton.setToolTipText(resourceMap.getString("exportGifButton.toolTipText")); // NOI18N
exportGifButton.setAlignmentX(0.5F);
exportGifButton.setContentAreaFilled(false);
exportGifButton.setEnabled(false);
exportGifButton.setFocusable(false);
exportGifButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
exportGifButton.setMargin(new java.awt.Insets(0, 0, 0, 0));
exportGifButton.setMaximumSize(new java.awt.Dimension(100, 100));
exportGifButton.setMinimumSize(new java.awt.Dimension(0, 0));
exportGifButton.setName("exportGifButton"); // NOI18N
exportGifButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
exportGifButtonActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(2, 2, 2)
.addComponent(addAnimationButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(removeAnimationButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(duplicateAnimationButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(exportGifButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(28, Short.MAX_VALUE))
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 162, Short.MAX_VALUE)
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 110, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(addAnimationButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(removeAnimationButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(duplicateAnimationButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(exportGifButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))
);
jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel2.border.title"))); // NOI18N
jPanel2.setFocusable(false);
jPanel2.setName("jPanel2"); // NOI18N
jPanel2.setPreferredSize(new java.awt.Dimension(173, 173));
animationPanel1.setBackground(resourceMap.getColor("animationPanel1.background")); // NOI18N
animationPanel1.setName("animationPanel1"); // NOI18N
animationPanel1.setEditable(false);
playButton.setIcon(resourceMap.getIcon("playButton.icon")); // NOI18N
playButton.setText(resourceMap.getString("playButton.text")); // NOI18N
playButton.setToolTipText(resourceMap.getString("playButton.toolTipText")); // NOI18N
playButton.setAlignmentX(0.5F);
playButton.setContentAreaFilled(false);
playButton.setEnabled(false);
playButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
playButton.setMaximumSize(new java.awt.Dimension(30, 30));
playButton.setMinimumSize(new java.awt.Dimension(30, 30));
playButton.setName("playButton"); // NOI18N
playButton.setPreferredSize(new java.awt.Dimension(38, 38));
playButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
playButtonActionPerformed(evt);
}
});
javax.swing.GroupLayout animationPanel1Layout = new javax.swing.GroupLayout(animationPanel1);
animationPanel1.setLayout(animationPanel1Layout);
animationPanel1Layout.setHorizontalGroup(
animationPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, animationPanel1Layout.createSequentialGroup()
.addContainerGap(131, Short.MAX_VALUE)
.addComponent(playButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
);
animationPanel1Layout.setVerticalGroup(
animationPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, animationPanel1Layout.createSequentialGroup()
.addContainerGap(115, Short.MAX_VALUE)
.addComponent(playButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
);
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(animationPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(animationPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel3.border.title"))); // NOI18N
jPanel3.setFocusable(false);
jPanel3.setName("jPanel3"); // NOI18N
jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
jLabel1.setName("jLabel1"); // NOI18N
delaySpinner.setEnabled(false);
delaySpinner.setMaximumSize(new java.awt.Dimension(3000, 3000));
delaySpinner.setName("delaySpinner"); // NOI18N
delaySpinner.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent evt) {
delaySpinnerStateChanged(evt);
}
});
addCellButton.setIcon(resourceMap.getIcon("addCellButton.icon")); // NOI18N
addCellButton.setText(resourceMap.getString("addCellButton.text")); // NOI18N
addCellButton.setToolTipText(resourceMap.getString("addCellButton.toolTipText")); // NOI18N
addCellButton.setAlignmentX(0.5F);
addCellButton.setContentAreaFilled(false);
addCellButton.setEnabled(false);
addCellButton.setFocusable(false);
addCellButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
addCellButton.setMaximumSize(new java.awt.Dimension(30, 30));
addCellButton.setMinimumSize(new java.awt.Dimension(0, 0));
addCellButton.setName("addCellButton"); // NOI18N
addCellButton.setPreferredSize(new java.awt.Dimension(30, 30));
addCellButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
addCellButtonActionPerformed(evt);
}
});
removeCellButton.setIcon(resourceMap.getIcon("removeAnimationButton.icon")); // NOI18N
removeCellButton.setText(resourceMap.getString("removeCellButton.text")); // NOI18N
removeCellButton.setToolTipText(resourceMap.getString("removeCellButton.toolTipText")); // NOI18N
removeCellButton.setAlignmentX(0.5F);
removeCellButton.setContentAreaFilled(false);
removeCellButton.setEnabled(false);
removeCellButton.setFocusable(false);
removeCellButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
removeCellButton.setMargin(new java.awt.Insets(0, 0, 0, 0));
removeCellButton.setMaximumSize(new java.awt.Dimension(100, 100));
removeCellButton.setMinimumSize(new java.awt.Dimension(0, 0));
removeCellButton.setName("removeCellButton"); // NOI18N
removeCellButton.setPreferredSize(new java.awt.Dimension(30, 30));
removeCellButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
removeCellButtonActionPerformed(evt);
}
});
animationStripScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
animationStripScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
animationStripScrollPane.setAutoscrolls(true);
animationStripScrollPane.setName("animationStripScrollPane"); // NOI18N
animationStripPanel.setName("animationStripPanel"); // NOI18N
animationStripPanel.setPreferredSize(new java.awt.Dimension(430, 106));
javax.swing.GroupLayout animationStripPanelLayout = new javax.swing.GroupLayout(animationStripPanel);
animationStripPanel.setLayout(animationStripPanelLayout);
animationStripPanelLayout.setHorizontalGroup(
animationStripPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 430, Short.MAX_VALUE)
);
animationStripPanelLayout.setVerticalGroup(
animationStripPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 106, Short.MAX_VALUE)
);
animationStripScrollPane.setViewportView(animationStripPanel);
loopSpinner.setEnabled(false);
loopSpinner.setMaximumSize(new java.awt.Dimension(3000, 3000));
loopSpinner.setName("loopSpinner"); // NOI18N
loopSpinner.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent evt) {
loopSpinnerStateChanged(evt);
}
});
loopLabel.setText(resourceMap.getString("loopLabel.text")); // NOI18N
loopLabel.setName("loopLabel"); // NOI18N
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(animationStripScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 401, Short.MAX_VALUE)
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(addCellButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(removeCellButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 63, Short.MAX_VALUE)
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(delaySpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(45, 45, 45)
.addComponent(loopLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(loopSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
.addComponent(animationStripScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(addCellButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(removeCellButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(delaySpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(loopLabel)
.addComponent(loopSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGap(35, 35, 35))
);
jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel4.border.title"))); // NOI18N
jPanel4.setFocusable(false);
jPanel4.setName("jPanel4"); // NOI18N
jPanel4.setPreferredSize(new java.awt.Dimension(180, 392));
jScrollPane1.setName("jScrollPane1"); // NOI18N
spriteTree.setModel(new javax.swing.tree.DefaultTreeModel(new CustomNode("/", true)));
spriteTree.setToolTipText(resourceMap.getString("spriteTree.toolTipText")); // NOI18N
spriteTree.setAutoscrolls(true);
spriteTree.setEnabled(false);
spriteTree.setName("spriteTree"); // NOI18N
spriteTree.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() {
public void valueChanged(javax.swing.event.TreeSelectionEvent evt) {
spriteTreeValueChanged(evt);
}
});
jScrollPane1.setViewportView(spriteTree);
spritePreviewPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
spritePreviewPanel.setName("spritePreviewPanel"); // NOI18N
addToFrameButton.setIcon(resourceMap.getIcon("addToFrameButton.icon")); // NOI18N
addToFrameButton.setText(resourceMap.getString("addToFrameButton.text")); // NOI18N
addToFrameButton.setToolTipText(resourceMap.getString("addToFrameButton.toolTipText")); // NOI18N
addToFrameButton.setContentAreaFilled(false);
addToFrameButton.setEnabled(false);
addToFrameButton.setFocusable(false);
addToFrameButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
addToFrameButton.setMargin(new java.awt.Insets(0, 0, 0, 0));
addToFrameButton.setMaximumSize(new java.awt.Dimension(100, 100));
addToFrameButton.setMinimumSize(new java.awt.Dimension(0, 0));
addToFrameButton.setName("addToFrameButton"); // NOI18N
addToFrameButton.setPreferredSize(new java.awt.Dimension(34, 34));
addToFrameButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
addToFrameButtonActionPerformed(evt);
}
});
spritePreviewTitle.setBackground(new java.awt.Color(0,0,0,0));
spritePreviewTitle.setText(resourceMap.getString("spritePreviewTitle.text")); // NOI18N
spritePreviewTitle.setAlignmentX(0.5F);
spritePreviewTitle.setName("spritePreviewTitle"); // NOI18N
javax.swing.GroupLayout spritePreviewPanelLayout = new javax.swing.GroupLayout(spritePreviewPanel);
spritePreviewPanel.setLayout(spritePreviewPanelLayout);
spritePreviewPanelLayout.setHorizontalGroup(
spritePreviewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, spritePreviewPanelLayout.createSequentialGroup()
.addContainerGap(129, Short.MAX_VALUE)
.addComponent(addToFrameButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(spritePreviewTitle, javax.swing.GroupLayout.DEFAULT_SIZE, 159, Short.MAX_VALUE)
);
spritePreviewPanelLayout.setVerticalGroup(
spritePreviewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, spritePreviewPanelLayout.createSequentialGroup()
.addComponent(spritePreviewTitle)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 94, Short.MAX_VALUE)
.addComponent(addToFrameButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
);
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(spritePreviewPanel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 223, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(spritePreviewPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
);
viewPanel.setBackground(resourceMap.getColor("viewPanel.background")); // NOI18N
viewPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
viewPanel.setName("viewPanel"); // NOI18N
zoomInButton.setIcon(resourceMap.getIcon("zoomInButton.icon")); // NOI18N
zoomInButton.setText(resourceMap.getString("zoomInButton.text")); // NOI18N
zoomInButton.setToolTipText(resourceMap.getString("zoomInButton.toolTipText")); // NOI18N
zoomInButton.setContentAreaFilled(false);
zoomInButton.setEnabled(false);
zoomInButton.setFocusable(false);
zoomInButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
zoomInButton.setMargin(new java.awt.Insets(0, 0, 0, 0));
zoomInButton.setMaximumSize(new java.awt.Dimension(34, 34));
zoomInButton.setMinimumSize(new java.awt.Dimension(34, 34));
zoomInButton.setName("zoomInButton"); // NOI18N
zoomInButton.setPreferredSize(new java.awt.Dimension(34, 34));
zoomInButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
zoomInButtonActionPerformed(evt);
}
});
zoomOutButton.setIcon(resourceMap.getIcon("zoomOutButton.icon")); // NOI18N
zoomOutButton.setText(resourceMap.getString("zoomOutButton.text")); // NOI18N
zoomOutButton.setToolTipText(resourceMap.getString("zoomOutButton.toolTipText")); // NOI18N
zoomOutButton.setContentAreaFilled(false);
zoomOutButton.setEnabled(false);
zoomOutButton.setFocusable(false);
zoomOutButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
zoomOutButton.setMargin(new java.awt.Insets(0, 0, 0, 0));
zoomOutButton.setMaximumSize(new java.awt.Dimension(34, 34));
zoomOutButton.setMinimumSize(new java.awt.Dimension(34, 34));
zoomOutButton.setName("zoomOutButton"); // NOI18N
zoomOutButton.setPreferredSize(new java.awt.Dimension(34, 34));
zoomOutButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
zoomOutButtonActionPerformed(evt);
}
});
controlPanel.setClosable(true);
controlPanel.setDefaultCloseOperation(javax.swing.WindowConstants.HIDE_ON_CLOSE);
controlPanel.setTitle(resourceMap.getString("controlPanel.title")); // NOI18N
controlPanel.setFocusCycleRoot(false);
controlPanel.setFocusable(false);
controlPanel.setFont(resourceMap.getFont("controlPanel.font")); // NOI18N
controlPanel.setFrameIcon(resourceMap.getIcon("controlPanel.frameIcon")); // NOI18N
controlPanel.setName("controlPanel"); // NOI18N
controlPanel.setRequestFocusEnabled(false);
controlPanel.setVisible(true);
controlPanel.getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jToolBar1.setFloatable(false);
jToolBar1.setAlignmentY(0.5F);
jToolBar1.setMinimumSize(new java.awt.Dimension(106, 30));
jToolBar1.setName("jToolBar1"); // NOI18N
removeSpriteButton.setIcon(resourceMap.getIcon("removeSpriteButton.icon")); // NOI18N
removeSpriteButton.setText(resourceMap.getString("removeSpriteButton.text")); // NOI18N
removeSpriteButton.setToolTipText(resourceMap.getString("removeSpriteButton.toolTipText")); // NOI18N
removeSpriteButton.setAlignmentX(0.5F);
removeSpriteButton.setEnabled(false);
removeSpriteButton.setFocusable(false);
removeSpriteButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
removeSpriteButton.setMargin(new java.awt.Insets(0, 0, 0, 0));
removeSpriteButton.setMaximumSize(new java.awt.Dimension(34, 34));
removeSpriteButton.setMinimumSize(new java.awt.Dimension(34, 34));
removeSpriteButton.setName("removeSpriteButton"); // NOI18N
removeSpriteButton.setPreferredSize(new java.awt.Dimension(34, 34));
removeSpriteButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
removeSpriteButtonActionPerformed(evt);
}
});
jToolBar1.add(removeSpriteButton);
rotateCWButton.setIcon(resourceMap.getIcon("rotateCWButton.icon")); // NOI18N
rotateCWButton.setToolTipText(resourceMap.getString("rotateCWButton.toolTipText")); // NOI18N
rotateCWButton.setAlignmentX(0.5F);
rotateCWButton.setEnabled(false);
rotateCWButton.setFocusable(false);
rotateCWButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
rotateCWButton.setMargin(new java.awt.Insets(0, 0, 0, 0));
rotateCWButton.setMaximumSize(new java.awt.Dimension(34, 34));
rotateCWButton.setMinimumSize(new java.awt.Dimension(34, 34));
rotateCWButton.setName("rotateCWButton"); // NOI18N
rotateCWButton.setPreferredSize(new java.awt.Dimension(34, 34));
rotateCWButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
rotateCWButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
rotateCWButtonActionPerformed(evt);
}
});
jToolBar1.add(rotateCWButton);
rotateACWButton.setIcon(resourceMap.getIcon("rotateACWButton.icon")); // NOI18N
rotateACWButton.setToolTipText(resourceMap.getString("rotateACWButton.toolTipText")); // NOI18N
rotateACWButton.setAlignmentX(0.5F);
rotateACWButton.setEnabled(false);
rotateACWButton.setFocusable(false);
rotateACWButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
rotateACWButton.setMargin(new java.awt.Insets(0, 0, 0, 0));
rotateACWButton.setMaximumSize(new java.awt.Dimension(34, 34));
rotateACWButton.setMinimumSize(new java.awt.Dimension(34, 34));
rotateACWButton.setName("rotateACWButton"); // NOI18N
rotateACWButton.setPreferredSize(new java.awt.Dimension(34, 34));
rotateACWButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
rotateACWButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
rotateACWButtonActionPerformed(evt);
}
});
jToolBar1.add(rotateACWButton);
jPanel7.setName("jPanel7"); // NOI18N
flipVCheckBox.setText(resourceMap.getString("flipVCheckBox.text")); // NOI18N
flipVCheckBox.setEnabled(false);
flipVCheckBox.setName("flipVCheckBox"); // NOI18N
flipVCheckBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
flipVCheckBoxActionPerformed(evt);
}
});
flipHCheckBox.setText(resourceMap.getString("flipHCheckBox.text")); // NOI18N
flipHCheckBox.setEnabled(false);
flipHCheckBox.setName("flipHCheckBox"); // NOI18N
flipHCheckBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
flipHCheckBoxActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
jPanel7.setLayout(jPanel7Layout);
jPanel7Layout.setHorizontalGroup(
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel7Layout.createSequentialGroup()
.addContainerGap()
.addComponent(flipHCheckBox, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(flipVCheckBox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
);
jPanel7Layout.setVerticalGroup(
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(flipVCheckBox, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(flipHCheckBox, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
);
jToolBar1.add(jPanel7);
jPanel6.setName("jPanel6"); // NOI18N
angleLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
angleLabel.setText(resourceMap.getString("angleLabel.text")); // NOI18N
angleLabel.setName("angleLabel"); // NOI18N
angleSpinner.setModel(new RollOverSpinModel(0, 0, 360, 1));
angleSpinner.setToolTipText(resourceMap.getString("angleSpinner.toolTipText")); // NOI18N
angleSpinner.setEnabled(false);
angleSpinner.setMaximumSize(new java.awt.Dimension(3000, 3000));
angleSpinner.setName("angleSpinner"); // NOI18N
((javax.swing.JSpinner.DefaultEditor) zOrderSpinner.getEditor()).getTextField().setEditable(true);
angleSpinner.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent evt) {
angleSpinnerStateChanged(evt);
}
});
javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
jPanel6.setLayout(jPanel6Layout);
jPanel6Layout.setHorizontalGroup(
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
.addComponent(angleLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 43, Short.MAX_VALUE)
.addGap(3, 3, 3)
.addComponent(angleSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE))
);
jPanel6Layout.setVerticalGroup(
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(angleSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(angleLabel))
);
jToolBar1.add(jPanel6);
jPanel5.setName("jPanel5"); // NOI18N
zOrderLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
zOrderLabel.setText(resourceMap.getString("zOrderLabel.text")); // NOI18N
zOrderLabel.setName("zOrderLabel"); // NOI18N
zOrderSpinner.setToolTipText(resourceMap.getString("zOrderSpinner.toolTipText")); // NOI18N
zOrderSpinner.setEnabled(false);
zOrderSpinner.setMaximumSize(new java.awt.Dimension(3000, 3000));
zOrderSpinner.setName("zOrderSpinner"); // NOI18N
((javax.swing.JSpinner.DefaultEditor) zOrderSpinner.getEditor()).getTextField().setEditable(true);
zOrderSpinner.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent evt) {
zOrderSpinnerStateChanged(evt);
}
});
javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
jPanel5.setLayout(jPanel5Layout);
jPanel5Layout.setHorizontalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(zOrderLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(2, 2, 2)
.addComponent(zOrderSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE))
);
jPanel5Layout.setVerticalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(zOrderLabel)
.addComponent(zOrderSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
);
jToolBar1.add(jPanel5);
controlPanel.getContentPane().add(jToolBar1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, 30));
spriteListControlPanel.setClosable(true);
spriteListControlPanel.setDefaultCloseOperation(javax.swing.WindowConstants.HIDE_ON_CLOSE);
spriteListControlPanel.setTitle(resourceMap.getString("spriteListControlPanel.title")); // NOI18N
spriteListControlPanel.setFocusCycleRoot(false);
spriteListControlPanel.setFocusable(false);
spriteListControlPanel.setFont(resourceMap.getFont("spriteListControlPanel.font")); // NOI18N
spriteListControlPanel.setName("spriteListControlPanel"); // NOI18N
spriteListControlPanel.setRequestFocusEnabled(false);
spriteListControlPanel.setVerifyInputWhenFocusTarget(false);
spriteListControlPanel.setVisible(true);
spriteListControlPanel.getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jScrollPane3.setName("jScrollPane3"); // NOI18N
spriteList.setName("spriteList"); // NOI18N
jScrollPane3.setViewportView(spriteList);
spriteList.setModel(new DefaultListModel());
spriteListControlPanel.getContentPane().add(jScrollPane3, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 110, 110));
javax.swing.GroupLayout viewPanelLayout = new javax.swing.GroupLayout(viewPanel);
viewPanel.setLayout(viewPanelLayout);
viewPanelLayout.setHorizontalGroup(
viewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(viewPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(viewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(viewPanelLayout.createSequentialGroup()