Normand Briere
2019-05-01 504890a7b930ab6b853c49de825ae848e0535339
GroupEditor.java
....@@ -12,6 +12,7 @@
1212 import com.jme.math.Vector3f;
1313 import com.jme.renderer.ColorRGBA;
1414
15
+import grafeme.ui.*;
1516 //import buoy.widget.BFileChooser;
1617
1718 class GroupEditor extends ObjEditor implements //iParse, //iCallBack,
....@@ -604,15 +605,15 @@
604605 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
605606 }
606607
607
- void AddOptions(JPanel panel, GridBagConstraints constraints)
608
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
608609 {
609
- constraints.gridx = 0;
610
- constraints.gridy = 0;
611
- panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), constraints);
610
+ //constraints.gridx = 0;
611
+ //constraints.gridy = 0;
612
+ panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
612613 fastCB.setToolTipText("Fast mode");
613614 fastCB.addItemListener(this);
614
- constraints.gridy += 1;
615
- panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), constraints);
615
+ //constraints.gridy += 1;
616
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
616617 supportCB.setToolTipText("Enabled rigging");
617618 supportCB.addItemListener(this);
618619
....@@ -620,26 +621,26 @@
620621 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
621622 // localCB.addItemListener(this);
622623
623
- constraints.gridy += 1;
624
- panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD), constraints);
624
+ //constraints.gridy += 1;
625
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
625626 crowdCB.setToolTipText("Used for crowds");
626627 crowdCB.addItemListener(this);
627628
628
- constraints.gridy += 1;
629
- panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), constraints);
629
+ //constraints.gridy += 1;
630
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
630631 smoothCB.setToolTipText("Snapping delay");
631632 smoothCB.addItemListener(this);
632633
633
- constraints.gridy += 1;
634
- panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), constraints);
634
+ //constraints.gridy += 1;
635
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
635636 slowCB.setToolTipText("Smooth interpolation");
636637 slowCB.addItemListener(this);
637
- constraints.gridy += 1;
638
- panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE), constraints);
638
+ //constraints.gridy += 1;
639
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
639640 boxCB.setToolTipText("Display bounding boxes");
640641 boxCB.addItemListener(this);
641
- constraints.gridy += 1;
642
- panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE), constraints);
642
+ //constraints.gridy += 1;
643
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
643644 zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
644645 zoomBoxCB.addItemListener(this);
645646
....@@ -650,16 +651,16 @@
650651 if (false)
651652 {
652653 // handled in scripts
653
- constraints.gridy += 1;
654
- panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), constraints);
654
+ //constraints.gridy += 1;
655
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
655656 speakerCameraCB.addItemListener(this);
656657
657
- constraints.gridy += 1;
658
- panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), constraints);
658
+ //constraints.gridy += 1;
659
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
659660 speakerFocusCB.addItemListener(this);
660661
661
- constraints.gridy += 1;
662
- panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), constraints);
662
+ //constraints.gridy += 1;
663
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
663664 smoothfocusCB.addItemListener(this);
664665 }
665666
....@@ -667,12 +668,12 @@
667668 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
668669 // debugCB.addItemListener(this);
669670
670
- constraints.gridy += 1;
671
- panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL), constraints);
671
+ //constraints.gridy += 1;
672
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
672673 oeilCB.addItemListener(this);
673674
674
- constraints.gridy += 1;
675
- panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT), constraints);
675
+ //constraints.gridy += 1;
676
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
676677 lookAtCB.setToolTipText("Look-at target");
677678 lookAtCB.addItemListener(this);
678679
....@@ -2720,7 +2721,7 @@
27202721 // centralPanel.setVisible(true);
27212722 // XYZPanel.setVisible(false);
27222723 bigThree.ClearUI();
2723
- bigThree.addComponent(centralPanel);
2724
+ bigThree.add(centralPanel);
27242725 bigThree.FlushUI();
27252726 } else
27262727 if (source == threeButton)
....@@ -2755,8 +2756,8 @@
27552756 // centralPanel.setVisible(true);
27562757 // XYZPanel.setVisible(true);
27572758 bigThree.ClearUI();
2758
- bigThree.addComponent(centralPanel);
2759
- bigThree.addComponent(XYZPanel);
2759
+ bigThree.add(centralPanel);
2760
+ bigThree.add(XYZPanel);
27602761 bigThree.FlushUI();
27612762 } else
27622763 if (source == fourButton)
....@@ -2791,7 +2792,7 @@
27912792 // centralPanel.setVisible(false);
27922793 // XYZPanel.setVisible(false);
27932794 bigThree.ClearUI();
2794
- bigThree.addComponent(scenePanel);
2795
+ bigThree.add(scenePanel);
27952796 bigThree.FlushUI();
27962797 } else
27972798 if (source == sixButton)
....@@ -2826,8 +2827,8 @@
28262827 // centralPanel.setVisible(true);
28272828 // XYZPanel.setVisible(false);
28282829 bigThree.ClearUI();
2829
- bigThree.addComponent(scenePanel);
2830
- bigThree.addComponent(centralPanel);
2830
+ bigThree.add(scenePanel);
2831
+ bigThree.add(centralPanel);
28312832 bigThree.FlushUI();
28322833 } else
28332834 if (source == sevenButton)
....@@ -2862,9 +2863,9 @@
28622863 // centralPanel.setVisible(true);
28632864 // XYZPanel.setVisible(true);
28642865 bigThree.ClearUI();
2865
- bigThree.addComponent(scenePanel);
2866
- bigThree.addComponent(centralPanel);
2867
- bigThree.addComponent(XYZPanel);
2866
+ bigThree.add(scenePanel);
2867
+ bigThree.add(centralPanel);
2868
+ bigThree.add(XYZPanel);
28682869 bigThree.FlushUI();
28692870 } else
28702871 if (source == rootButton)
....@@ -2916,7 +2917,7 @@
29162917
29172918 child.editWindow = null; // ???????????
29182919 }
2919
- objEditor.ctrlPanel.revalidate();
2920
+ objEditor.ctrlPanel.validate();
29202921 //objEditor.jTree.clearSelection();
29212922 //objEditor.ResetSliders();
29222923 refreshContents(true);