|
@@ -353,7 +353,24 @@ public class Frame extends JFrame implements ListSelectionListener {
|
353
|
353
|
frameListModel.set(i, frameListModel.get(i - 1));
|
354
|
354
|
frameListModel.set(i - 1, tmp);
|
355
|
355
|
frameList.setSelectedIndex(i - 1);
|
356
|
|
- worker.getAnimation(animList.getSelectedIndex()).moveFrameUp(frameList.getSelectedIndex());
|
|
356
|
+ worker.getAnimation(animList.getSelectedIndex()).moveFrameUp(i);
|
|
357
|
+ }
|
|
358
|
+ }
|
|
359
|
+ });
|
|
360
|
+
|
|
361
|
+ frameDown.setBounds(544, 132, 107, 28);
|
|
362
|
+ frameDown.setText("Move down");
|
|
363
|
+ frameDown.setFont(new Font("Dialog", Font.PLAIN, 13));
|
|
364
|
+ cp.add(frameDown);
|
|
365
|
+ frameDown.addActionListener(new ActionListener() {
|
|
366
|
+ public void actionPerformed(ActionEvent evt) {
|
|
367
|
+ int i = frameList.getSelectedIndex();
|
|
368
|
+ if ((i >= 0) && (frameListModel.getSize() >= 2) && (i < (frameListModel.getSize() - 1))) {
|
|
369
|
+ Object tmp = frameListModel.get(i);
|
|
370
|
+ frameListModel.set(i, frameListModel.get(i + 1));
|
|
371
|
+ frameListModel.set(i + 1, tmp);
|
|
372
|
+ frameList.setSelectedIndex(i + 1);
|
|
373
|
+ worker.getAnimation(animList.getSelectedIndex()).moveFrameDown(i);
|
357
|
374
|
}
|
358
|
375
|
}
|
359
|
376
|
});
|
|
@@ -418,23 +435,6 @@ public class Frame extends JFrame implements ListSelectionListener {
|
418
|
435
|
}
|
419
|
436
|
});
|
420
|
437
|
|
421
|
|
- frameDown.setBounds(544, 132, 107, 28);
|
422
|
|
- frameDown.setText("Move down");
|
423
|
|
- frameDown.setFont(new Font("Dialog", Font.PLAIN, 13));
|
424
|
|
- cp.add(frameDown);
|
425
|
|
- frameDown.addActionListener(new ActionListener() {
|
426
|
|
- public void actionPerformed(ActionEvent evt) {
|
427
|
|
- int i = frameList.getSelectedIndex();
|
428
|
|
- if ((i >= 0) && (frameListModel.getSize() >= 2) && (i < (frameListModel.getSize() - 1))) {
|
429
|
|
- Object tmp = frameListModel.get(i);
|
430
|
|
- frameListModel.set(i, frameListModel.get(i + 1));
|
431
|
|
- frameListModel.set(i + 1, tmp);
|
432
|
|
- frameList.setSelectedIndex(i + 1);
|
433
|
|
- worker.getAnimation(animList.getSelectedIndex()).moveFrameDown(i);
|
434
|
|
- }
|
435
|
|
- }
|
436
|
|
- });
|
437
|
|
-
|
438
|
438
|
frameLengthLabel.setBounds(536, 160, 113, 24);
|
439
|
439
|
frameLengthLabel.setText("Time (1/24 sec)");
|
440
|
440
|
frameLengthLabel.setFont(new Font("Dialog", Font.PLAIN, 13));
|
|
@@ -574,7 +574,7 @@ public class Frame extends JFrame implements ListSelectionListener {
|
574
|
574
|
animModel.set(i, animModel.get(i - 1));
|
575
|
575
|
animModel.set(i - 1, tmp);
|
576
|
576
|
animList.setSelectedIndex(i - 1);
|
577
|
|
- worker.moveAnimationUp(animList.getSelectedIndex());
|
|
577
|
+ worker.moveAnimationUp(i);
|
578
|
578
|
}
|
579
|
579
|
}
|
580
|
580
|
});
|
|
@@ -591,7 +591,7 @@ public class Frame extends JFrame implements ListSelectionListener {
|
591
|
591
|
animModel.set(i, animModel.get(i + 1));
|
592
|
592
|
animModel.set(i + 1, tmp);
|
593
|
593
|
animList.setSelectedIndex(i + 1);
|
594
|
|
- worker.moveAnimationDown(animList.getSelectedIndex());
|
|
594
|
+ worker.moveAnimationDown(i);
|
595
|
595
|
}
|
596
|
596
|
}
|
597
|
597
|
});
|