Normand Briere
2019-06-24 914255f70cf047897212839cbf3a6722703f4457
GroupEditor.java
....@@ -580,43 +580,43 @@
580580 //minButton.setToolTipText("Minimize window");
581581 //minButton.addActionListener(this);
582582
583
- oe.toolbarPanel.add(maxButton = new cButton("\u271A", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
583
+ oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
584584 maxButton.setToolTipText("Maximize window");
585585 maxButton.addActionListener(this);
586586
587
- oe.toolbarPanel.add(fullButton = new cButton("\u2b1c", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
587
+ oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
588588 fullButton.setToolTipText("Full-screen window");
589589 fullButton.addActionListener(this);
590590
591
- oe.toolbarPanel.add(undoButton = new cButton("\u21a9", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
591
+ oe.toolbarPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
592592 undoButton.setToolTipText("Undo changes");
593593 undoButton.addActionListener(this);
594594
595
- oe.toolbarPanel.add(redoButton = new cButton("\u21aa", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
595
+ oe.toolbarPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
596596 redoButton.setToolTipText("Redo changes");
597597 redoButton.addActionListener(this);
598598
599
- oe.toolbarPanel.add(saveButton = new cButton("\u21e3", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
599
+ oe.toolbarPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
600600 saveButton.setToolTipText("Save changes");
601601 saveButton.addActionListener(this);
602602
603
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
603
+ oe.toolbarPanel.add(liveCB = GetCheckBox("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
604604 liveCB.setToolTipText("Enable animation");
605605 liveCB.addItemListener(this);
606606
607
- oe.toolbarPanel.add(oneStepButton = new cButton("\u29f4", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
608
- oneStepButton.setToolTipText("Animate one step forward");
609
- oneStepButton.addActionListener(this);
610
-
611
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
607
+ oe.toolbarPanel.add(fastCB = GetCheckBox("icons/runfast.png", CameraPane.FAST)); //, constraints);
612608 fastCB.setToolTipText("Fast mode");
613609 fastCB.addItemListener(this);
614610
615
- oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK)); //, oe.aConstraints);
611
+ oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
612
+ oneStepButton.setToolTipText("Animate one step forward");
613
+ oneStepButton.addActionListener(this);
614
+
615
+ oe.toolbarPanel.add(trackCB = GetCheckBox("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);
616616 trackCB.setToolTipText("Enable tracking");
617617 trackCB.addItemListener(this);
618618
619
- oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
619
+ oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
620620 screenfitButton.setToolTipText("Screen fit");
621621 screenfitButton.addActionListener(this);
622622
....@@ -630,8 +630,8 @@
630630 snapobjectButton.setToolTipText("Snap Object");
631631 }
632632
633
- oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
634
- flashSelectionButton.setToolTipText("Show selection");
633
+ oe.toolbarPanel.add(flashSelectionButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
634
+ flashSelectionButton.setToolTipText("Highlight selection");
635635 flashSelectionButton.addActionListener(this);
636636
637637 oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
....@@ -815,6 +815,10 @@
815815 shadowCB.setToolTipText("Compute shadows when live");
816816 shadowCB.addItemListener(this);
817817
818
+ panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints);
819
+ autosaveCB.setToolTipText("Auto-save on structure change");
820
+ autosaveCB.addItemListener(this);
821
+
818822 if (Globals.ADVANCED)
819823 {
820824 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
....@@ -864,25 +868,26 @@
864868 /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this);
865869 }
866870
867
- JCheckBox liveCB;
868
- JCheckBox supportCB;
869
- JCheckBox localCB;
870
- JCheckBox crowdCB;
871
- JCheckBox smoothCB;
872
- JCheckBox fastCB;
873
- JCheckBox slowCB;
874
- JCheckBox boxCB;
875
- JCheckBox zoomBoxCB;
876
- JCheckBox trackCB;
877
- JCheckBox smoothfocusCB;
871
+ cCheckBox liveCB;
872
+ cCheckBox supportCB;
873
+ cCheckBox localCB;
874
+ cCheckBox crowdCB;
875
+ cCheckBox smoothCB;
876
+ cCheckBox fastCB;
877
+ cCheckBox slowCB;
878
+ cCheckBox boxCB;
879
+ cCheckBox zoomBoxCB;
880
+ cCheckBox trackCB;
881
+ cCheckBox smoothfocusCB;
878882 // JCheckBox speakerMocapCB;
879
- JCheckBox speakerCameraCB;
880
- JCheckBox speakerFocusCB;
881
- JCheckBox debugCB;
883
+ cCheckBox speakerCameraCB;
884
+ cCheckBox speakerFocusCB;
885
+ cCheckBox debugCB;
882886
883
- JCheckBox oeilCB;
884
- JCheckBox shadowCB;
885
- JCheckBox lookAtCB;
887
+ cCheckBox oeilCB;
888
+ cCheckBox shadowCB;
889
+ cCheckBox autosaveCB;
890
+ cCheckBox lookAtCB;
886891
887892 // static int COLOR = 1;
888893 // static int MATERIAL = 2;
....@@ -890,9 +895,9 @@
890895
891896 int dropAttributes = Object3D.COLOR | Object3D.MATERIAL;
892897
893
- JCheckBox colorCB;
894
- JCheckBox materialCB;
895
- JCheckBox textureCB;
898
+ cCheckBox colorCB;
899
+ cCheckBox materialCB;
900
+ cCheckBox textureCB;
896901
897902 public void itemStateChanged(ItemEvent e)
898903 {
....@@ -988,6 +993,10 @@
988993 else if(e.getSource() == shadowCB)
989994 {
990995 Globals.COMPUTESHADOWWHENLIVE ^= true;
996
+ }
997
+ else if(e.getSource() == autosaveCB)
998
+ {
999
+ Globals.SAVEONMAKE ^= true;
9911000 }
9921001 else if(e.getSource() == lookAtCB)
9931002 {
....@@ -3159,7 +3168,8 @@
31593168 buttonGroup.remove(ab);
31603169 radioPanel.remove(ab);
31613170
3162
- ab.GetObject().editWindow = null;
3171
+ //ab.GetObject().editWindow = null;
3172
+ ab.GetObject().manipWindow = null;
31633173 // ab.GetObject().objectUI = null; // ?????????
31643174
31653175 ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick();
....@@ -3273,6 +3283,7 @@
32733283
32743284 // fix "+" issue
32753285 //group.editWindow = this;
3286
+ group.manipWindow = this;
32763287
32773288 /*
32783289 currentLayout = radio.layout;
....@@ -4595,6 +4606,7 @@
45954606
45964607 if (cut)
45974608 {
4609
+ if (Globals.SAVEONMAKE)
45984610 Save();
45994611 //int indices[] = jList.getSelectedIndices();
46004612 //for (int i = indices.length - 1; i >= 0; i--)