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,
....@@ -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
....@@ -1518,6 +1519,7 @@
15181519 //
15191520 public void actionPerformed(ActionEvent event) // , Object arg)
15201521 {
1522
+ Object source = event.getSource();
15211523 /*
15221524 if (event.getSource() == nameField)
15231525 {
....@@ -1529,11 +1531,11 @@
15291531 }
15301532 else
15311533 */
1532
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1534
+ if (source == lookAtItem || source == lookFromItem)
15331535 {
15341536 ScreenFit();
15351537 } else
1536
- if (event.getSource() == switchItem)
1538
+ if (source == switchItem)
15371539 {
15381540 cVector v1 = new cVector();
15391541 cVector v2 = new cVector();
....@@ -1542,11 +1544,11 @@
15421544 objEditor.cameraView.renderCamera.setAim(v2, v1);
15431545 objEditor.cameraView.repaint();
15441546 } else
1545
- if (event.getSource() == rectoidItem)
1547
+ if (source == rectoidItem)
15461548 {
15471549 makeSomething(new Box());
15481550 } else
1549
- if (event.getSource() == particleItem)
1551
+ if (source == particleItem)
15501552 {
15511553 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15521554 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1567,9 +1569,9 @@
15671569 applyExample(particleGeom, "SMOKE");
15681570 makeSomething(particleGeom);
15691571 } else
1570
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1572
+ if (source == ragdollItem || source == ragdoll2Item)
15711573 {
1572
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1574
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15731575
15741576 ragdoll.toParent = LA.newMatrix();
15751577 ragdoll.fromParent = LA.newMatrix();
....@@ -1587,7 +1589,7 @@
15871589 } else
15881590 /*
15891591 */
1590
- if (event.getSource() == heightFieldItem)
1592
+ if (source == heightFieldItem)
15911593 {
15921594 Object3D obj = new Object3D();
15931595
....@@ -1625,31 +1627,31 @@
16251627
16261628 makeSomething(obj);
16271629 } else
1628
- if (event.getSource() == gridItem)
1630
+ if (source == gridItem)
16291631 {
16301632 makeSomething(new Grid());
16311633 } else
1632
- if (event.getSource() == ellipsoidItem)
1634
+ if (source == ellipsoidItem)
16331635 {
16341636 makeSomething(new Sphere());
16351637 } else
1636
- if (event.getSource() == coneItem)
1638
+ if (source == coneItem)
16371639 {
16381640 makeSomething(new Cone());
16391641 } else
1640
- if (event.getSource() == torusItem)
1642
+ if (source == torusItem)
16411643 {
16421644 makeSomething(new Torus());
16431645 } else
1644
- if (event.getSource() == superItem)
1646
+ if (source == superItem)
16451647 {
16461648 makeSomething(new Superellipsoid());
16471649 } else
1648
- if (event.getSource() == kleinItem)
1650
+ if (source == kleinItem)
16491651 {
16501652 makeSomething(new Klein());
16511653 } else
1652
- if (event.getSource() == blobItem)
1654
+ if (source == blobItem)
16531655 {
16541656 Blob blob = new Blob();
16551657 BlobComponent comp = new BlobComponent();
....@@ -1657,15 +1659,15 @@
16571659 //blob.retile();
16581660 makeSomething(blob);
16591661 } else
1660
- if (event.getSource() == latheItem)
1662
+ if (source == latheItem)
16611663 {
16621664 makeSomething(new Lathe());
16631665 } else
1664
- if (event.getSource() == bezierItem)
1666
+ if (source == bezierItem)
16651667 {
16661668 makeSomething(new BezierSurface());
16671669 } else
1668
- if (event.getSource() == checkerItem)
1670
+ if (source == checkerItem)
16691671 {
16701672 /*
16711673 Object3D obj = new BezierSurface(5,8);
....@@ -1680,7 +1682,7 @@
16801682 */
16811683 makeSomething(new Checker());
16821684 } else
1683
- if (event.getSource() == meshItem)
1685
+ if (source == meshItem)
16841686 {
16851687 Object3D itemtomake = new Object3D();
16861688 Object3D child;
....@@ -1701,35 +1703,35 @@
17011703 makeSomething(child);
17021704 }
17031705 } else
1704
- if (event.getSource() == springItem)
1706
+ if (source == springItem)
17051707 {
17061708 cSpring s = new cSpring();
17071709 s.setup();
17081710 makeSomething(s);
17091711 } else
1710
- if (event.getSource() == flagItem)
1712
+ if (source == flagItem)
17111713 {
17121714 cSpring s = new cFlag();
17131715 s.setup();
17141716 makeSomething(s);
17151717 } else
1716
- if (event.getSource() == lightItem)
1718
+ if (source == lightItem)
17171719 {
17181720 makeSomething(new Light());
17191721 } else
1720
- if (event.getSource() == csgItem)
1722
+ if (source == csgItem)
17211723 {
17221724 group(new CSG());
17231725 } else
1724
- if (event.getSource() == templateItem)
1726
+ if (source == templateItem)
17251727 {
17261728 group(new cTemplate());
17271729 } else
1728
- if (event.getSource() == attributeItem)
1730
+ if (source == attributeItem)
17291731 {
17301732 makeSomething(new Attribute());
17311733 } else
1732
- if (event.getSource() == pointflowItem)
1734
+ if (source == pointflowItem)
17331735 {
17341736 makeSomething(new PointFlow());
17351737 } else
....@@ -1741,7 +1743,7 @@
17411743 } else
17421744 */
17431745
1744
- if (event.getSource() == superLoopItem)
1746
+ if (source == superLoopItem)
17451747 {
17461748 Composite g = new cGroup();
17471749 for (int i=0; i<15; i++)
....@@ -1763,7 +1765,7 @@
17631765
17641766 group(g);
17651767 } else
1766
- if (event.getSource() == loopItem)
1768
+ if (source == loopItem)
17671769 {
17681770 Composite csg = new GroupLeaf();
17691771 csg.count = 5;
....@@ -1772,7 +1774,7 @@
17721774 csg.addChild(child);
17731775 child.addChild(csg);
17741776 } else
1775
- if (event.getSource() == doubleItem)
1777
+ if (source == doubleItem)
17761778 {
17771779 Composite csg = new GroupLeaf();
17781780 csg.count = 5;
....@@ -1784,7 +1786,7 @@
17841786 csg.addChild(child);
17851787 child.addChild(csg);
17861788 } else
1787
- if (event.getSource() == tripleItem)
1789
+ if (source == tripleItem)
17881790 {
17891791 Composite csg = new GroupLeaf();
17901792 csg.count = 4;
....@@ -1800,70 +1802,70 @@
18001802 child.addChild(csg);
18011803 } else
18021804
1803
- if (event.getSource() == importGFDItem)
1805
+ if (source == importGFDItem)
18041806 {
18051807 ImportGFD();
18061808 } else
1807
- if (event.getSource() == importVRMLX3DItem)
1809
+ if (source == importVRMLX3DItem)
18081810 {
18091811 ImportVRMLX3D();
18101812 } else
1811
- if (event.getSource() == import3DSItem)
1813
+ if (source == import3DSItem)
18121814 {
18131815 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
18141816 } else
1815
- if (event.getSource() == importOBJItem)
1817
+ if (source == importOBJItem)
18161818 {
18171819 objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
18181820 } else
1819
- if (event.getSource() == computeAOItem)
1821
+ if (source == computeAOItem)
18201822 {
18211823 Globals.drawMode = CameraPane.OCCLUSION;
18221824 Globals.theRenderer.repaint();
18231825 } else
1824
- if (event.getSource() == recompileItem)
1826
+ if (source == recompileItem)
18251827 {
18261828 Recompile();
18271829 refreshContents();
18281830 } else
1829
- if (event.getSource() == editScriptItem)
1831
+ if (source == editScriptItem)
18301832 {
18311833 OpenDialog();
18321834 refreshContents();
18331835 } else
1834
- if (event.getSource() == invariantsItem)
1836
+ if (source == invariantsItem)
18351837 {
18361838 System.out.println("Invariants:");
18371839 GrafreeD.grafreeD.universe.invariants();
18381840 } else
1839
- if (event.getSource() == memoryItem)
1841
+ if (source == memoryItem)
18401842 {
18411843 //System.out.println("Invariants:");
18421844 PrintMemory();
18431845 } else
1844
- if (event.getSource() == pathItem)
1846
+ if (source == pathItem)
18451847 {
18461848 PrintPath();
18471849 } else
1848
- if (event.getSource() == analyzeItem)
1850
+ if (source == analyzeItem)
18491851 {
18501852 AnalyzeObject();
18511853 } else
1852
- if (event.getSource() == dumpItem)
1854
+ if (source == dumpItem)
18531855 {
18541856 DumpObject();
18551857 } else
1856
- if (event.getSource() == screenfitButton)
1858
+ if (source == screenfitButton)
18571859 {
18581860 //Reload(lastConverter, lastFilename, true);
18591861 ScreenFit();
18601862 } else
1861
- if (event.getSource() == screenfitpointButton)
1863
+ if (source == screenfitpointButton)
18621864 {
18631865 //Reload(lastConverter, lastFilename, true);
18641866 ScreenFitPoint();
18651867 } else
1866
- if (event.getSource() == snapobjectButton)
1868
+ if (source == snapobjectButton)
18671869 {
18681870 //Reload(lastConverter, lastFilename, true);
18691871 SnapObject();
....@@ -1874,13 +1876,13 @@
18741876 // Recompile();
18751877 // refreshContents();
18761878 // } else
1877
- if (event.getSource() == gcButton)
1879
+ if (source == gcButton)
18781880 {
18791881 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18801882 System.gc();
18811883 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18821884 } else
1883
- if (event.getSource() == editLeafItem)
1885
+ if (source == editLeafItem)
18841886 {
18851887 Object3D obj;
18861888 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1894,62 +1896,62 @@
18941896 }
18951897 refreshContents(true);
18961898 } else
1897
- if (event.getSource() == openWindowItem)
1899
+ if (source == openWindowItem)
18981900 {
18991901 EditSelection(true);
19001902 } else
1901
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1903
+ if (source == cutItem || source == clearButton)
19021904 {
19031905 loadClipboard(true);
19041906 } else
1905
- if (event.getSource() == duplicateItem)
1907
+ if (source == duplicateItem)
19061908 {
19071909 Object3D keep = GrafreeD.clipboard;
19081910 loadClipboard(false);
19091911 paste(false);
19101912 GrafreeD.clipboard = keep;
19111913 } else
1912
- if (event.getSource() == cloneItem)
1914
+ if (source == cloneItem)
19131915 {
19141916 CloneSelection(false);
19151917 } else
1916
- if (event.getSource() == cloneSupportItem)
1918
+ if (source == cloneSupportItem)
19171919 {
19181920 CloneSelection(true);
19191921 } else
1920
- if (event.getSource() == copyItem)
1922
+ if (source == copyItem)
19211923 {
19221924 loadClipboard(false);
19231925 } else
1924
- if (event.getSource() == pasteItem)
1926
+ if (source == pasteItem)
19251927 {
19261928 paste(false);
19271929 } else
1928
- if (event.getSource() == pasteLinkItem)
1930
+ if (source == pasteLinkItem)
19291931 {
19301932 pasteInto(false);
19311933 } else
1932
- if (event.getSource() == pasteCloneItem)
1934
+ if (source == pasteCloneItem)
19331935 {
19341936 pasteInto(true);
19351937 } else
1936
- if (event.getSource() == pasteExpandItem)
1938
+ if (source == pasteExpandItem)
19371939 {
19381940 paste(true);
19391941 } else
1940
- if (event.getSource() == synchronizeItem)
1942
+ if (source == synchronizeItem)
19411943 {
19421944 Overwrite(Object3D.TRANSFORM);
19431945 } else
1944
- if (event.getSource() == overwriteNameItem)
1946
+ if (source == overwriteNameItem)
19451947 {
19461948 Overwrite(Object3D.NAME);
19471949 } else
1948
- if (event.getSource() == overwriteUVItem)
1950
+ if (source == overwriteUVItem)
19491951 {
19501952 Overwrite(Object3D.UV);
19511953 } else
1952
- if (event.getSource() == overwriteMatItem)
1954
+ if (source == overwriteMatItem)
19531955 {
19541956 /* july 2015
19551957 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1969,7 +1971,7 @@
19691971
19701972 Overwrite(dropAttributes);
19711973 }
1972
- if (event.getSource() == overwriteGeoItem)
1974
+ if (source == overwriteGeoItem)
19731975 {
19741976 Overwrite(Object3D.GEOMETRY);
19751977 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1986,7 +1988,7 @@
19861988 // refreshContents();
19871989 // }
19881990 } else
1989
- if (event.getSource() == generateMeshItem)
1991
+ if (source == generateMeshItem)
19901992 {
19911993 //if (group.selection.size() == 1)
19921994 // for (int i=0; i<group.selection.size(); i++)
....@@ -1997,7 +1999,7 @@
19971999 ResetModel();
19982000 refreshContents();
19992001 } else
2000
- if (event.getSource() == extractGeometriesItem)
2002
+ if (source == extractGeometriesItem)
20012003 {
20022004 boolean one = false;
20032005
....@@ -2024,7 +2026,7 @@
20242026 ResetModel();
20252027 refreshContents();
20262028 } else
2027
- if (event.getSource() == cloneGeometriesItem)
2029
+ if (source == cloneGeometriesItem)
20282030 {
20292031 boolean one = false;
20302032
....@@ -2050,7 +2052,7 @@
20502052 ResetModel();
20512053 refreshContents();
20522054 } else
2053
- if (event.getSource() == shareGeometriesItem)
2055
+ if (source == shareGeometriesItem)
20542056 {
20552057 boolean one = false;
20562058
....@@ -2080,7 +2082,7 @@
20802082 refreshContents();
20812083 }
20822084 } else
2083
- if (event.getSource() == mergeGeometriesItem)
2085
+ if (source == mergeGeometriesItem)
20842086 {
20852087 boolean one = false;
20862088
....@@ -2110,7 +2112,7 @@
21102112 ResetModel();
21112113 refreshContents();
21122114 } else
2113
- if (event.getSource() == linkverticesItem)
2115
+ if (source == linkverticesItem)
21142116 {
21152117 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21162118 // {
....@@ -2143,7 +2145,7 @@
21432145 refreshContents();
21442146 }
21452147 } else
2146
- if (event.getSource() == resetsupportItem)
2148
+ if (source == resetsupportItem)
21472149 {
21482150 for (int i=0; i<group.selection.size(); i++)
21492151 {
....@@ -2155,7 +2157,7 @@
21552157
21562158 refreshContents();
21572159 } else
2158
- if (event.getSource() == relinkverticesItem)
2160
+ if (source == relinkverticesItem)
21592161 {
21602162 boolean random = CameraPane.RANDOM;
21612163 CameraPane.RANDOM = false; // parse all random nodes
....@@ -2164,7 +2166,7 @@
21642166
21652167 refreshContents();
21662168 } else
2167
- if (event.getSource() == resetreferencesItem)
2169
+ if (source == resetreferencesItem)
21682170 {
21692171 for (int i=0; i<group.selection.size(); i++)
21702172 {
....@@ -2173,7 +2175,7 @@
21732175
21742176 refreshContents();
21752177 } else
2176
- if (event.getSource() == setMasterItem)
2178
+ if (source == setMasterItem)
21772179 {
21782180 if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21792181 {
....@@ -2186,7 +2188,7 @@
21862188 refreshContents();
21872189 }
21882190 } else
2189
- if (event.getSource() == poseMeshItem)
2191
+ if (source == poseMeshItem)
21902192 {
21912193 if (group.selection.size() == 1)
21922194 {
....@@ -2205,19 +2207,19 @@
22052207 }
22062208
22072209 } else
2208
- if (event.getSource() == revertMeshItem)
2210
+ if (source == revertMeshItem)
22092211 {
22102212 RevertMeshes();
22112213 } else
2212
- if (event.getSource() == resetMeshItem)
2214
+ if (source == resetMeshItem)
22132215 {
22142216 ResetAll();
22152217 } else
2216
- if (event.getSource() == stepAllItem)
2218
+ if (source == stepAllItem)
22172219 {
22182220 StepAll();
22192221 } else
2220
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2222
+ if (source == clearItem) // || event.getSource() == clearButton)
22212223 {
22222224 //int indices[] = jList.getSelectedIndices();
22232225 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2225,46 +2227,46 @@
22252227
22262228 ClearSelection(false);
22272229 } else
2228
- if (event.getSource() == clearAllItem)
2230
+ if (source == clearAllItem)
22292231 {
22302232 ClearSelection(true);
22312233 } else
2232
- if (event.getSource() == grabItem)
2234
+ if (source == grabItem)
22332235 {
22342236 group(new cGroup(), true);
22352237 } else
2236
- if (event.getSource() == hideItem)
2238
+ if (source == hideItem)
22372239 {
22382240 group(new HiddenObject());
22392241 } else
2240
- if (event.getSource() == frontItem)
2242
+ if (source == frontItem)
22412243 {
22422244 front();
22432245 } else
2244
- if (event.getSource() == backItem)
2246
+ if (source == backItem)
22452247 {
22462248 back();
22472249 } else
2248
- if (event.getSource() == cameraItem)
2250
+ if (source == cameraItem)
22492251 {
22502252 makeSomething(new Camera());
22512253 } else
2252
- if (event.getSource() == compositeItem)
2254
+ if (source == compositeItem)
22532255 {
22542256 group(new Composite());
22552257 } else
2256
- if (event.getSource() == randomItem)
2258
+ if (source == randomItem)
22572259 {
22582260 RandomNode random = new RandomNode();
22592261 group(random);
22602262 if (random.size() > 0)
22612263 random.name = random.get(0).name + "Rnd";
22622264 } else
2263
- if (event.getSource() == physicsItem)
2265
+ if (source == physicsItem)
22642266 {
22652267 group(new PhysicsNode());
22662268 } else
2267
- if (event.getSource() == frameselectorItem)
2269
+ if (source == frameselectorItem)
22682270 {
22692271 for (int i=0; i<group.selection.size(); i++)
22702272 {
....@@ -2276,7 +2278,7 @@
22762278 ResetModel();
22772279 refreshContents();
22782280 } else
2279
- if (event.getSource() == switchGeoItem)
2281
+ if (source == switchGeoItem)
22802282 {
22812283 for (int i=0; i<group.selection.size(); i++)
22822284 {
....@@ -2288,7 +2290,7 @@
22882290 ResetModel();
22892291 refreshContents();
22902292 } else
2291
- if (event.getSource() == switchTransfoItem)
2293
+ if (source == switchTransfoItem)
22922294 {
22932295 for (int i=0; i<group.selection.size(); i++)
22942296 {
....@@ -2300,7 +2302,7 @@
23002302 ResetModel();
23012303 refreshContents();
23022304 } else
2303
- if (event.getSource() == morphItem)
2305
+ if (source == morphItem)
23042306 {
23052307 for (int i=0; i<group.selection.size(); i++)
23062308 {
....@@ -2312,7 +2314,7 @@
23122314 ResetModel();
23132315 refreshContents();
23142316 } else
2315
- if (event.getSource() == scriptNodeItem)
2317
+ if (source == scriptNodeItem)
23162318 {
23172319 boolean atleastone = false;
23182320
....@@ -2351,31 +2353,31 @@
23512353 }
23522354 }
23532355 } else
2354
- if (event.getSource() == linkerItem)
2356
+ if (source == linkerItem)
23552357 {
23562358 group(new cLinker());
23572359 } else
2358
- if (event.getSource() == textureItem)
2360
+ if (source == textureItem)
23592361 {
23602362 group(new TextureNode());
23612363 } else
2362
- if (event.getSource() == billboardItem)
2364
+ if (source == billboardItem)
23632365 {
23642366 group(new BillboardNode());
23652367 } else
2366
- if (event.getSource() == shadowXItem)
2368
+ if (source == shadowXItem)
23672369 {
23682370 CastShadow(0);
23692371 } else
2370
- if (event.getSource() == shadowYItem)
2372
+ if (source == shadowYItem)
23712373 {
23722374 CastShadow(1);
23732375 } else
2374
- if (event.getSource() == shadowZItem)
2376
+ if (source == shadowZItem)
23752377 {
23762378 CastShadow(2);
23772379 } else
2378
- if (event.getSource() == ungroupItem)
2380
+ if (source == ungroupItem)
23792381 {
23802382 //ungroup();
23812383 for (int i=0; i<group.selection.size(); i++)
....@@ -2387,179 +2389,179 @@
23872389
23882390 refreshContents();
23892391 } else
2390
- if (event.getSource() == genUVItem)
2392
+ if (source == genUVItem)
23912393 {
23922394 GenUV();
23932395 } else
2394
- if (event.getSource() == genNormalsCADItem)
2396
+ if (source == genNormalsCADItem)
23952397 {
23962398 GenNormals(true);
23972399 } else
2398
- if (event.getSource() == genNormalsMESHItem)
2400
+ if (source == genNormalsMESHItem)
23992401 {
24002402 GenNormals(true); // TODO
24012403 } else
2402
- if (event.getSource() == genNormalsORGANItem)
2404
+ if (source == genNormalsORGANItem)
24032405 {
24042406 GenNormals(false);
24052407 } else
2406
- if (event.getSource() == genNormalsMINEItem)
2408
+ if (source == genNormalsMINEItem)
24072409 {
24082410 GenNormalsMINE();
24092411 } else
2410
- if (event.getSource() == stripifyItem)
2412
+ if (source == stripifyItem)
24112413 {
24122414 Stripify();
24132415 } else
2414
- if (event.getSource() == unstripifyItem)
2416
+ if (source == unstripifyItem)
24152417 {
24162418 Unstripify();
24172419 } else
2418
- if (event.getSource() == trimItem)
2420
+ if (source == trimItem)
24192421 {
24202422 Trim();
24212423 } else
2422
- if (event.getSource() == untrimItem)
2424
+ if (source == untrimItem)
24232425 {
24242426 Untrim();
24252427 } else
2426
- if (event.getSource() == clearColorsItem)
2428
+ if (source == clearColorsItem)
24272429 {
24282430 ClearColors();
24292431 } else
2430
- if (event.getSource() == clearMaterialsItem)
2432
+ if (source == clearMaterialsItem)
24312433 {
24322434 ClearMaterials();
24332435 } else
2434
- if (event.getSource() == liveleavesItem)
2436
+ if (source == liveleavesItem)
24352437 {
24362438 LiveLeaves(true);
24372439 } else
2438
- if (event.getSource() == unliveleavesItem)
2440
+ if (source == unliveleavesItem)
24392441 {
24402442 LiveLeaves(false);
24412443 } else
2442
- if (event.getSource() == supportleavesItem)
2444
+ if (source == supportleavesItem)
24432445 {
24442446 SupportLeaves(true);
24452447 } else
2446
- if (event.getSource() == unsupportleavesItem)
2448
+ if (source == unsupportleavesItem)
24472449 {
24482450 SupportLeaves(false);
24492451 } else
2450
- if (event.getSource() == hideleavesItem)
2452
+ if (source == hideleavesItem)
24512453 {
24522454 HideLeaves(true);
24532455 } else
2454
- if (event.getSource() == showleavesItem)
2456
+ if (source == showleavesItem)
24552457 {
24562458 HideLeaves(false);
24572459 } else
2458
- if (event.getSource() == markleavesItem)
2460
+ if (source == markleavesItem)
24592461 {
24602462 MarkLeaves(true);
24612463 } else
2462
- if (event.getSource() == unmarkleavesItem)
2464
+ if (source == unmarkleavesItem)
24632465 {
24642466 MarkLeaves(false);
24652467 } else
2466
- if (event.getSource() == flipVItem)
2468
+ if (source == flipVItem)
24672469 {
24682470 FlipV(true);
24692471 } else
2470
- if (event.getSource() == unflipVItem)
2472
+ if (source == unflipVItem)
24712473 {
24722474 FlipV(false);
24732475 } else
2474
- if (event.getSource() == lowTexturesItem)
2476
+ if (source == lowTexturesItem)
24752477 {
24762478 SetTexRes(0);
24772479 } else
2478
- if (event.getSource() == normalTexturesItem)
2480
+ if (source == normalTexturesItem)
24792481 {
24802482 SetTexRes(1);
24812483 } else
2482
- if (event.getSource() == highTexturesItem)
2484
+ if (source == highTexturesItem)
24832485 {
24842486 SetTexRes(2);
24852487 } else
2486
- if (event.getSource() == veryhighTexturesItem)
2488
+ if (source == veryhighTexturesItem)
24872489 {
24882490 SetTexRes(3);
24892491 } else
2490
- if (event.getSource() == maxTexturesItem)
2492
+ if (source == maxTexturesItem)
24912493 {
24922494 SetTexRes(4);
24932495 } else
2494
- if (event.getSource() == panoTexturesItem)
2496
+ if (source == panoTexturesItem)
24952497 {
24962498 SetTexRes(5);
24972499 } else
2498
- if (event.getSource() == reverseNormalsItem)
2500
+ if (source == reverseNormalsItem)
24992501 {
25002502 ReverseNormals();
25012503 } else
2502
- if (event.getSource() == parseverticesItem)
2504
+ if (source == parseverticesItem)
25032505 {
25042506 ParseVertices();
25052507 } else
2506
- if (event.getSource() == textureFieldItem)
2508
+ if (source == textureFieldItem)
25072509 {
25082510 TextureVertices();
25092511 } else
2510
- if (event.getSource() == alignItem)
2512
+ if (source == alignItem)
25112513 {
25122514 Align();
25132515 } else
2514
- if (event.getSource() == mirrorItem)
2516
+ if (source == mirrorItem)
25152517 {
25162518 MirrorPoses();
25172519 } else
2518
- if (event.getSource() == reduceMorphItem)
2520
+ if (source == reduceMorphItem)
25192521 {
25202522 MeshReduction(false);
25212523 } else
2522
- if (event.getSource() == reduce34MorphItem)
2524
+ if (source == reduce34MorphItem)
25232525 {
25242526 MeshReduction(true);
25252527 } else
2526
- if (event.getSource() == reverseTrianglesItem)
2528
+ if (source == reverseTrianglesItem)
25272529 {
25282530 ReverseTriangles();
25292531 } else
2530
- if (event.getSource() == reduceMeshItem)
2532
+ if (source == reduceMeshItem)
25312533 {
25322534 ReduceMesh(false);
25332535 } else
2534
- if (event.getSource() == reduce34MeshItem)
2536
+ if (source == reduce34MeshItem)
25352537 {
25362538 ReduceMesh(true);
25372539 } else
2538
- if (event.getSource() == increaseMeshItem)
2540
+ if (source == increaseMeshItem)
25392541 {
25402542 IncreaseMesh();
25412543 } else
2542
- if (event.getSource() == clipMeshItem)
2544
+ if (source == clipMeshItem)
25432545 {
25442546 ClipMesh();
25452547 } else
2546
- if (event.getSource() == smoothMeshItem)
2548
+ if (source == smoothMeshItem)
25472549 {
25482550 SmoothMesh();
25492551 } else
2550
- if (event.getSource() == transformgeometryItem)
2552
+ if (source == transformgeometryItem)
25512553 {
25522554 TransformGeometry();
25532555 } else
2554
- if (event.getSource() == resetTransformItem)
2556
+ if (source == resetTransformItem)
25552557 {
25562558 ResetTransform();
25572559 } else
2558
- if (event.getSource() == resetCentroidItem)
2560
+ if (source == resetCentroidItem)
25592561 {
25602562 ResetCentroid();
25612563 } else
2562
- if (event.getSource() == resetParentItem)
2564
+ if (source == resetParentItem)
25632565 {
25642566 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25652567 {
....@@ -2569,7 +2571,7 @@
25692571
25702572 refreshContents();
25712573 } else
2572
- if (event.getSource() == repairParentItem)
2574
+ if (source == repairParentItem)
25732575 {
25742576 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25752577 {
....@@ -2583,7 +2585,7 @@
25832585
25842586 refreshContents();
25852587 } else
2586
- if (event.getSource() == repairShadowItem)
2588
+ if (source == repairShadowItem)
25872589 {
25882590 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25892591 {
....@@ -2597,7 +2599,7 @@
25972599
25982600 refreshContents();
25992601 } else
2600
- if (event.getSource() == sortbysizeItem)
2602
+ if (source == sortbysizeItem)
26012603 {
26022604 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
26032605 {
....@@ -2609,7 +2611,7 @@
26092611 ResetModel();
26102612 refreshContents();
26112613 } else
2612
- if (event.getSource() == sortbynameItem)
2614
+ if (source == sortbynameItem)
26132615 {
26142616 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
26152617 {
....@@ -2621,7 +2623,7 @@
26212623 ResetModel();
26222624 refreshContents();
26232625 } else
2624
- if (event.getSource() == attachPigmentItem)
2626
+ if (source == attachPigmentItem)
26252627 {
26262628 String texture = GetFile("Attach pigment");
26272629 Object3D obj;
....@@ -2633,7 +2635,7 @@
26332635
26342636 refreshContents();
26352637 } else
2636
- if (event.getSource() == detachPigmentItem)
2638
+ if (source == detachPigmentItem)
26372639 {
26382640 Object3D obj;
26392641 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2644,7 +2646,7 @@
26442646
26452647 refreshContents();
26462648 } else
2647
- if (event.getSource() == attachBumpItem)
2649
+ if (source == attachBumpItem)
26482650 {
26492651 String texture = GetFile("Attach bump");
26502652 Object3D obj;
....@@ -2656,7 +2658,7 @@
26562658
26572659 refreshContents();
26582660 } else
2659
- if (event.getSource() == detachBumpItem)
2661
+ if (source == detachBumpItem)
26602662 {
26612663 Object3D obj;
26622664 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2667,7 +2669,7 @@
26672669
26682670 refreshContents();
26692671 } else
2670
- if (event.getSource() == pigmentBumpItem)
2672
+ if (source == pigmentBumpItem)
26712673 {
26722674 Object3D obj;
26732675 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2678,158 +2680,195 @@
26782680
26792681 refreshContents();
26802682 } else
2681
- if (event.getSource() == flashSelectionButton)
2683
+ if (source == flashSelectionButton)
26822684 {
26832685 CameraPane.flash = true;
26842686 refreshContents();
26852687 } else
2686
- if (event.getSource() == oneButton)
2688
+ if (source == oneButton)
26872689 {
26882690 } else
2689
- if (event.getSource() == twoButton)
2691
+ if (source == twoButton)
26902692 {
26912693 radio.layout = twoButton;
26922694 // bug
26932695 //gridPanel.setDividerLocation(1.0);
26942696 //bigPanel.setDividerLocation(0.0);
2695
- bigThree.remove(scenePanel);
2696
- bigThree.remove(centralPanel);
2697
- bigThree.remove(XYZPanel);
2698
- aWindowConstraints.gridx = 0;
2699
- aWindowConstraints.gridy = 0;
2700
- aWindowConstraints.gridwidth = 1;
2701
- // aConstraints.gridheight = 3;
2702
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2703
- aWindowConstraints.weightx = 0;
2704
- aWindowConstraints.weighty = 1;
2705
- //bigThree.add(jtp, aWindowConstraints);
2706
- aWindowConstraints.weightx = 1;
2707
- aWindowConstraints.gridwidth = 3;
2708
- // aConstraints.gridheight = 3;
2709
- aWindowConstraints.gridx = 1;
2710
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2711
- bigThree.add(centralPanel, aWindowConstraints);
2712
- aWindowConstraints.weightx = 0;
2713
- aWindowConstraints.gridx = 4;
2714
- aWindowConstraints.gridwidth = 1;
2715
- // aConstraints.gridheight = 3;
2716
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2717
- //bigThree.add(XYZPanel, aWindowConstraints);
2718
- 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();
27192726 } else
2720
- if (event.getSource() == threeButton)
2727
+ if (source == threeButton)
27212728 {
27222729 radio.layout = threeButton;
2723
- bigThree.remove(scenePanel);
2724
- bigThree.remove(centralPanel);
2725
- bigThree.remove(XYZPanel);
2726
- aWindowConstraints.gridx = 0;
2727
- aWindowConstraints.gridy = 0;
2728
- aWindowConstraints.gridwidth = 1;
2729
- // aConstraints.gridheight = 3;
2730
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2731
- aWindowConstraints.weightx = 0;
2732
- aWindowConstraints.weighty = 1;
2733
- //bigThree.add(jtp, aWindowConstraints);
2734
- aWindowConstraints.weightx = 1;
2735
- aWindowConstraints.gridwidth = 3;
2736
- // aConstraints.gridheight = 3;
2737
- aWindowConstraints.gridx = 1;
2738
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2739
- bigThree.add(centralPanel, aWindowConstraints);
2740
- aWindowConstraints.weightx = 0;
2741
- aWindowConstraints.gridx = 4;
2742
- aWindowConstraints.gridwidth = 1;
2743
- // aConstraints.gridheight = 3;
2744
- aConstraints.fill = GridBagConstraints.VERTICAL;
2745
- bigThree.add(XYZPanel, aWindowConstraints);
2746
- 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();
27472762 } else
2748
- if (event.getSource() == fourButton)
2763
+ if (source == fourButton)
27492764 {
27502765 radio.layout = fourButton;
2751
- bigThree.remove(scenePanel);
2752
- bigThree.remove(centralPanel);
2753
- bigThree.remove(XYZPanel);
2754
- aWindowConstraints.gridx = 0;
2755
- aWindowConstraints.gridy = 0;
2756
- aWindowConstraints.gridwidth = 1;
2757
- // aWindowConstraints.gridheight = 3;
2758
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2759
- aWindowConstraints.weightx = 1;
2760
- aWindowConstraints.weighty = 1;
2761
- bigThree.add(scenePanel, aWindowConstraints);
2762
- aWindowConstraints.weightx = 1;
2763
- aWindowConstraints.gridwidth = 3;
2764
- // aConstraints.gridheight = 3;
2765
- aWindowConstraints.gridx = 1;
2766
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2767
- //bigThree.add(cameraPanel, aWindowConstraints);
2768
- aWindowConstraints.weightx = 0;
2769
- aWindowConstraints.gridx = 4;
2770
- aWindowConstraints.gridwidth = 1;
2771
- // aWindowConstraints.gridheight = 3;
2772
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2773
- //bigThree.add(XYZPanel, aWindowConstraints);
2774
- 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();
27752797 } else
2776
- if (event.getSource() == sixButton)
2798
+ if (source == sixButton)
27772799 {
27782800 radio.layout = sixButton;
2779
- bigThree.remove(scenePanel);
2780
- bigThree.remove(centralPanel);
2781
- bigThree.remove(XYZPanel);
2782
- aWindowConstraints.gridx = 0;
2783
- aWindowConstraints.gridy = 0;
2784
- aWindowConstraints.gridwidth = 1;
2785
- // aConstraints.gridheight = 3;
2786
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2787
- aWindowConstraints.weightx = 0;
2788
- aWindowConstraints.weighty = 1;
2789
- bigThree.add(scenePanel, aWindowConstraints);
2790
- aWindowConstraints.weightx = 1;
2791
- aWindowConstraints.gridwidth = 3;
2792
- // aWindowConstraints.gridheight = 3;
2793
- aWindowConstraints.gridx = 1;
2794
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2795
- bigThree.add(centralPanel, aWindowConstraints);
2796
- aWindowConstraints.weightx = 0;
2797
- aWindowConstraints.gridx = 4;
2798
- aWindowConstraints.gridwidth = 1;
2799
- // aWindowConstraints.gridheight = 3;
2800
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2801
- //bigThree.add(XYZPanel, aConstraints);
2802
- 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();
28032833 } else
2804
- if (event.getSource() == sevenButton)
2834
+ if (source == sevenButton)
28052835 {
28062836 radio.layout = sevenButton;
2807
- bigThree.remove(scenePanel);
2808
- bigThree.remove(centralPanel);
2809
- bigThree.remove(XYZPanel);
2810
- aWindowConstraints.gridx = 0;
2811
- aWindowConstraints.gridy = 0;
2812
- aWindowConstraints.gridwidth = 1;
2813
- // aWindowConstraints.gridheight = 3;
2814
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2815
- aWindowConstraints.weightx = 0;
2816
- aWindowConstraints.weighty = 1;
2817
- bigThree.add(scenePanel, aWindowConstraints);
2818
- aWindowConstraints.weightx = 1;
2819
- aWindowConstraints.gridwidth = 3;
2820
- // aWindowConstraints.gridheight = 3;
2821
- aWindowConstraints.gridx = 1;
2822
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2823
- bigThree.add(centralPanel, aWindowConstraints);
2824
- aWindowConstraints.weightx = 0;
2825
- aWindowConstraints.gridx = 4;
2826
- aWindowConstraints.gridwidth = 1;
2827
- // aConstraints.gridheight = 3;
2828
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2829
- bigThree.add(XYZPanel, aWindowConstraints);
2830
- 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();
28312870 } else
2832
- if (event.getSource() == rootButton)
2871
+ if (source == rootButton)
28332872 {
28342873 Object3D obj;
28352874 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2841,7 +2880,7 @@
28412880
28422881 refreshContents(true);
28432882 } else
2844
- if (event.getSource() == closeButton)
2883
+ if (source == closeButton)
28452884 {
28462885 //System.out.println("CLOSE: " + buttonGroup.getSelection());
28472886 cRadio ab;
....@@ -2862,11 +2901,11 @@
28622901 }
28632902 refreshContents(true);
28642903 } else
2865
- if (event.getSource() == editItem || event.getSource() == editButton)
2904
+ if (source == editItem || source == editButton)
28662905 {
28672906 EditSelection(false);
28682907 } else
2869
- if (event.getSource() == uneditButton)
2908
+ if (source == uneditButton)
28702909 {
28712910 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28722911 {
....@@ -2878,12 +2917,12 @@
28782917
28792918 child.editWindow = null; // ???????????
28802919 }
2881
- objEditor.ctrlPanel.revalidate();
2920
+ objEditor.ctrlPanel.validate();
28822921 //objEditor.jTree.clearSelection();
28832922 //objEditor.ResetSliders();
28842923 refreshContents(true);
28852924 } else
2886
- if (event.getSource() == clearPanelButton)
2925
+ if (source == clearPanelButton)
28872926 {
28882927 assert(copy == group);
28892928 //copy.ClearUI();
....@@ -2894,7 +2933,7 @@
28942933 listUI.clear();
28952934 refreshContents(true);
28962935 } else
2897
- if (event.getSource() == allParamsButton)
2936
+ if (source == allParamsButton)
28982937 {
28992938 assert(copy == group);
29002939
....@@ -2915,19 +2954,19 @@
29152954
29162955 refreshContents(true);
29172956 } else
2918
- if (event.getSource() == unselectButton)
2957
+ if (source == unselectButton)
29192958 {
29202959 objEditor.jTree.clearSelection();
29212960 // ?? oct 2012 GrafreeD.clipboard.clear();
29222961 objEditor.ResetSliders();
29232962 refreshContents(true);
29242963 } else
2925
- if(event.getSource() instanceof cRadio)
2964
+ if(source instanceof cRadio)
29262965 {
29272966 group.parent = keepparent;
29282967 group.attributes = 0;
29292968 //group.editWindow = null;
2930
- /*cRadio*/ radio = (cRadio)event.getSource();
2969
+ /*cRadio*/ radio = (cRadio)source;
29312970 Object3D obj = radio.GetObject();
29322971 System.out.println("Edit " + obj);
29332972 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)