Normand Briere
2019-04-29 8c837a9e50c29e66bdf5bd7ea2fd15b1a7d5d598
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,
....@@ -434,6 +435,9 @@
434435 oe.buttonGroup.add(dummyButton);
435436 */
436437 aConstraints.gridy += 1;
438
+
439
+ //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
440
+
437441 oe.aConstraints.gridwidth = 1;
438442 oe.aConstraints.gridx = 0;
439443
....@@ -442,76 +446,7 @@
442446 liveCB.addItemListener(this);
443447
444448 oe.aConstraints.gridx += 1;
445
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), oe.aConstraints);
446
- fastCB.setToolTipText("Fast mode");
447
- fastCB.addItemListener(this);
448
- oe.aConstraints.gridx += 1;
449
- oe.toolbarPanel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), oe.aConstraints);
450
- supportCB.setToolTipText("Enabled rigging");
451
- supportCB.addItemListener(this);
452
-
453
- // oe.aConstraints.gridx += 1;
454
- // oe.toolbarPanel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), oe.aConstraints);
455
- // localCB.addItemListener(this);
456
-
457
- oe.aConstraints.gridx += 1;
458
- oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD), oe.aConstraints);
459
- crowdCB.setToolTipText("Used for crowds");
460
- crowdCB.addItemListener(this);
461
-
462
- oe.aConstraints.gridx += 1;
463
- oe.toolbarPanel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), oe.aConstraints);
464
- smoothCB.setToolTipText("Snapping delay");
465
- smoothCB.addItemListener(this);
466
-
467
- oe.aConstraints.gridx += 1;
468
- oe.toolbarPanel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), oe.aConstraints);
469
- slowCB.setToolTipText("Smooth interpolation");
470
- slowCB.addItemListener(this);
471
- oe.aConstraints.gridx += 1;
472
- oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE), oe.aConstraints);
473
- boxCB.setToolTipText("Display bounding boxes");
474
- boxCB.addItemListener(this);
475
- oe.aConstraints.gridx += 1;
476
- oe.toolbarPanel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE), oe.aConstraints);
477
- zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
478
- zoomBoxCB.addItemListener(this);
479
-
480
-// oe.aConstraints.gridx += 1;
481
-// oe.toolbarPanel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), oe.aConstraints);
482
-// speakerMocapCB.addItemListener(this);
483
-
484
- if (false)
485
- {
486
- // handled in scripts
487
- oe.aConstraints.gridx += 1;
488
- oe.toolbarPanel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), oe.aConstraints);
489
- speakerCameraCB.addItemListener(this);
490
-
491
- oe.aConstraints.gridx += 1;
492
- oe.toolbarPanel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), oe.aConstraints);
493
- speakerFocusCB.addItemListener(this);
494
-
495
- oe.aConstraints.gridx += 1;
496
- oe.toolbarPanel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), oe.aConstraints);
497
- smoothfocusCB.addItemListener(this);
498
- }
499
-
500
-//oe.aConstraints.gridx += 1;
501
-//oe.toolbarPanel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), oe.aConstraints);
502
-// debugCB.addItemListener(this);
503
-
504
- oe.aConstraints.gridx += 1;
505
- oe.toolbarPanel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL), oe.aConstraints);
506
- oeilCB.addItemListener(this);
507
-
508
- oe.aConstraints.gridx += 1;
509
- oe.toolbarPanel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT), oe.aConstraints);
510
- lookAtCB.setToolTipText("Look-at target");
511
- lookAtCB.addItemListener(this);
512
-
513
- oe.aConstraints.gridx += 1;
514
- oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK), oe.aConstraints);
449
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK), oe.aConstraints);
515450 trackCB.setToolTipText("Enable tracking");
516451 trackCB.addItemListener(this);
517452
....@@ -669,6 +604,80 @@
669604 radio.layout = sevenButton;
670605 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
671606 }
607
+
608
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
609
+ {
610
+ //constraints.gridx = 0;
611
+ //constraints.gridy = 0;
612
+ panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
613
+ fastCB.setToolTipText("Fast mode");
614
+ fastCB.addItemListener(this);
615
+ //constraints.gridy += 1;
616
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
617
+ supportCB.setToolTipText("Enabled rigging");
618
+ supportCB.addItemListener(this);
619
+
620
+ // constraints.gridy += 1;
621
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
622
+ // localCB.addItemListener(this);
623
+
624
+ //constraints.gridy += 1;
625
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
626
+ crowdCB.setToolTipText("Used for crowds");
627
+ crowdCB.addItemListener(this);
628
+
629
+ //constraints.gridy += 1;
630
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
631
+ smoothCB.setToolTipText("Snapping delay");
632
+ smoothCB.addItemListener(this);
633
+
634
+ //constraints.gridy += 1;
635
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
636
+ slowCB.setToolTipText("Smooth interpolation");
637
+ slowCB.addItemListener(this);
638
+ //constraints.gridy += 1;
639
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
640
+ boxCB.setToolTipText("Display bounding boxes");
641
+ boxCB.addItemListener(this);
642
+ //constraints.gridy += 1;
643
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
644
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
645
+ zoomBoxCB.addItemListener(this);
646
+
647
+// constraints.gridy += 1;
648
+// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
649
+// speakerMocapCB.addItemListener(this);
650
+
651
+ if (false)
652
+ {
653
+ // handled in scripts
654
+ //constraints.gridy += 1;
655
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
656
+ speakerCameraCB.addItemListener(this);
657
+
658
+ //constraints.gridy += 1;
659
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
660
+ speakerFocusCB.addItemListener(this);
661
+
662
+ //constraints.gridy += 1;
663
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
664
+ smoothfocusCB.addItemListener(this);
665
+ }
666
+
667
+//constraints.gridx += 1;
668
+//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
669
+// debugCB.addItemListener(this);
670
+
671
+ //constraints.gridy += 1;
672
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
673
+ oeilCB.addItemListener(this);
674
+
675
+ //constraints.gridy += 1;
676
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
677
+ lookAtCB.setToolTipText("Look-at target");
678
+ lookAtCB.addItemListener(this);
679
+
680
+ }
672681
673682 void EditObject(Object3D obj)
674683 {
....@@ -1510,6 +1519,7 @@
15101519 //
15111520 public void actionPerformed(ActionEvent event) // , Object arg)
15121521 {
1522
+ Object source = event.getSource();
15131523 /*
15141524 if (event.getSource() == nameField)
15151525 {
....@@ -1521,11 +1531,11 @@
15211531 }
15221532 else
15231533 */
1524
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1534
+ if (source == lookAtItem || source == lookFromItem)
15251535 {
15261536 ScreenFit();
15271537 } else
1528
- if (event.getSource() == switchItem)
1538
+ if (source == switchItem)
15291539 {
15301540 cVector v1 = new cVector();
15311541 cVector v2 = new cVector();
....@@ -1534,11 +1544,11 @@
15341544 objEditor.cameraView.renderCamera.setAim(v2, v1);
15351545 objEditor.cameraView.repaint();
15361546 } else
1537
- if (event.getSource() == rectoidItem)
1547
+ if (source == rectoidItem)
15381548 {
15391549 makeSomething(new Box());
15401550 } else
1541
- if (event.getSource() == particleItem)
1551
+ if (source == particleItem)
15421552 {
15431553 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15441554 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1559,9 +1569,9 @@
15591569 applyExample(particleGeom, "SMOKE");
15601570 makeSomething(particleGeom);
15611571 } else
1562
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1572
+ if (source == ragdollItem || source == ragdoll2Item)
15631573 {
1564
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1574
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15651575
15661576 ragdoll.toParent = LA.newMatrix();
15671577 ragdoll.fromParent = LA.newMatrix();
....@@ -1579,7 +1589,7 @@
15791589 } else
15801590 /*
15811591 */
1582
- if (event.getSource() == heightFieldItem)
1592
+ if (source == heightFieldItem)
15831593 {
15841594 Object3D obj = new Object3D();
15851595
....@@ -1617,31 +1627,31 @@
16171627
16181628 makeSomething(obj);
16191629 } else
1620
- if (event.getSource() == gridItem)
1630
+ if (source == gridItem)
16211631 {
16221632 makeSomething(new Grid());
16231633 } else
1624
- if (event.getSource() == ellipsoidItem)
1634
+ if (source == ellipsoidItem)
16251635 {
16261636 makeSomething(new Sphere());
16271637 } else
1628
- if (event.getSource() == coneItem)
1638
+ if (source == coneItem)
16291639 {
16301640 makeSomething(new Cone());
16311641 } else
1632
- if (event.getSource() == torusItem)
1642
+ if (source == torusItem)
16331643 {
16341644 makeSomething(new Torus());
16351645 } else
1636
- if (event.getSource() == superItem)
1646
+ if (source == superItem)
16371647 {
16381648 makeSomething(new Superellipsoid());
16391649 } else
1640
- if (event.getSource() == kleinItem)
1650
+ if (source == kleinItem)
16411651 {
16421652 makeSomething(new Klein());
16431653 } else
1644
- if (event.getSource() == blobItem)
1654
+ if (source == blobItem)
16451655 {
16461656 Blob blob = new Blob();
16471657 BlobComponent comp = new BlobComponent();
....@@ -1649,15 +1659,15 @@
16491659 //blob.retile();
16501660 makeSomething(blob);
16511661 } else
1652
- if (event.getSource() == latheItem)
1662
+ if (source == latheItem)
16531663 {
16541664 makeSomething(new Lathe());
16551665 } else
1656
- if (event.getSource() == bezierItem)
1666
+ if (source == bezierItem)
16571667 {
16581668 makeSomething(new BezierSurface());
16591669 } else
1660
- if (event.getSource() == checkerItem)
1670
+ if (source == checkerItem)
16611671 {
16621672 /*
16631673 Object3D obj = new BezierSurface(5,8);
....@@ -1672,7 +1682,7 @@
16721682 */
16731683 makeSomething(new Checker());
16741684 } else
1675
- if (event.getSource() == meshItem)
1685
+ if (source == meshItem)
16761686 {
16771687 Object3D itemtomake = new Object3D();
16781688 Object3D child;
....@@ -1693,35 +1703,35 @@
16931703 makeSomething(child);
16941704 }
16951705 } else
1696
- if (event.getSource() == springItem)
1706
+ if (source == springItem)
16971707 {
16981708 cSpring s = new cSpring();
16991709 s.setup();
17001710 makeSomething(s);
17011711 } else
1702
- if (event.getSource() == flagItem)
1712
+ if (source == flagItem)
17031713 {
17041714 cSpring s = new cFlag();
17051715 s.setup();
17061716 makeSomething(s);
17071717 } else
1708
- if (event.getSource() == lightItem)
1718
+ if (source == lightItem)
17091719 {
17101720 makeSomething(new Light());
17111721 } else
1712
- if (event.getSource() == csgItem)
1722
+ if (source == csgItem)
17131723 {
17141724 group(new CSG());
17151725 } else
1716
- if (event.getSource() == templateItem)
1726
+ if (source == templateItem)
17171727 {
17181728 group(new cTemplate());
17191729 } else
1720
- if (event.getSource() == attributeItem)
1730
+ if (source == attributeItem)
17211731 {
17221732 makeSomething(new Attribute());
17231733 } else
1724
- if (event.getSource() == pointflowItem)
1734
+ if (source == pointflowItem)
17251735 {
17261736 makeSomething(new PointFlow());
17271737 } else
....@@ -1733,7 +1743,7 @@
17331743 } else
17341744 */
17351745
1736
- if (event.getSource() == superLoopItem)
1746
+ if (source == superLoopItem)
17371747 {
17381748 Composite g = new cGroup();
17391749 for (int i=0; i<15; i++)
....@@ -1755,7 +1765,7 @@
17551765
17561766 group(g);
17571767 } else
1758
- if (event.getSource() == loopItem)
1768
+ if (source == loopItem)
17591769 {
17601770 Composite csg = new GroupLeaf();
17611771 csg.count = 5;
....@@ -1764,7 +1774,7 @@
17641774 csg.addChild(child);
17651775 child.addChild(csg);
17661776 } else
1767
- if (event.getSource() == doubleItem)
1777
+ if (source == doubleItem)
17681778 {
17691779 Composite csg = new GroupLeaf();
17701780 csg.count = 5;
....@@ -1776,7 +1786,7 @@
17761786 csg.addChild(child);
17771787 child.addChild(csg);
17781788 } else
1779
- if (event.getSource() == tripleItem)
1789
+ if (source == tripleItem)
17801790 {
17811791 Composite csg = new GroupLeaf();
17821792 csg.count = 4;
....@@ -1792,70 +1802,70 @@
17921802 child.addChild(csg);
17931803 } else
17941804
1795
- if (event.getSource() == importGFDItem)
1805
+ if (source == importGFDItem)
17961806 {
17971807 ImportGFD();
17981808 } else
1799
- if (event.getSource() == importVRMLX3DItem)
1809
+ if (source == importVRMLX3DItem)
18001810 {
18011811 ImportVRMLX3D();
18021812 } else
1803
- if (event.getSource() == import3DSItem)
1813
+ if (source == import3DSItem)
18041814 {
18051815 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
18061816 } else
1807
- if (event.getSource() == importOBJItem)
1817
+ if (source == importOBJItem)
18081818 {
18091819 objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
18101820 } else
1811
- if (event.getSource() == computeAOItem)
1821
+ if (source == computeAOItem)
18121822 {
18131823 Globals.drawMode = CameraPane.OCCLUSION;
18141824 Globals.theRenderer.repaint();
18151825 } else
1816
- if (event.getSource() == recompileItem)
1826
+ if (source == recompileItem)
18171827 {
18181828 Recompile();
18191829 refreshContents();
18201830 } else
1821
- if (event.getSource() == editScriptItem)
1831
+ if (source == editScriptItem)
18221832 {
18231833 OpenDialog();
18241834 refreshContents();
18251835 } else
1826
- if (event.getSource() == invariantsItem)
1836
+ if (source == invariantsItem)
18271837 {
18281838 System.out.println("Invariants:");
18291839 GrafreeD.grafreeD.universe.invariants();
18301840 } else
1831
- if (event.getSource() == memoryItem)
1841
+ if (source == memoryItem)
18321842 {
18331843 //System.out.println("Invariants:");
18341844 PrintMemory();
18351845 } else
1836
- if (event.getSource() == pathItem)
1846
+ if (source == pathItem)
18371847 {
18381848 PrintPath();
18391849 } else
1840
- if (event.getSource() == analyzeItem)
1850
+ if (source == analyzeItem)
18411851 {
18421852 AnalyzeObject();
18431853 } else
1844
- if (event.getSource() == dumpItem)
1854
+ if (source == dumpItem)
18451855 {
18461856 DumpObject();
18471857 } else
1848
- if (event.getSource() == screenfitButton)
1858
+ if (source == screenfitButton)
18491859 {
18501860 //Reload(lastConverter, lastFilename, true);
18511861 ScreenFit();
18521862 } else
1853
- if (event.getSource() == screenfitpointButton)
1863
+ if (source == screenfitpointButton)
18541864 {
18551865 //Reload(lastConverter, lastFilename, true);
18561866 ScreenFitPoint();
18571867 } else
1858
- if (event.getSource() == snapobjectButton)
1868
+ if (source == snapobjectButton)
18591869 {
18601870 //Reload(lastConverter, lastFilename, true);
18611871 SnapObject();
....@@ -1866,13 +1876,13 @@
18661876 // Recompile();
18671877 // refreshContents();
18681878 // } else
1869
- if (event.getSource() == gcButton)
1879
+ if (source == gcButton)
18701880 {
18711881 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18721882 System.gc();
18731883 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18741884 } else
1875
- if (event.getSource() == editLeafItem)
1885
+ if (source == editLeafItem)
18761886 {
18771887 Object3D obj;
18781888 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1886,62 +1896,62 @@
18861896 }
18871897 refreshContents(true);
18881898 } else
1889
- if (event.getSource() == openWindowItem)
1899
+ if (source == openWindowItem)
18901900 {
18911901 EditSelection(true);
18921902 } else
1893
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1903
+ if (source == cutItem || source == clearButton)
18941904 {
18951905 loadClipboard(true);
18961906 } else
1897
- if (event.getSource() == duplicateItem)
1907
+ if (source == duplicateItem)
18981908 {
18991909 Object3D keep = GrafreeD.clipboard;
19001910 loadClipboard(false);
19011911 paste(false);
19021912 GrafreeD.clipboard = keep;
19031913 } else
1904
- if (event.getSource() == cloneItem)
1914
+ if (source == cloneItem)
19051915 {
19061916 CloneSelection(false);
19071917 } else
1908
- if (event.getSource() == cloneSupportItem)
1918
+ if (source == cloneSupportItem)
19091919 {
19101920 CloneSelection(true);
19111921 } else
1912
- if (event.getSource() == copyItem)
1922
+ if (source == copyItem)
19131923 {
19141924 loadClipboard(false);
19151925 } else
1916
- if (event.getSource() == pasteItem)
1926
+ if (source == pasteItem)
19171927 {
19181928 paste(false);
19191929 } else
1920
- if (event.getSource() == pasteLinkItem)
1930
+ if (source == pasteLinkItem)
19211931 {
19221932 pasteInto(false);
19231933 } else
1924
- if (event.getSource() == pasteCloneItem)
1934
+ if (source == pasteCloneItem)
19251935 {
19261936 pasteInto(true);
19271937 } else
1928
- if (event.getSource() == pasteExpandItem)
1938
+ if (source == pasteExpandItem)
19291939 {
19301940 paste(true);
19311941 } else
1932
- if (event.getSource() == synchronizeItem)
1942
+ if (source == synchronizeItem)
19331943 {
19341944 Overwrite(Object3D.TRANSFORM);
19351945 } else
1936
- if (event.getSource() == overwriteNameItem)
1946
+ if (source == overwriteNameItem)
19371947 {
19381948 Overwrite(Object3D.NAME);
19391949 } else
1940
- if (event.getSource() == overwriteUVItem)
1950
+ if (source == overwriteUVItem)
19411951 {
19421952 Overwrite(Object3D.UV);
19431953 } else
1944
- if (event.getSource() == overwriteMatItem)
1954
+ if (source == overwriteMatItem)
19451955 {
19461956 /* july 2015
19471957 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1961,7 +1971,7 @@
19611971
19621972 Overwrite(dropAttributes);
19631973 }
1964
- if (event.getSource() == overwriteGeoItem)
1974
+ if (source == overwriteGeoItem)
19651975 {
19661976 Overwrite(Object3D.GEOMETRY);
19671977 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1978,7 +1988,7 @@
19781988 // refreshContents();
19791989 // }
19801990 } else
1981
- if (event.getSource() == generateMeshItem)
1991
+ if (source == generateMeshItem)
19821992 {
19831993 //if (group.selection.size() == 1)
19841994 // for (int i=0; i<group.selection.size(); i++)
....@@ -1989,7 +1999,7 @@
19891999 ResetModel();
19902000 refreshContents();
19912001 } else
1992
- if (event.getSource() == extractGeometriesItem)
2002
+ if (source == extractGeometriesItem)
19932003 {
19942004 boolean one = false;
19952005
....@@ -2016,7 +2026,7 @@
20162026 ResetModel();
20172027 refreshContents();
20182028 } else
2019
- if (event.getSource() == cloneGeometriesItem)
2029
+ if (source == cloneGeometriesItem)
20202030 {
20212031 boolean one = false;
20222032
....@@ -2042,7 +2052,7 @@
20422052 ResetModel();
20432053 refreshContents();
20442054 } else
2045
- if (event.getSource() == shareGeometriesItem)
2055
+ if (source == shareGeometriesItem)
20462056 {
20472057 boolean one = false;
20482058
....@@ -2072,7 +2082,7 @@
20722082 refreshContents();
20732083 }
20742084 } else
2075
- if (event.getSource() == mergeGeometriesItem)
2085
+ if (source == mergeGeometriesItem)
20762086 {
20772087 boolean one = false;
20782088
....@@ -2102,7 +2112,7 @@
21022112 ResetModel();
21032113 refreshContents();
21042114 } else
2105
- if (event.getSource() == linkverticesItem)
2115
+ if (source == linkverticesItem)
21062116 {
21072117 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21082118 // {
....@@ -2135,7 +2145,7 @@
21352145 refreshContents();
21362146 }
21372147 } else
2138
- if (event.getSource() == resetsupportItem)
2148
+ if (source == resetsupportItem)
21392149 {
21402150 for (int i=0; i<group.selection.size(); i++)
21412151 {
....@@ -2147,7 +2157,7 @@
21472157
21482158 refreshContents();
21492159 } else
2150
- if (event.getSource() == relinkverticesItem)
2160
+ if (source == relinkverticesItem)
21512161 {
21522162 boolean random = CameraPane.RANDOM;
21532163 CameraPane.RANDOM = false; // parse all random nodes
....@@ -2156,7 +2166,7 @@
21562166
21572167 refreshContents();
21582168 } else
2159
- if (event.getSource() == resetreferencesItem)
2169
+ if (source == resetreferencesItem)
21602170 {
21612171 for (int i=0; i<group.selection.size(); i++)
21622172 {
....@@ -2165,7 +2175,7 @@
21652175
21662176 refreshContents();
21672177 } else
2168
- if (event.getSource() == setMasterItem)
2178
+ if (source == setMasterItem)
21692179 {
21702180 if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21712181 {
....@@ -2178,7 +2188,7 @@
21782188 refreshContents();
21792189 }
21802190 } else
2181
- if (event.getSource() == poseMeshItem)
2191
+ if (source == poseMeshItem)
21822192 {
21832193 if (group.selection.size() == 1)
21842194 {
....@@ -2197,19 +2207,19 @@
21972207 }
21982208
21992209 } else
2200
- if (event.getSource() == revertMeshItem)
2210
+ if (source == revertMeshItem)
22012211 {
22022212 RevertMeshes();
22032213 } else
2204
- if (event.getSource() == resetMeshItem)
2214
+ if (source == resetMeshItem)
22052215 {
22062216 ResetAll();
22072217 } else
2208
- if (event.getSource() == stepAllItem)
2218
+ if (source == stepAllItem)
22092219 {
22102220 StepAll();
22112221 } else
2212
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2222
+ if (source == clearItem) // || event.getSource() == clearButton)
22132223 {
22142224 //int indices[] = jList.getSelectedIndices();
22152225 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2217,46 +2227,46 @@
22172227
22182228 ClearSelection(false);
22192229 } else
2220
- if (event.getSource() == clearAllItem)
2230
+ if (source == clearAllItem)
22212231 {
22222232 ClearSelection(true);
22232233 } else
2224
- if (event.getSource() == grabItem)
2234
+ if (source == grabItem)
22252235 {
22262236 group(new cGroup(), true);
22272237 } else
2228
- if (event.getSource() == hideItem)
2238
+ if (source == hideItem)
22292239 {
22302240 group(new HiddenObject());
22312241 } else
2232
- if (event.getSource() == frontItem)
2242
+ if (source == frontItem)
22332243 {
22342244 front();
22352245 } else
2236
- if (event.getSource() == backItem)
2246
+ if (source == backItem)
22372247 {
22382248 back();
22392249 } else
2240
- if (event.getSource() == cameraItem)
2250
+ if (source == cameraItem)
22412251 {
22422252 makeSomething(new Camera());
22432253 } else
2244
- if (event.getSource() == compositeItem)
2254
+ if (source == compositeItem)
22452255 {
22462256 group(new Composite());
22472257 } else
2248
- if (event.getSource() == randomItem)
2258
+ if (source == randomItem)
22492259 {
22502260 RandomNode random = new RandomNode();
22512261 group(random);
22522262 if (random.size() > 0)
22532263 random.name = random.get(0).name + "Rnd";
22542264 } else
2255
- if (event.getSource() == physicsItem)
2265
+ if (source == physicsItem)
22562266 {
22572267 group(new PhysicsNode());
22582268 } else
2259
- if (event.getSource() == frameselectorItem)
2269
+ if (source == frameselectorItem)
22602270 {
22612271 for (int i=0; i<group.selection.size(); i++)
22622272 {
....@@ -2268,7 +2278,7 @@
22682278 ResetModel();
22692279 refreshContents();
22702280 } else
2271
- if (event.getSource() == switchGeoItem)
2281
+ if (source == switchGeoItem)
22722282 {
22732283 for (int i=0; i<group.selection.size(); i++)
22742284 {
....@@ -2280,7 +2290,7 @@
22802290 ResetModel();
22812291 refreshContents();
22822292 } else
2283
- if (event.getSource() == switchTransfoItem)
2293
+ if (source == switchTransfoItem)
22842294 {
22852295 for (int i=0; i<group.selection.size(); i++)
22862296 {
....@@ -2292,7 +2302,7 @@
22922302 ResetModel();
22932303 refreshContents();
22942304 } else
2295
- if (event.getSource() == morphItem)
2305
+ if (source == morphItem)
22962306 {
22972307 for (int i=0; i<group.selection.size(); i++)
22982308 {
....@@ -2304,7 +2314,7 @@
23042314 ResetModel();
23052315 refreshContents();
23062316 } else
2307
- if (event.getSource() == scriptNodeItem)
2317
+ if (source == scriptNodeItem)
23082318 {
23092319 boolean atleastone = false;
23102320
....@@ -2343,31 +2353,31 @@
23432353 }
23442354 }
23452355 } else
2346
- if (event.getSource() == linkerItem)
2356
+ if (source == linkerItem)
23472357 {
23482358 group(new cLinker());
23492359 } else
2350
- if (event.getSource() == textureItem)
2360
+ if (source == textureItem)
23512361 {
23522362 group(new TextureNode());
23532363 } else
2354
- if (event.getSource() == billboardItem)
2364
+ if (source == billboardItem)
23552365 {
23562366 group(new BillboardNode());
23572367 } else
2358
- if (event.getSource() == shadowXItem)
2368
+ if (source == shadowXItem)
23592369 {
23602370 CastShadow(0);
23612371 } else
2362
- if (event.getSource() == shadowYItem)
2372
+ if (source == shadowYItem)
23632373 {
23642374 CastShadow(1);
23652375 } else
2366
- if (event.getSource() == shadowZItem)
2376
+ if (source == shadowZItem)
23672377 {
23682378 CastShadow(2);
23692379 } else
2370
- if (event.getSource() == ungroupItem)
2380
+ if (source == ungroupItem)
23712381 {
23722382 //ungroup();
23732383 for (int i=0; i<group.selection.size(); i++)
....@@ -2379,179 +2389,179 @@
23792389
23802390 refreshContents();
23812391 } else
2382
- if (event.getSource() == genUVItem)
2392
+ if (source == genUVItem)
23832393 {
23842394 GenUV();
23852395 } else
2386
- if (event.getSource() == genNormalsCADItem)
2396
+ if (source == genNormalsCADItem)
23872397 {
23882398 GenNormals(true);
23892399 } else
2390
- if (event.getSource() == genNormalsMESHItem)
2400
+ if (source == genNormalsMESHItem)
23912401 {
23922402 GenNormals(true); // TODO
23932403 } else
2394
- if (event.getSource() == genNormalsORGANItem)
2404
+ if (source == genNormalsORGANItem)
23952405 {
23962406 GenNormals(false);
23972407 } else
2398
- if (event.getSource() == genNormalsMINEItem)
2408
+ if (source == genNormalsMINEItem)
23992409 {
24002410 GenNormalsMINE();
24012411 } else
2402
- if (event.getSource() == stripifyItem)
2412
+ if (source == stripifyItem)
24032413 {
24042414 Stripify();
24052415 } else
2406
- if (event.getSource() == unstripifyItem)
2416
+ if (source == unstripifyItem)
24072417 {
24082418 Unstripify();
24092419 } else
2410
- if (event.getSource() == trimItem)
2420
+ if (source == trimItem)
24112421 {
24122422 Trim();
24132423 } else
2414
- if (event.getSource() == untrimItem)
2424
+ if (source == untrimItem)
24152425 {
24162426 Untrim();
24172427 } else
2418
- if (event.getSource() == clearColorsItem)
2428
+ if (source == clearColorsItem)
24192429 {
24202430 ClearColors();
24212431 } else
2422
- if (event.getSource() == clearMaterialsItem)
2432
+ if (source == clearMaterialsItem)
24232433 {
24242434 ClearMaterials();
24252435 } else
2426
- if (event.getSource() == liveleavesItem)
2436
+ if (source == liveleavesItem)
24272437 {
24282438 LiveLeaves(true);
24292439 } else
2430
- if (event.getSource() == unliveleavesItem)
2440
+ if (source == unliveleavesItem)
24312441 {
24322442 LiveLeaves(false);
24332443 } else
2434
- if (event.getSource() == supportleavesItem)
2444
+ if (source == supportleavesItem)
24352445 {
24362446 SupportLeaves(true);
24372447 } else
2438
- if (event.getSource() == unsupportleavesItem)
2448
+ if (source == unsupportleavesItem)
24392449 {
24402450 SupportLeaves(false);
24412451 } else
2442
- if (event.getSource() == hideleavesItem)
2452
+ if (source == hideleavesItem)
24432453 {
24442454 HideLeaves(true);
24452455 } else
2446
- if (event.getSource() == showleavesItem)
2456
+ if (source == showleavesItem)
24472457 {
24482458 HideLeaves(false);
24492459 } else
2450
- if (event.getSource() == markleavesItem)
2460
+ if (source == markleavesItem)
24512461 {
24522462 MarkLeaves(true);
24532463 } else
2454
- if (event.getSource() == unmarkleavesItem)
2464
+ if (source == unmarkleavesItem)
24552465 {
24562466 MarkLeaves(false);
24572467 } else
2458
- if (event.getSource() == flipVItem)
2468
+ if (source == flipVItem)
24592469 {
24602470 FlipV(true);
24612471 } else
2462
- if (event.getSource() == unflipVItem)
2472
+ if (source == unflipVItem)
24632473 {
24642474 FlipV(false);
24652475 } else
2466
- if (event.getSource() == lowTexturesItem)
2476
+ if (source == lowTexturesItem)
24672477 {
24682478 SetTexRes(0);
24692479 } else
2470
- if (event.getSource() == normalTexturesItem)
2480
+ if (source == normalTexturesItem)
24712481 {
24722482 SetTexRes(1);
24732483 } else
2474
- if (event.getSource() == highTexturesItem)
2484
+ if (source == highTexturesItem)
24752485 {
24762486 SetTexRes(2);
24772487 } else
2478
- if (event.getSource() == veryhighTexturesItem)
2488
+ if (source == veryhighTexturesItem)
24792489 {
24802490 SetTexRes(3);
24812491 } else
2482
- if (event.getSource() == maxTexturesItem)
2492
+ if (source == maxTexturesItem)
24832493 {
24842494 SetTexRes(4);
24852495 } else
2486
- if (event.getSource() == panoTexturesItem)
2496
+ if (source == panoTexturesItem)
24872497 {
24882498 SetTexRes(5);
24892499 } else
2490
- if (event.getSource() == reverseNormalsItem)
2500
+ if (source == reverseNormalsItem)
24912501 {
24922502 ReverseNormals();
24932503 } else
2494
- if (event.getSource() == parseverticesItem)
2504
+ if (source == parseverticesItem)
24952505 {
24962506 ParseVertices();
24972507 } else
2498
- if (event.getSource() == textureFieldItem)
2508
+ if (source == textureFieldItem)
24992509 {
25002510 TextureVertices();
25012511 } else
2502
- if (event.getSource() == alignItem)
2512
+ if (source == alignItem)
25032513 {
25042514 Align();
25052515 } else
2506
- if (event.getSource() == mirrorItem)
2516
+ if (source == mirrorItem)
25072517 {
25082518 MirrorPoses();
25092519 } else
2510
- if (event.getSource() == reduceMorphItem)
2520
+ if (source == reduceMorphItem)
25112521 {
25122522 MeshReduction(false);
25132523 } else
2514
- if (event.getSource() == reduce34MorphItem)
2524
+ if (source == reduce34MorphItem)
25152525 {
25162526 MeshReduction(true);
25172527 } else
2518
- if (event.getSource() == reverseTrianglesItem)
2528
+ if (source == reverseTrianglesItem)
25192529 {
25202530 ReverseTriangles();
25212531 } else
2522
- if (event.getSource() == reduceMeshItem)
2532
+ if (source == reduceMeshItem)
25232533 {
25242534 ReduceMesh(false);
25252535 } else
2526
- if (event.getSource() == reduce34MeshItem)
2536
+ if (source == reduce34MeshItem)
25272537 {
25282538 ReduceMesh(true);
25292539 } else
2530
- if (event.getSource() == increaseMeshItem)
2540
+ if (source == increaseMeshItem)
25312541 {
25322542 IncreaseMesh();
25332543 } else
2534
- if (event.getSource() == clipMeshItem)
2544
+ if (source == clipMeshItem)
25352545 {
25362546 ClipMesh();
25372547 } else
2538
- if (event.getSource() == smoothMeshItem)
2548
+ if (source == smoothMeshItem)
25392549 {
25402550 SmoothMesh();
25412551 } else
2542
- if (event.getSource() == transformgeometryItem)
2552
+ if (source == transformgeometryItem)
25432553 {
25442554 TransformGeometry();
25452555 } else
2546
- if (event.getSource() == resetTransformItem)
2556
+ if (source == resetTransformItem)
25472557 {
25482558 ResetTransform();
25492559 } else
2550
- if (event.getSource() == resetCentroidItem)
2560
+ if (source == resetCentroidItem)
25512561 {
25522562 ResetCentroid();
25532563 } else
2554
- if (event.getSource() == resetParentItem)
2564
+ if (source == resetParentItem)
25552565 {
25562566 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25572567 {
....@@ -2561,7 +2571,7 @@
25612571
25622572 refreshContents();
25632573 } else
2564
- if (event.getSource() == repairParentItem)
2574
+ if (source == repairParentItem)
25652575 {
25662576 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25672577 {
....@@ -2575,7 +2585,7 @@
25752585
25762586 refreshContents();
25772587 } else
2578
- if (event.getSource() == repairShadowItem)
2588
+ if (source == repairShadowItem)
25792589 {
25802590 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25812591 {
....@@ -2589,7 +2599,7 @@
25892599
25902600 refreshContents();
25912601 } else
2592
- if (event.getSource() == sortbysizeItem)
2602
+ if (source == sortbysizeItem)
25932603 {
25942604 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25952605 {
....@@ -2601,7 +2611,7 @@
26012611 ResetModel();
26022612 refreshContents();
26032613 } else
2604
- if (event.getSource() == sortbynameItem)
2614
+ if (source == sortbynameItem)
26052615 {
26062616 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
26072617 {
....@@ -2613,7 +2623,7 @@
26132623 ResetModel();
26142624 refreshContents();
26152625 } else
2616
- if (event.getSource() == attachPigmentItem)
2626
+ if (source == attachPigmentItem)
26172627 {
26182628 String texture = GetFile("Attach pigment");
26192629 Object3D obj;
....@@ -2625,7 +2635,7 @@
26252635
26262636 refreshContents();
26272637 } else
2628
- if (event.getSource() == detachPigmentItem)
2638
+ if (source == detachPigmentItem)
26292639 {
26302640 Object3D obj;
26312641 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2636,7 +2646,7 @@
26362646
26372647 refreshContents();
26382648 } else
2639
- if (event.getSource() == attachBumpItem)
2649
+ if (source == attachBumpItem)
26402650 {
26412651 String texture = GetFile("Attach bump");
26422652 Object3D obj;
....@@ -2648,7 +2658,7 @@
26482658
26492659 refreshContents();
26502660 } else
2651
- if (event.getSource() == detachBumpItem)
2661
+ if (source == detachBumpItem)
26522662 {
26532663 Object3D obj;
26542664 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2659,7 +2669,7 @@
26592669
26602670 refreshContents();
26612671 } else
2662
- if (event.getSource() == pigmentBumpItem)
2672
+ if (source == pigmentBumpItem)
26632673 {
26642674 Object3D obj;
26652675 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2670,158 +2680,195 @@
26702680
26712681 refreshContents();
26722682 } else
2673
- if (event.getSource() == flashSelectionButton)
2683
+ if (source == flashSelectionButton)
26742684 {
26752685 CameraPane.flash = true;
26762686 refreshContents();
26772687 } else
2678
- if (event.getSource() == oneButton)
2688
+ if (source == oneButton)
26792689 {
26802690 } else
2681
- if (event.getSource() == twoButton)
2691
+ if (source == twoButton)
26822692 {
26832693 radio.layout = twoButton;
26842694 // bug
26852695 //gridPanel.setDividerLocation(1.0);
26862696 //bigPanel.setDividerLocation(0.0);
2687
- bigThree.remove(scenePanel);
2688
- bigThree.remove(centralPanel);
2689
- bigThree.remove(XYZPanel);
2690
- aWindowConstraints.gridx = 0;
2691
- aWindowConstraints.gridy = 0;
2692
- aWindowConstraints.gridwidth = 1;
2693
- // aConstraints.gridheight = 3;
2694
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2695
- aWindowConstraints.weightx = 0;
2696
- aWindowConstraints.weighty = 1;
2697
- //bigThree.add(jtp, aWindowConstraints);
2698
- aWindowConstraints.weightx = 1;
2699
- aWindowConstraints.gridwidth = 3;
2700
- // aConstraints.gridheight = 3;
2701
- aWindowConstraints.gridx = 1;
2702
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2703
- bigThree.add(centralPanel, aWindowConstraints);
2704
- aWindowConstraints.weightx = 0;
2705
- aWindowConstraints.gridx = 4;
2706
- aWindowConstraints.gridwidth = 1;
2707
- // aConstraints.gridheight = 3;
2708
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2709
- //bigThree.add(XYZPanel, aWindowConstraints);
2710
- bigThree.revalidate();
2697
+// bigThree.remove(scenePanel);
2698
+// bigThree.remove(centralPanel);
2699
+// bigThree.remove(XYZPanel);
2700
+// aWindowConstraints.gridx = 0;
2701
+// aWindowConstraints.gridy = 0;
2702
+// aWindowConstraints.gridwidth = 1;
2703
+// // aConstraints.gridheight = 3;
2704
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2705
+// aWindowConstraints.weightx = 0;
2706
+// aWindowConstraints.weighty = 1;
2707
+// //bigThree.add(jtp, aWindowConstraints);
2708
+// aWindowConstraints.weightx = 1;
2709
+// aWindowConstraints.gridwidth = 3;
2710
+// // aConstraints.gridheight = 3;
2711
+// aWindowConstraints.gridx = 1;
2712
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2713
+// bigThree.add(centralPanel, aWindowConstraints);
2714
+// aWindowConstraints.weightx = 0;
2715
+// aWindowConstraints.gridx = 4;
2716
+// aWindowConstraints.gridwidth = 1;
2717
+// // aConstraints.gridheight = 3;
2718
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2719
+// //bigThree.add(XYZPanel, aWindowConstraints);
2720
+// scenePanel.setVisible(false);
2721
+// centralPanel.setVisible(true);
2722
+// XYZPanel.setVisible(false);
2723
+ bigThree.ClearUI();
2724
+ bigThree.add(centralPanel);
2725
+ bigThree.FlushUI();
27112726 } else
2712
- if (event.getSource() == threeButton)
2727
+ if (source == threeButton)
27132728 {
27142729 radio.layout = threeButton;
2715
- bigThree.remove(scenePanel);
2716
- bigThree.remove(centralPanel);
2717
- bigThree.remove(XYZPanel);
2718
- aWindowConstraints.gridx = 0;
2719
- aWindowConstraints.gridy = 0;
2720
- aWindowConstraints.gridwidth = 1;
2721
- // aConstraints.gridheight = 3;
2722
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2723
- aWindowConstraints.weightx = 0;
2724
- aWindowConstraints.weighty = 1;
2725
- //bigThree.add(jtp, aWindowConstraints);
2726
- aWindowConstraints.weightx = 1;
2727
- aWindowConstraints.gridwidth = 3;
2728
- // aConstraints.gridheight = 3;
2729
- aWindowConstraints.gridx = 1;
2730
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2731
- bigThree.add(centralPanel, aWindowConstraints);
2732
- aWindowConstraints.weightx = 0;
2733
- aWindowConstraints.gridx = 4;
2734
- aWindowConstraints.gridwidth = 1;
2735
- // aConstraints.gridheight = 3;
2736
- aConstraints.fill = GridBagConstraints.VERTICAL;
2737
- bigThree.add(XYZPanel, aWindowConstraints);
2738
- bigThree.revalidate();
2730
+
2731
+// bigThree.remove(scenePanel);
2732
+// bigThree.remove(centralPanel);
2733
+// bigThree.remove(XYZPanel);
2734
+// aWindowConstraints.gridx = 0;
2735
+// aWindowConstraints.gridy = 0;
2736
+// aWindowConstraints.gridwidth = 1;
2737
+// // aConstraints.gridheight = 3;
2738
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2739
+// aWindowConstraints.weightx = 0;
2740
+// aWindowConstraints.weighty = 1;
2741
+// //bigThree.add(jtp, aWindowConstraints);
2742
+// aWindowConstraints.weightx = 1;
2743
+// aWindowConstraints.gridwidth = 3;
2744
+// // aConstraints.gridheight = 3;
2745
+// aWindowConstraints.gridx = 1;
2746
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2747
+// bigThree.add(centralPanel, aWindowConstraints);
2748
+// aWindowConstraints.weightx = 0;
2749
+// aWindowConstraints.gridx = 4;
2750
+// aWindowConstraints.gridwidth = 1;
2751
+// // aConstraints.gridheight = 3;
2752
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2753
+// bigThree.add(XYZPanel, aWindowConstraints);
2754
+// bigThree.validate();
2755
+// scenePanel.setVisible(false);
2756
+// centralPanel.setVisible(true);
2757
+// XYZPanel.setVisible(true);
2758
+ bigThree.ClearUI();
2759
+ bigThree.add(centralPanel);
2760
+ bigThree.add(XYZPanel);
2761
+ bigThree.FlushUI();
27392762 } else
2740
- if (event.getSource() == fourButton)
2763
+ if (source == fourButton)
27412764 {
27422765 radio.layout = fourButton;
2743
- bigThree.remove(scenePanel);
2744
- bigThree.remove(centralPanel);
2745
- bigThree.remove(XYZPanel);
2746
- aWindowConstraints.gridx = 0;
2747
- aWindowConstraints.gridy = 0;
2748
- aWindowConstraints.gridwidth = 1;
2749
- // aWindowConstraints.gridheight = 3;
2750
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2751
- aWindowConstraints.weightx = 1;
2752
- aWindowConstraints.weighty = 1;
2753
- bigThree.add(scenePanel, aWindowConstraints);
2754
- aWindowConstraints.weightx = 1;
2755
- aWindowConstraints.gridwidth = 3;
2756
- // aConstraints.gridheight = 3;
2757
- aWindowConstraints.gridx = 1;
2758
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2759
- //bigThree.add(cameraPanel, aWindowConstraints);
2760
- aWindowConstraints.weightx = 0;
2761
- aWindowConstraints.gridx = 4;
2762
- aWindowConstraints.gridwidth = 1;
2763
- // aWindowConstraints.gridheight = 3;
2764
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2765
- //bigThree.add(XYZPanel, aWindowConstraints);
2766
- bigThree.revalidate();
2766
+
2767
+// bigThree.remove(scenePanel);
2768
+// bigThree.remove(centralPanel);
2769
+// bigThree.remove(XYZPanel);
2770
+// aWindowConstraints.gridx = 0;
2771
+// aWindowConstraints.gridy = 0;
2772
+// aWindowConstraints.gridwidth = 1;
2773
+// // aWindowConstraints.gridheight = 3;
2774
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2775
+// aWindowConstraints.weightx = 1;
2776
+// aWindowConstraints.weighty = 1;
2777
+// bigThree.add(scenePanel, aWindowConstraints);
2778
+// aWindowConstraints.weightx = 1;
2779
+// aWindowConstraints.gridwidth = 3;
2780
+// // aConstraints.gridheight = 3;
2781
+// aWindowConstraints.gridx = 1;
2782
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2783
+// //bigThree.add(cameraPanel, aWindowConstraints);
2784
+// aWindowConstraints.weightx = 0;
2785
+// aWindowConstraints.gridx = 4;
2786
+// aWindowConstraints.gridwidth = 1;
2787
+// // aWindowConstraints.gridheight = 3;
2788
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2789
+// //bigThree.add(XYZPanel, aWindowConstraints);
2790
+// bigThree.validate();
2791
+// scenePanel.setVisible(true);
2792
+// centralPanel.setVisible(false);
2793
+// XYZPanel.setVisible(false);
2794
+ bigThree.ClearUI();
2795
+ bigThree.add(scenePanel);
2796
+ bigThree.FlushUI();
27672797 } else
2768
- if (event.getSource() == sixButton)
2798
+ if (source == sixButton)
27692799 {
27702800 radio.layout = sixButton;
2771
- bigThree.remove(scenePanel);
2772
- bigThree.remove(centralPanel);
2773
- bigThree.remove(XYZPanel);
2774
- aWindowConstraints.gridx = 0;
2775
- aWindowConstraints.gridy = 0;
2776
- aWindowConstraints.gridwidth = 1;
2777
- // aConstraints.gridheight = 3;
2778
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2779
- aWindowConstraints.weightx = 0;
2780
- aWindowConstraints.weighty = 1;
2781
- bigThree.add(scenePanel, aWindowConstraints);
2782
- aWindowConstraints.weightx = 1;
2783
- aWindowConstraints.gridwidth = 3;
2784
- // aWindowConstraints.gridheight = 3;
2785
- aWindowConstraints.gridx = 1;
2786
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2787
- bigThree.add(centralPanel, aWindowConstraints);
2788
- aWindowConstraints.weightx = 0;
2789
- aWindowConstraints.gridx = 4;
2790
- aWindowConstraints.gridwidth = 1;
2791
- // aWindowConstraints.gridheight = 3;
2792
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2793
- //bigThree.add(XYZPanel, aConstraints);
2794
- bigThree.revalidate();
2801
+
2802
+// bigThree.remove(scenePanel);
2803
+// bigThree.remove(centralPanel);
2804
+// bigThree.remove(XYZPanel);
2805
+// aWindowConstraints.gridx = 0;
2806
+// aWindowConstraints.gridy = 0;
2807
+// aWindowConstraints.gridwidth = 1;
2808
+// // aConstraints.gridheight = 3;
2809
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2810
+// aWindowConstraints.weightx = 0;
2811
+// aWindowConstraints.weighty = 1;
2812
+// bigThree.add(scenePanel, aWindowConstraints);
2813
+// aWindowConstraints.weightx = 1;
2814
+// aWindowConstraints.gridwidth = 3;
2815
+// // aWindowConstraints.gridheight = 3;
2816
+// aWindowConstraints.gridx = 1;
2817
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2818
+// bigThree.add(centralPanel, aWindowConstraints);
2819
+// aWindowConstraints.weightx = 0;
2820
+// aWindowConstraints.gridx = 4;
2821
+// aWindowConstraints.gridwidth = 1;
2822
+// // aWindowConstraints.gridheight = 3;
2823
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2824
+// //bigThree.add(XYZPanel, aConstraints);
2825
+// bigThree.validate();
2826
+// scenePanel.setVisible(true);
2827
+// centralPanel.setVisible(true);
2828
+// XYZPanel.setVisible(false);
2829
+ bigThree.ClearUI();
2830
+ bigThree.add(scenePanel);
2831
+ bigThree.add(centralPanel);
2832
+ bigThree.FlushUI();
27952833 } else
2796
- if (event.getSource() == sevenButton)
2834
+ if (source == sevenButton)
27972835 {
27982836 radio.layout = sevenButton;
2799
- bigThree.remove(scenePanel);
2800
- bigThree.remove(centralPanel);
2801
- bigThree.remove(XYZPanel);
2802
- aWindowConstraints.gridx = 0;
2803
- aWindowConstraints.gridy = 0;
2804
- aWindowConstraints.gridwidth = 1;
2805
- // aWindowConstraints.gridheight = 3;
2806
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2807
- aWindowConstraints.weightx = 0;
2808
- aWindowConstraints.weighty = 1;
2809
- bigThree.add(scenePanel, aWindowConstraints);
2810
- aWindowConstraints.weightx = 1;
2811
- aWindowConstraints.gridwidth = 3;
2812
- // aWindowConstraints.gridheight = 3;
2813
- aWindowConstraints.gridx = 1;
2814
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2815
- bigThree.add(centralPanel, aWindowConstraints);
2816
- aWindowConstraints.weightx = 0;
2817
- aWindowConstraints.gridx = 4;
2818
- aWindowConstraints.gridwidth = 1;
2819
- // aConstraints.gridheight = 3;
2820
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2821
- bigThree.add(XYZPanel, aWindowConstraints);
2822
- bigThree.revalidate();
2837
+
2838
+// bigThree.remove(scenePanel);
2839
+// bigThree.remove(centralPanel);
2840
+// bigThree.remove(XYZPanel);
2841
+// aWindowConstraints.gridx = 0;
2842
+// aWindowConstraints.gridy = 0;
2843
+// aWindowConstraints.gridwidth = 1;
2844
+// // aWindowConstraints.gridheight = 3;
2845
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2846
+// aWindowConstraints.weightx = 0;
2847
+// aWindowConstraints.weighty = 1;
2848
+// bigThree.add(scenePanel, aWindowConstraints);
2849
+// aWindowConstraints.weightx = 1;
2850
+// aWindowConstraints.gridwidth = 3;
2851
+// // aWindowConstraints.gridheight = 3;
2852
+// aWindowConstraints.gridx = 1;
2853
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2854
+// bigThree.add(centralPanel, aWindowConstraints);
2855
+// aWindowConstraints.weightx = 0;
2856
+// aWindowConstraints.gridx = 4;
2857
+// aWindowConstraints.gridwidth = 1;
2858
+// // aConstraints.gridheight = 3;
2859
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2860
+// bigThree.add(XYZPanel, aWindowConstraints);
2861
+// bigThree.validate();
2862
+// scenePanel.setVisible(true);
2863
+// centralPanel.setVisible(true);
2864
+// XYZPanel.setVisible(true);
2865
+ bigThree.ClearUI();
2866
+ bigThree.add(scenePanel);
2867
+ bigThree.add(centralPanel);
2868
+ bigThree.add(XYZPanel);
2869
+ bigThree.FlushUI();
28232870 } else
2824
- if (event.getSource() == rootButton)
2871
+ if (source == rootButton)
28252872 {
28262873 Object3D obj;
28272874 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2833,7 +2880,7 @@
28332880
28342881 refreshContents(true);
28352882 } else
2836
- if (event.getSource() == closeButton)
2883
+ if (source == closeButton)
28372884 {
28382885 //System.out.println("CLOSE: " + buttonGroup.getSelection());
28392886 cRadio ab;
....@@ -2854,11 +2901,11 @@
28542901 }
28552902 refreshContents(true);
28562903 } else
2857
- if (event.getSource() == editItem || event.getSource() == editButton)
2904
+ if (source == editItem || source == editButton)
28582905 {
28592906 EditSelection(false);
28602907 } else
2861
- if (event.getSource() == uneditButton)
2908
+ if (source == uneditButton)
28622909 {
28632910 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28642911 {
....@@ -2870,12 +2917,12 @@
28702917
28712918 child.editWindow = null; // ???????????
28722919 }
2873
- objEditor.ctrlPanel.revalidate();
2920
+ objEditor.ctrlPanel.validate();
28742921 //objEditor.jTree.clearSelection();
28752922 //objEditor.ResetSliders();
28762923 refreshContents(true);
28772924 } else
2878
- if (event.getSource() == clearPanelButton)
2925
+ if (source == clearPanelButton)
28792926 {
28802927 assert(copy == group);
28812928 //copy.ClearUI();
....@@ -2886,7 +2933,7 @@
28862933 listUI.clear();
28872934 refreshContents(true);
28882935 } else
2889
- if (event.getSource() == allParamsButton)
2936
+ if (source == allParamsButton)
28902937 {
28912938 assert(copy == group);
28922939
....@@ -2907,19 +2954,19 @@
29072954
29082955 refreshContents(true);
29092956 } else
2910
- if (event.getSource() == unselectButton)
2957
+ if (source == unselectButton)
29112958 {
29122959 objEditor.jTree.clearSelection();
29132960 // ?? oct 2012 GrafreeD.clipboard.clear();
29142961 objEditor.ResetSliders();
29152962 refreshContents(true);
29162963 } else
2917
- if(event.getSource() instanceof cRadio)
2964
+ if(source instanceof cRadio)
29182965 {
29192966 group.parent = keepparent;
29202967 group.attributes = 0;
29212968 //group.editWindow = null;
2922
- /*cRadio*/ radio = (cRadio)event.getSource();
2969
+ /*cRadio*/ radio = (cRadio)source;
29232970 Object3D obj = radio.GetObject();
29242971 System.out.println("Edit " + obj);
29252972 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)