Normand Briere
2019-04-29 bed42c663d286d76a32f155049f9efabc2fdb73f
New UI proto
2 files modified
633 ■■■■ changed files
GroupEditor.java 610 ●●●● patch | view | raw | blame | history
ObjEditor.java 23 ●●●●● patch | view | raw | blame | history
GroupEditor.java
....@@ -1518,6 +1518,7 @@
15181518 //
15191519 public void actionPerformed(ActionEvent event) // , Object arg)
15201520 {
1521
+ Object source = event.getSource();
15211522 /*
15221523 if (event.getSource() == nameField)
15231524 {
....@@ -1529,11 +1530,11 @@
15291530 }
15301531 else
15311532 */
1532
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1533
+ if (source == lookAtItem || source == lookFromItem)
15331534 {
15341535 ScreenFit();
15351536 } else
1536
- if (event.getSource() == switchItem)
1537
+ if (source == switchItem)
15371538 {
15381539 cVector v1 = new cVector();
15391540 cVector v2 = new cVector();
....@@ -1542,11 +1543,11 @@
15421543 objEditor.cameraView.renderCamera.setAim(v2, v1);
15431544 objEditor.cameraView.repaint();
15441545 } else
1545
- if (event.getSource() == rectoidItem)
1546
+ if (source == rectoidItem)
15461547 {
15471548 makeSomething(new Box());
15481549 } else
1549
- if (event.getSource() == particleItem)
1550
+ if (source == particleItem)
15501551 {
15511552 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15521553 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1567,9 +1568,9 @@
15671568 applyExample(particleGeom, "SMOKE");
15681569 makeSomething(particleGeom);
15691570 } else
1570
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1571
+ if (source == ragdollItem || source == ragdoll2Item)
15711572 {
1572
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1573
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15731574
15741575 ragdoll.toParent = LA.newMatrix();
15751576 ragdoll.fromParent = LA.newMatrix();
....@@ -1587,7 +1588,7 @@
15871588 } else
15881589 /*
15891590 */
1590
- if (event.getSource() == heightFieldItem)
1591
+ if (source == heightFieldItem)
15911592 {
15921593 Object3D obj = new Object3D();
15931594
....@@ -1625,31 +1626,31 @@
16251626
16261627 makeSomething(obj);
16271628 } else
1628
- if (event.getSource() == gridItem)
1629
+ if (source == gridItem)
16291630 {
16301631 makeSomething(new Grid());
16311632 } else
1632
- if (event.getSource() == ellipsoidItem)
1633
+ if (source == ellipsoidItem)
16331634 {
16341635 makeSomething(new Sphere());
16351636 } else
1636
- if (event.getSource() == coneItem)
1637
+ if (source == coneItem)
16371638 {
16381639 makeSomething(new Cone());
16391640 } else
1640
- if (event.getSource() == torusItem)
1641
+ if (source == torusItem)
16411642 {
16421643 makeSomething(new Torus());
16431644 } else
1644
- if (event.getSource() == superItem)
1645
+ if (source == superItem)
16451646 {
16461647 makeSomething(new Superellipsoid());
16471648 } else
1648
- if (event.getSource() == kleinItem)
1649
+ if (source == kleinItem)
16491650 {
16501651 makeSomething(new Klein());
16511652 } else
1652
- if (event.getSource() == blobItem)
1653
+ if (source == blobItem)
16531654 {
16541655 Blob blob = new Blob();
16551656 BlobComponent comp = new BlobComponent();
....@@ -1657,15 +1658,15 @@
16571658 //blob.retile();
16581659 makeSomething(blob);
16591660 } else
1660
- if (event.getSource() == latheItem)
1661
+ if (source == latheItem)
16611662 {
16621663 makeSomething(new Lathe());
16631664 } else
1664
- if (event.getSource() == bezierItem)
1665
+ if (source == bezierItem)
16651666 {
16661667 makeSomething(new BezierSurface());
16671668 } else
1668
- if (event.getSource() == checkerItem)
1669
+ if (source == checkerItem)
16691670 {
16701671 /*
16711672 Object3D obj = new BezierSurface(5,8);
....@@ -1680,7 +1681,7 @@
16801681 */
16811682 makeSomething(new Checker());
16821683 } else
1683
- if (event.getSource() == meshItem)
1684
+ if (source == meshItem)
16841685 {
16851686 Object3D itemtomake = new Object3D();
16861687 Object3D child;
....@@ -1701,35 +1702,35 @@
17011702 makeSomething(child);
17021703 }
17031704 } else
1704
- if (event.getSource() == springItem)
1705
+ if (source == springItem)
17051706 {
17061707 cSpring s = new cSpring();
17071708 s.setup();
17081709 makeSomething(s);
17091710 } else
1710
- if (event.getSource() == flagItem)
1711
+ if (source == flagItem)
17111712 {
17121713 cSpring s = new cFlag();
17131714 s.setup();
17141715 makeSomething(s);
17151716 } else
1716
- if (event.getSource() == lightItem)
1717
+ if (source == lightItem)
17171718 {
17181719 makeSomething(new Light());
17191720 } else
1720
- if (event.getSource() == csgItem)
1721
+ if (source == csgItem)
17211722 {
17221723 group(new CSG());
17231724 } else
1724
- if (event.getSource() == templateItem)
1725
+ if (source == templateItem)
17251726 {
17261727 group(new cTemplate());
17271728 } else
1728
- if (event.getSource() == attributeItem)
1729
+ if (source == attributeItem)
17291730 {
17301731 makeSomething(new Attribute());
17311732 } else
1732
- if (event.getSource() == pointflowItem)
1733
+ if (source == pointflowItem)
17331734 {
17341735 makeSomething(new PointFlow());
17351736 } else
....@@ -1741,7 +1742,7 @@
17411742 } else
17421743 */
17431744
1744
- if (event.getSource() == superLoopItem)
1745
+ if (source == superLoopItem)
17451746 {
17461747 Composite g = new cGroup();
17471748 for (int i=0; i<15; i++)
....@@ -1763,7 +1764,7 @@
17631764
17641765 group(g);
17651766 } else
1766
- if (event.getSource() == loopItem)
1767
+ if (source == loopItem)
17671768 {
17681769 Composite csg = new GroupLeaf();
17691770 csg.count = 5;
....@@ -1772,7 +1773,7 @@
17721773 csg.addChild(child);
17731774 child.addChild(csg);
17741775 } else
1775
- if (event.getSource() == doubleItem)
1776
+ if (source == doubleItem)
17761777 {
17771778 Composite csg = new GroupLeaf();
17781779 csg.count = 5;
....@@ -1784,7 +1785,7 @@
17841785 csg.addChild(child);
17851786 child.addChild(csg);
17861787 } else
1787
- if (event.getSource() == tripleItem)
1788
+ if (source == tripleItem)
17881789 {
17891790 Composite csg = new GroupLeaf();
17901791 csg.count = 4;
....@@ -1800,70 +1801,70 @@
18001801 child.addChild(csg);
18011802 } else
18021803
1803
- if (event.getSource() == importGFDItem)
1804
+ if (source == importGFDItem)
18041805 {
18051806 ImportGFD();
18061807 } else
1807
- if (event.getSource() == importVRMLX3DItem)
1808
+ if (source == importVRMLX3DItem)
18081809 {
18091810 ImportVRMLX3D();
18101811 } else
1811
- if (event.getSource() == import3DSItem)
1812
+ if (source == import3DSItem)
18121813 {
18131814 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
18141815 } else
1815
- if (event.getSource() == importOBJItem)
1816
+ if (source == importOBJItem)
18161817 {
18171818 objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
18181819 } else
1819
- if (event.getSource() == computeAOItem)
1820
+ if (source == computeAOItem)
18201821 {
18211822 Globals.drawMode = CameraPane.OCCLUSION;
18221823 Globals.theRenderer.repaint();
18231824 } else
1824
- if (event.getSource() == recompileItem)
1825
+ if (source == recompileItem)
18251826 {
18261827 Recompile();
18271828 refreshContents();
18281829 } else
1829
- if (event.getSource() == editScriptItem)
1830
+ if (source == editScriptItem)
18301831 {
18311832 OpenDialog();
18321833 refreshContents();
18331834 } else
1834
- if (event.getSource() == invariantsItem)
1835
+ if (source == invariantsItem)
18351836 {
18361837 System.out.println("Invariants:");
18371838 GrafreeD.grafreeD.universe.invariants();
18381839 } else
1839
- if (event.getSource() == memoryItem)
1840
+ if (source == memoryItem)
18401841 {
18411842 //System.out.println("Invariants:");
18421843 PrintMemory();
18431844 } else
1844
- if (event.getSource() == pathItem)
1845
+ if (source == pathItem)
18451846 {
18461847 PrintPath();
18471848 } else
1848
- if (event.getSource() == analyzeItem)
1849
+ if (source == analyzeItem)
18491850 {
18501851 AnalyzeObject();
18511852 } else
1852
- if (event.getSource() == dumpItem)
1853
+ if (source == dumpItem)
18531854 {
18541855 DumpObject();
18551856 } else
1856
- if (event.getSource() == screenfitButton)
1857
+ if (source == screenfitButton)
18571858 {
18581859 //Reload(lastConverter, lastFilename, true);
18591860 ScreenFit();
18601861 } else
1861
- if (event.getSource() == screenfitpointButton)
1862
+ if (source == screenfitpointButton)
18621863 {
18631864 //Reload(lastConverter, lastFilename, true);
18641865 ScreenFitPoint();
18651866 } else
1866
- if (event.getSource() == snapobjectButton)
1867
+ if (source == snapobjectButton)
18671868 {
18681869 //Reload(lastConverter, lastFilename, true);
18691870 SnapObject();
....@@ -1874,13 +1875,13 @@
18741875 // Recompile();
18751876 // refreshContents();
18761877 // } else
1877
- if (event.getSource() == gcButton)
1878
+ if (source == gcButton)
18781879 {
18791880 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18801881 System.gc();
18811882 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18821883 } else
1883
- if (event.getSource() == editLeafItem)
1884
+ if (source == editLeafItem)
18841885 {
18851886 Object3D obj;
18861887 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1894,62 +1895,62 @@
18941895 }
18951896 refreshContents(true);
18961897 } else
1897
- if (event.getSource() == openWindowItem)
1898
+ if (source == openWindowItem)
18981899 {
18991900 EditSelection(true);
19001901 } else
1901
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1902
+ if (source == cutItem || source == clearButton)
19021903 {
19031904 loadClipboard(true);
19041905 } else
1905
- if (event.getSource() == duplicateItem)
1906
+ if (source == duplicateItem)
19061907 {
19071908 Object3D keep = GrafreeD.clipboard;
19081909 loadClipboard(false);
19091910 paste(false);
19101911 GrafreeD.clipboard = keep;
19111912 } else
1912
- if (event.getSource() == cloneItem)
1913
+ if (source == cloneItem)
19131914 {
19141915 CloneSelection(false);
19151916 } else
1916
- if (event.getSource() == cloneSupportItem)
1917
+ if (source == cloneSupportItem)
19171918 {
19181919 CloneSelection(true);
19191920 } else
1920
- if (event.getSource() == copyItem)
1921
+ if (source == copyItem)
19211922 {
19221923 loadClipboard(false);
19231924 } else
1924
- if (event.getSource() == pasteItem)
1925
+ if (source == pasteItem)
19251926 {
19261927 paste(false);
19271928 } else
1928
- if (event.getSource() == pasteLinkItem)
1929
+ if (source == pasteLinkItem)
19291930 {
19301931 pasteInto(false);
19311932 } else
1932
- if (event.getSource() == pasteCloneItem)
1933
+ if (source == pasteCloneItem)
19331934 {
19341935 pasteInto(true);
19351936 } else
1936
- if (event.getSource() == pasteExpandItem)
1937
+ if (source == pasteExpandItem)
19371938 {
19381939 paste(true);
19391940 } else
1940
- if (event.getSource() == synchronizeItem)
1941
+ if (source == synchronizeItem)
19411942 {
19421943 Overwrite(Object3D.TRANSFORM);
19431944 } else
1944
- if (event.getSource() == overwriteNameItem)
1945
+ if (source == overwriteNameItem)
19451946 {
19461947 Overwrite(Object3D.NAME);
19471948 } else
1948
- if (event.getSource() == overwriteUVItem)
1949
+ if (source == overwriteUVItem)
19491950 {
19501951 Overwrite(Object3D.UV);
19511952 } else
1952
- if (event.getSource() == overwriteMatItem)
1953
+ if (source == overwriteMatItem)
19531954 {
19541955 /* july 2015
19551956 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1969,7 +1970,7 @@
19691970
19701971 Overwrite(dropAttributes);
19711972 }
1972
- if (event.getSource() == overwriteGeoItem)
1973
+ if (source == overwriteGeoItem)
19731974 {
19741975 Overwrite(Object3D.GEOMETRY);
19751976 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1986,7 +1987,7 @@
19861987 // refreshContents();
19871988 // }
19881989 } else
1989
- if (event.getSource() == generateMeshItem)
1990
+ if (source == generateMeshItem)
19901991 {
19911992 //if (group.selection.size() == 1)
19921993 // for (int i=0; i<group.selection.size(); i++)
....@@ -1997,7 +1998,7 @@
19971998 ResetModel();
19981999 refreshContents();
19992000 } else
2000
- if (event.getSource() == extractGeometriesItem)
2001
+ if (source == extractGeometriesItem)
20012002 {
20022003 boolean one = false;
20032004
....@@ -2024,7 +2025,7 @@
20242025 ResetModel();
20252026 refreshContents();
20262027 } else
2027
- if (event.getSource() == cloneGeometriesItem)
2028
+ if (source == cloneGeometriesItem)
20282029 {
20292030 boolean one = false;
20302031
....@@ -2050,7 +2051,7 @@
20502051 ResetModel();
20512052 refreshContents();
20522053 } else
2053
- if (event.getSource() == shareGeometriesItem)
2054
+ if (source == shareGeometriesItem)
20542055 {
20552056 boolean one = false;
20562057
....@@ -2080,7 +2081,7 @@
20802081 refreshContents();
20812082 }
20822083 } else
2083
- if (event.getSource() == mergeGeometriesItem)
2084
+ if (source == mergeGeometriesItem)
20842085 {
20852086 boolean one = false;
20862087
....@@ -2110,7 +2111,7 @@
21102111 ResetModel();
21112112 refreshContents();
21122113 } else
2113
- if (event.getSource() == linkverticesItem)
2114
+ if (source == linkverticesItem)
21142115 {
21152116 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21162117 // {
....@@ -2143,7 +2144,7 @@
21432144 refreshContents();
21442145 }
21452146 } else
2146
- if (event.getSource() == resetsupportItem)
2147
+ if (source == resetsupportItem)
21472148 {
21482149 for (int i=0; i<group.selection.size(); i++)
21492150 {
....@@ -2155,7 +2156,7 @@
21552156
21562157 refreshContents();
21572158 } else
2158
- if (event.getSource() == relinkverticesItem)
2159
+ if (source == relinkverticesItem)
21592160 {
21602161 boolean random = CameraPane.RANDOM;
21612162 CameraPane.RANDOM = false; // parse all random nodes
....@@ -2164,7 +2165,7 @@
21642165
21652166 refreshContents();
21662167 } else
2167
- if (event.getSource() == resetreferencesItem)
2168
+ if (source == resetreferencesItem)
21682169 {
21692170 for (int i=0; i<group.selection.size(); i++)
21702171 {
....@@ -2173,7 +2174,7 @@
21732174
21742175 refreshContents();
21752176 } else
2176
- if (event.getSource() == setMasterItem)
2177
+ if (source == setMasterItem)
21772178 {
21782179 if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21792180 {
....@@ -2186,7 +2187,7 @@
21862187 refreshContents();
21872188 }
21882189 } else
2189
- if (event.getSource() == poseMeshItem)
2190
+ if (source == poseMeshItem)
21902191 {
21912192 if (group.selection.size() == 1)
21922193 {
....@@ -2205,19 +2206,19 @@
22052206 }
22062207
22072208 } else
2208
- if (event.getSource() == revertMeshItem)
2209
+ if (source == revertMeshItem)
22092210 {
22102211 RevertMeshes();
22112212 } else
2212
- if (event.getSource() == resetMeshItem)
2213
+ if (source == resetMeshItem)
22132214 {
22142215 ResetAll();
22152216 } else
2216
- if (event.getSource() == stepAllItem)
2217
+ if (source == stepAllItem)
22172218 {
22182219 StepAll();
22192220 } else
2220
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2221
+ if (source == clearItem) // || event.getSource() == clearButton)
22212222 {
22222223 //int indices[] = jList.getSelectedIndices();
22232224 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2225,46 +2226,46 @@
22252226
22262227 ClearSelection(false);
22272228 } else
2228
- if (event.getSource() == clearAllItem)
2229
+ if (source == clearAllItem)
22292230 {
22302231 ClearSelection(true);
22312232 } else
2232
- if (event.getSource() == grabItem)
2233
+ if (source == grabItem)
22332234 {
22342235 group(new cGroup(), true);
22352236 } else
2236
- if (event.getSource() == hideItem)
2237
+ if (source == hideItem)
22372238 {
22382239 group(new HiddenObject());
22392240 } else
2240
- if (event.getSource() == frontItem)
2241
+ if (source == frontItem)
22412242 {
22422243 front();
22432244 } else
2244
- if (event.getSource() == backItem)
2245
+ if (source == backItem)
22452246 {
22462247 back();
22472248 } else
2248
- if (event.getSource() == cameraItem)
2249
+ if (source == cameraItem)
22492250 {
22502251 makeSomething(new Camera());
22512252 } else
2252
- if (event.getSource() == compositeItem)
2253
+ if (source == compositeItem)
22532254 {
22542255 group(new Composite());
22552256 } else
2256
- if (event.getSource() == randomItem)
2257
+ if (source == randomItem)
22572258 {
22582259 RandomNode random = new RandomNode();
22592260 group(random);
22602261 if (random.size() > 0)
22612262 random.name = random.get(0).name + "Rnd";
22622263 } else
2263
- if (event.getSource() == physicsItem)
2264
+ if (source == physicsItem)
22642265 {
22652266 group(new PhysicsNode());
22662267 } else
2267
- if (event.getSource() == frameselectorItem)
2268
+ if (source == frameselectorItem)
22682269 {
22692270 for (int i=0; i<group.selection.size(); i++)
22702271 {
....@@ -2276,7 +2277,7 @@
22762277 ResetModel();
22772278 refreshContents();
22782279 } else
2279
- if (event.getSource() == switchGeoItem)
2280
+ if (source == switchGeoItem)
22802281 {
22812282 for (int i=0; i<group.selection.size(); i++)
22822283 {
....@@ -2288,7 +2289,7 @@
22882289 ResetModel();
22892290 refreshContents();
22902291 } else
2291
- if (event.getSource() == switchTransfoItem)
2292
+ if (source == switchTransfoItem)
22922293 {
22932294 for (int i=0; i<group.selection.size(); i++)
22942295 {
....@@ -2300,7 +2301,7 @@
23002301 ResetModel();
23012302 refreshContents();
23022303 } else
2303
- if (event.getSource() == morphItem)
2304
+ if (source == morphItem)
23042305 {
23052306 for (int i=0; i<group.selection.size(); i++)
23062307 {
....@@ -2312,7 +2313,7 @@
23122313 ResetModel();
23132314 refreshContents();
23142315 } else
2315
- if (event.getSource() == scriptNodeItem)
2316
+ if (source == scriptNodeItem)
23162317 {
23172318 boolean atleastone = false;
23182319
....@@ -2351,31 +2352,31 @@
23512352 }
23522353 }
23532354 } else
2354
- if (event.getSource() == linkerItem)
2355
+ if (source == linkerItem)
23552356 {
23562357 group(new cLinker());
23572358 } else
2358
- if (event.getSource() == textureItem)
2359
+ if (source == textureItem)
23592360 {
23602361 group(new TextureNode());
23612362 } else
2362
- if (event.getSource() == billboardItem)
2363
+ if (source == billboardItem)
23632364 {
23642365 group(new BillboardNode());
23652366 } else
2366
- if (event.getSource() == shadowXItem)
2367
+ if (source == shadowXItem)
23672368 {
23682369 CastShadow(0);
23692370 } else
2370
- if (event.getSource() == shadowYItem)
2371
+ if (source == shadowYItem)
23712372 {
23722373 CastShadow(1);
23732374 } else
2374
- if (event.getSource() == shadowZItem)
2375
+ if (source == shadowZItem)
23752376 {
23762377 CastShadow(2);
23772378 } else
2378
- if (event.getSource() == ungroupItem)
2379
+ if (source == ungroupItem)
23792380 {
23802381 //ungroup();
23812382 for (int i=0; i<group.selection.size(); i++)
....@@ -2387,179 +2388,179 @@
23872388
23882389 refreshContents();
23892390 } else
2390
- if (event.getSource() == genUVItem)
2391
+ if (source == genUVItem)
23912392 {
23922393 GenUV();
23932394 } else
2394
- if (event.getSource() == genNormalsCADItem)
2395
+ if (source == genNormalsCADItem)
23952396 {
23962397 GenNormals(true);
23972398 } else
2398
- if (event.getSource() == genNormalsMESHItem)
2399
+ if (source == genNormalsMESHItem)
23992400 {
24002401 GenNormals(true); // TODO
24012402 } else
2402
- if (event.getSource() == genNormalsORGANItem)
2403
+ if (source == genNormalsORGANItem)
24032404 {
24042405 GenNormals(false);
24052406 } else
2406
- if (event.getSource() == genNormalsMINEItem)
2407
+ if (source == genNormalsMINEItem)
24072408 {
24082409 GenNormalsMINE();
24092410 } else
2410
- if (event.getSource() == stripifyItem)
2411
+ if (source == stripifyItem)
24112412 {
24122413 Stripify();
24132414 } else
2414
- if (event.getSource() == unstripifyItem)
2415
+ if (source == unstripifyItem)
24152416 {
24162417 Unstripify();
24172418 } else
2418
- if (event.getSource() == trimItem)
2419
+ if (source == trimItem)
24192420 {
24202421 Trim();
24212422 } else
2422
- if (event.getSource() == untrimItem)
2423
+ if (source == untrimItem)
24232424 {
24242425 Untrim();
24252426 } else
2426
- if (event.getSource() == clearColorsItem)
2427
+ if (source == clearColorsItem)
24272428 {
24282429 ClearColors();
24292430 } else
2430
- if (event.getSource() == clearMaterialsItem)
2431
+ if (source == clearMaterialsItem)
24312432 {
24322433 ClearMaterials();
24332434 } else
2434
- if (event.getSource() == liveleavesItem)
2435
+ if (source == liveleavesItem)
24352436 {
24362437 LiveLeaves(true);
24372438 } else
2438
- if (event.getSource() == unliveleavesItem)
2439
+ if (source == unliveleavesItem)
24392440 {
24402441 LiveLeaves(false);
24412442 } else
2442
- if (event.getSource() == supportleavesItem)
2443
+ if (source == supportleavesItem)
24432444 {
24442445 SupportLeaves(true);
24452446 } else
2446
- if (event.getSource() == unsupportleavesItem)
2447
+ if (source == unsupportleavesItem)
24472448 {
24482449 SupportLeaves(false);
24492450 } else
2450
- if (event.getSource() == hideleavesItem)
2451
+ if (source == hideleavesItem)
24512452 {
24522453 HideLeaves(true);
24532454 } else
2454
- if (event.getSource() == showleavesItem)
2455
+ if (source == showleavesItem)
24552456 {
24562457 HideLeaves(false);
24572458 } else
2458
- if (event.getSource() == markleavesItem)
2459
+ if (source == markleavesItem)
24592460 {
24602461 MarkLeaves(true);
24612462 } else
2462
- if (event.getSource() == unmarkleavesItem)
2463
+ if (source == unmarkleavesItem)
24632464 {
24642465 MarkLeaves(false);
24652466 } else
2466
- if (event.getSource() == flipVItem)
2467
+ if (source == flipVItem)
24672468 {
24682469 FlipV(true);
24692470 } else
2470
- if (event.getSource() == unflipVItem)
2471
+ if (source == unflipVItem)
24712472 {
24722473 FlipV(false);
24732474 } else
2474
- if (event.getSource() == lowTexturesItem)
2475
+ if (source == lowTexturesItem)
24752476 {
24762477 SetTexRes(0);
24772478 } else
2478
- if (event.getSource() == normalTexturesItem)
2479
+ if (source == normalTexturesItem)
24792480 {
24802481 SetTexRes(1);
24812482 } else
2482
- if (event.getSource() == highTexturesItem)
2483
+ if (source == highTexturesItem)
24832484 {
24842485 SetTexRes(2);
24852486 } else
2486
- if (event.getSource() == veryhighTexturesItem)
2487
+ if (source == veryhighTexturesItem)
24872488 {
24882489 SetTexRes(3);
24892490 } else
2490
- if (event.getSource() == maxTexturesItem)
2491
+ if (source == maxTexturesItem)
24912492 {
24922493 SetTexRes(4);
24932494 } else
2494
- if (event.getSource() == panoTexturesItem)
2495
+ if (source == panoTexturesItem)
24952496 {
24962497 SetTexRes(5);
24972498 } else
2498
- if (event.getSource() == reverseNormalsItem)
2499
+ if (source == reverseNormalsItem)
24992500 {
25002501 ReverseNormals();
25012502 } else
2502
- if (event.getSource() == parseverticesItem)
2503
+ if (source == parseverticesItem)
25032504 {
25042505 ParseVertices();
25052506 } else
2506
- if (event.getSource() == textureFieldItem)
2507
+ if (source == textureFieldItem)
25072508 {
25082509 TextureVertices();
25092510 } else
2510
- if (event.getSource() == alignItem)
2511
+ if (source == alignItem)
25112512 {
25122513 Align();
25132514 } else
2514
- if (event.getSource() == mirrorItem)
2515
+ if (source == mirrorItem)
25152516 {
25162517 MirrorPoses();
25172518 } else
2518
- if (event.getSource() == reduceMorphItem)
2519
+ if (source == reduceMorphItem)
25192520 {
25202521 MeshReduction(false);
25212522 } else
2522
- if (event.getSource() == reduce34MorphItem)
2523
+ if (source == reduce34MorphItem)
25232524 {
25242525 MeshReduction(true);
25252526 } else
2526
- if (event.getSource() == reverseTrianglesItem)
2527
+ if (source == reverseTrianglesItem)
25272528 {
25282529 ReverseTriangles();
25292530 } else
2530
- if (event.getSource() == reduceMeshItem)
2531
+ if (source == reduceMeshItem)
25312532 {
25322533 ReduceMesh(false);
25332534 } else
2534
- if (event.getSource() == reduce34MeshItem)
2535
+ if (source == reduce34MeshItem)
25352536 {
25362537 ReduceMesh(true);
25372538 } else
2538
- if (event.getSource() == increaseMeshItem)
2539
+ if (source == increaseMeshItem)
25392540 {
25402541 IncreaseMesh();
25412542 } else
2542
- if (event.getSource() == clipMeshItem)
2543
+ if (source == clipMeshItem)
25432544 {
25442545 ClipMesh();
25452546 } else
2546
- if (event.getSource() == smoothMeshItem)
2547
+ if (source == smoothMeshItem)
25472548 {
25482549 SmoothMesh();
25492550 } else
2550
- if (event.getSource() == transformgeometryItem)
2551
+ if (source == transformgeometryItem)
25512552 {
25522553 TransformGeometry();
25532554 } else
2554
- if (event.getSource() == resetTransformItem)
2555
+ if (source == resetTransformItem)
25552556 {
25562557 ResetTransform();
25572558 } else
2558
- if (event.getSource() == resetCentroidItem)
2559
+ if (source == resetCentroidItem)
25592560 {
25602561 ResetCentroid();
25612562 } else
2562
- if (event.getSource() == resetParentItem)
2563
+ if (source == resetParentItem)
25632564 {
25642565 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25652566 {
....@@ -2569,7 +2570,7 @@
25692570
25702571 refreshContents();
25712572 } else
2572
- if (event.getSource() == repairParentItem)
2573
+ if (source == repairParentItem)
25732574 {
25742575 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25752576 {
....@@ -2583,7 +2584,7 @@
25832584
25842585 refreshContents();
25852586 } else
2586
- if (event.getSource() == repairShadowItem)
2587
+ if (source == repairShadowItem)
25872588 {
25882589 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25892590 {
....@@ -2597,7 +2598,7 @@
25972598
25982599 refreshContents();
25992600 } else
2600
- if (event.getSource() == sortbysizeItem)
2601
+ if (source == sortbysizeItem)
26012602 {
26022603 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
26032604 {
....@@ -2609,7 +2610,7 @@
26092610 ResetModel();
26102611 refreshContents();
26112612 } else
2612
- if (event.getSource() == sortbynameItem)
2613
+ if (source == sortbynameItem)
26132614 {
26142615 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
26152616 {
....@@ -2621,7 +2622,7 @@
26212622 ResetModel();
26222623 refreshContents();
26232624 } else
2624
- if (event.getSource() == attachPigmentItem)
2625
+ if (source == attachPigmentItem)
26252626 {
26262627 String texture = GetFile("Attach pigment");
26272628 Object3D obj;
....@@ -2633,7 +2634,7 @@
26332634
26342635 refreshContents();
26352636 } else
2636
- if (event.getSource() == detachPigmentItem)
2637
+ if (source == detachPigmentItem)
26372638 {
26382639 Object3D obj;
26392640 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2644,7 +2645,7 @@
26442645
26452646 refreshContents();
26462647 } else
2647
- if (event.getSource() == attachBumpItem)
2648
+ if (source == attachBumpItem)
26482649 {
26492650 String texture = GetFile("Attach bump");
26502651 Object3D obj;
....@@ -2656,7 +2657,7 @@
26562657
26572658 refreshContents();
26582659 } else
2659
- if (event.getSource() == detachBumpItem)
2660
+ if (source == detachBumpItem)
26602661 {
26612662 Object3D obj;
26622663 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2667,7 +2668,7 @@
26672668
26682669 refreshContents();
26692670 } else
2670
- if (event.getSource() == pigmentBumpItem)
2671
+ if (source == pigmentBumpItem)
26712672 {
26722673 Object3D obj;
26732674 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2678,158 +2679,195 @@
26782679
26792680 refreshContents();
26802681 } else
2681
- if (event.getSource() == flashSelectionButton)
2682
+ if (source == flashSelectionButton)
26822683 {
26832684 CameraPane.flash = true;
26842685 refreshContents();
26852686 } else
2686
- if (event.getSource() == oneButton)
2687
+ if (source == oneButton)
26872688 {
26882689 } else
2689
- if (event.getSource() == twoButton)
2690
+ if (source == twoButton)
26902691 {
26912692 radio.layout = twoButton;
26922693 // bug
26932694 //gridPanel.setDividerLocation(1.0);
26942695 //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();
2696
+// bigThree.remove(scenePanel);
2697
+// bigThree.remove(centralPanel);
2698
+// bigThree.remove(XYZPanel);
2699
+// aWindowConstraints.gridx = 0;
2700
+// aWindowConstraints.gridy = 0;
2701
+// aWindowConstraints.gridwidth = 1;
2702
+// // aConstraints.gridheight = 3;
2703
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2704
+// aWindowConstraints.weightx = 0;
2705
+// aWindowConstraints.weighty = 1;
2706
+// //bigThree.add(jtp, aWindowConstraints);
2707
+// aWindowConstraints.weightx = 1;
2708
+// aWindowConstraints.gridwidth = 3;
2709
+// // aConstraints.gridheight = 3;
2710
+// aWindowConstraints.gridx = 1;
2711
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2712
+// bigThree.add(centralPanel, aWindowConstraints);
2713
+// aWindowConstraints.weightx = 0;
2714
+// aWindowConstraints.gridx = 4;
2715
+// aWindowConstraints.gridwidth = 1;
2716
+// // aConstraints.gridheight = 3;
2717
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2718
+// //bigThree.add(XYZPanel, aWindowConstraints);
2719
+// scenePanel.setVisible(false);
2720
+// centralPanel.setVisible(true);
2721
+// XYZPanel.setVisible(false);
2722
+ bigThree.ClearUI();
2723
+ bigThree.addComponent(centralPanel);
2724
+ bigThree.FlushUI();
27192725 } else
2720
- if (event.getSource() == threeButton)
2726
+ if (source == threeButton)
27212727 {
27222728 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();
2729
+
2730
+// bigThree.remove(scenePanel);
2731
+// bigThree.remove(centralPanel);
2732
+// bigThree.remove(XYZPanel);
2733
+// aWindowConstraints.gridx = 0;
2734
+// aWindowConstraints.gridy = 0;
2735
+// aWindowConstraints.gridwidth = 1;
2736
+// // aConstraints.gridheight = 3;
2737
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2738
+// aWindowConstraints.weightx = 0;
2739
+// aWindowConstraints.weighty = 1;
2740
+// //bigThree.add(jtp, aWindowConstraints);
2741
+// aWindowConstraints.weightx = 1;
2742
+// aWindowConstraints.gridwidth = 3;
2743
+// // aConstraints.gridheight = 3;
2744
+// aWindowConstraints.gridx = 1;
2745
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2746
+// bigThree.add(centralPanel, aWindowConstraints);
2747
+// aWindowConstraints.weightx = 0;
2748
+// aWindowConstraints.gridx = 4;
2749
+// aWindowConstraints.gridwidth = 1;
2750
+// // aConstraints.gridheight = 3;
2751
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2752
+// bigThree.add(XYZPanel, aWindowConstraints);
2753
+// bigThree.validate();
2754
+// scenePanel.setVisible(false);
2755
+// centralPanel.setVisible(true);
2756
+// XYZPanel.setVisible(true);
2757
+ bigThree.ClearUI();
2758
+ bigThree.addComponent(centralPanel);
2759
+ bigThree.addComponent(XYZPanel);
2760
+ bigThree.FlushUI();
27472761 } else
2748
- if (event.getSource() == fourButton)
2762
+ if (source == fourButton)
27492763 {
27502764 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();
2765
+
2766
+// bigThree.remove(scenePanel);
2767
+// bigThree.remove(centralPanel);
2768
+// bigThree.remove(XYZPanel);
2769
+// aWindowConstraints.gridx = 0;
2770
+// aWindowConstraints.gridy = 0;
2771
+// aWindowConstraints.gridwidth = 1;
2772
+// // aWindowConstraints.gridheight = 3;
2773
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2774
+// aWindowConstraints.weightx = 1;
2775
+// aWindowConstraints.weighty = 1;
2776
+// bigThree.add(scenePanel, aWindowConstraints);
2777
+// aWindowConstraints.weightx = 1;
2778
+// aWindowConstraints.gridwidth = 3;
2779
+// // aConstraints.gridheight = 3;
2780
+// aWindowConstraints.gridx = 1;
2781
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2782
+// //bigThree.add(cameraPanel, aWindowConstraints);
2783
+// aWindowConstraints.weightx = 0;
2784
+// aWindowConstraints.gridx = 4;
2785
+// aWindowConstraints.gridwidth = 1;
2786
+// // aWindowConstraints.gridheight = 3;
2787
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2788
+// //bigThree.add(XYZPanel, aWindowConstraints);
2789
+// bigThree.validate();
2790
+// scenePanel.setVisible(true);
2791
+// centralPanel.setVisible(false);
2792
+// XYZPanel.setVisible(false);
2793
+ bigThree.ClearUI();
2794
+ bigThree.addComponent(scenePanel);
2795
+ bigThree.FlushUI();
27752796 } else
2776
- if (event.getSource() == sixButton)
2797
+ if (source == sixButton)
27772798 {
27782799 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();
2800
+
2801
+// bigThree.remove(scenePanel);
2802
+// bigThree.remove(centralPanel);
2803
+// bigThree.remove(XYZPanel);
2804
+// aWindowConstraints.gridx = 0;
2805
+// aWindowConstraints.gridy = 0;
2806
+// aWindowConstraints.gridwidth = 1;
2807
+// // aConstraints.gridheight = 3;
2808
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2809
+// aWindowConstraints.weightx = 0;
2810
+// aWindowConstraints.weighty = 1;
2811
+// bigThree.add(scenePanel, aWindowConstraints);
2812
+// aWindowConstraints.weightx = 1;
2813
+// aWindowConstraints.gridwidth = 3;
2814
+// // aWindowConstraints.gridheight = 3;
2815
+// aWindowConstraints.gridx = 1;
2816
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2817
+// bigThree.add(centralPanel, aWindowConstraints);
2818
+// aWindowConstraints.weightx = 0;
2819
+// aWindowConstraints.gridx = 4;
2820
+// aWindowConstraints.gridwidth = 1;
2821
+// // aWindowConstraints.gridheight = 3;
2822
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2823
+// //bigThree.add(XYZPanel, aConstraints);
2824
+// bigThree.validate();
2825
+// scenePanel.setVisible(true);
2826
+// centralPanel.setVisible(true);
2827
+// XYZPanel.setVisible(false);
2828
+ bigThree.ClearUI();
2829
+ bigThree.addComponent(scenePanel);
2830
+ bigThree.addComponent(centralPanel);
2831
+ bigThree.FlushUI();
28032832 } else
2804
- if (event.getSource() == sevenButton)
2833
+ if (source == sevenButton)
28052834 {
28062835 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();
2836
+
2837
+// bigThree.remove(scenePanel);
2838
+// bigThree.remove(centralPanel);
2839
+// bigThree.remove(XYZPanel);
2840
+// aWindowConstraints.gridx = 0;
2841
+// aWindowConstraints.gridy = 0;
2842
+// aWindowConstraints.gridwidth = 1;
2843
+// // aWindowConstraints.gridheight = 3;
2844
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2845
+// aWindowConstraints.weightx = 0;
2846
+// aWindowConstraints.weighty = 1;
2847
+// bigThree.add(scenePanel, aWindowConstraints);
2848
+// aWindowConstraints.weightx = 1;
2849
+// aWindowConstraints.gridwidth = 3;
2850
+// // aWindowConstraints.gridheight = 3;
2851
+// aWindowConstraints.gridx = 1;
2852
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2853
+// bigThree.add(centralPanel, aWindowConstraints);
2854
+// aWindowConstraints.weightx = 0;
2855
+// aWindowConstraints.gridx = 4;
2856
+// aWindowConstraints.gridwidth = 1;
2857
+// // aConstraints.gridheight = 3;
2858
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2859
+// bigThree.add(XYZPanel, aWindowConstraints);
2860
+// bigThree.validate();
2861
+// scenePanel.setVisible(true);
2862
+// centralPanel.setVisible(true);
2863
+// XYZPanel.setVisible(true);
2864
+ bigThree.ClearUI();
2865
+ bigThree.addComponent(scenePanel);
2866
+ bigThree.addComponent(centralPanel);
2867
+ bigThree.addComponent(XYZPanel);
2868
+ bigThree.FlushUI();
28312869 } else
2832
- if (event.getSource() == rootButton)
2870
+ if (source == rootButton)
28332871 {
28342872 Object3D obj;
28352873 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2841,7 +2879,7 @@
28412879
28422880 refreshContents(true);
28432881 } else
2844
- if (event.getSource() == closeButton)
2882
+ if (source == closeButton)
28452883 {
28462884 //System.out.println("CLOSE: " + buttonGroup.getSelection());
28472885 cRadio ab;
....@@ -2862,11 +2900,11 @@
28622900 }
28632901 refreshContents(true);
28642902 } else
2865
- if (event.getSource() == editItem || event.getSource() == editButton)
2903
+ if (source == editItem || source == editButton)
28662904 {
28672905 EditSelection(false);
28682906 } else
2869
- if (event.getSource() == uneditButton)
2907
+ if (source == uneditButton)
28702908 {
28712909 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28722910 {
....@@ -2883,7 +2921,7 @@
28832921 //objEditor.ResetSliders();
28842922 refreshContents(true);
28852923 } else
2886
- if (event.getSource() == clearPanelButton)
2924
+ if (source == clearPanelButton)
28872925 {
28882926 assert(copy == group);
28892927 //copy.ClearUI();
....@@ -2894,7 +2932,7 @@
28942932 listUI.clear();
28952933 refreshContents(true);
28962934 } else
2897
- if (event.getSource() == allParamsButton)
2935
+ if (source == allParamsButton)
28982936 {
28992937 assert(copy == group);
29002938
....@@ -2915,19 +2953,19 @@
29152953
29162954 refreshContents(true);
29172955 } else
2918
- if (event.getSource() == unselectButton)
2956
+ if (source == unselectButton)
29192957 {
29202958 objEditor.jTree.clearSelection();
29212959 // ?? oct 2012 GrafreeD.clipboard.clear();
29222960 objEditor.ResetSliders();
29232961 refreshContents(true);
29242962 } else
2925
- if(event.getSource() instanceof cRadio)
2963
+ if(source instanceof cRadio)
29262964 {
29272965 group.parent = keepparent;
29282966 group.attributes = 0;
29292967 //group.editWindow = null;
2930
- /*cRadio*/ radio = (cRadio)event.getSource();
2968
+ /*cRadio*/ radio = (cRadio)source;
29312969 Object3D obj = radio.GetObject();
29322970 System.out.println("Edit " + obj);
29332971 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
ObjEditor.java
....@@ -19,6 +19,8 @@
1919 import //weka.core.
2020 matrix.Matrix;
2121
22
+import grafeme.ui.*;
23
+
2224 class ObjEditor /*extends JFrame*/ implements iCallBack, ObjectUI,
2325 ActionListener, ChangeListener,
2426 InputMethodListener,
....@@ -1217,12 +1219,12 @@
12171219 //frontView.object = copy;
12181220 //sideView.object = copy;
12191221
1220
- XYZPanel = new JPanel();
1221
- XYZPanel.setLayout(new GridLayout(3, 1, 5, 5));
1222
+ XYZPanel = new cGridBag().setVertical(true);
1223
+ //XYZPanel.setLayout(new GridLayout(3, 1, 5, 5));
12221224
1223
- XYZPanel.add(/*BorderLayout.SOUTH,*/sideView); // Scroll);
1224
- XYZPanel.add(/*BorderLayout.CENTER,*/frontView); // Scroll);
1225
- XYZPanel.add(/*BorderLayout.NORTH,*/topView); // Scroll);
1225
+ XYZPanel.addComponent(/*BorderLayout.SOUTH,*/sideView); // Scroll);
1226
+ XYZPanel.addComponent(/*BorderLayout.CENTER,*/frontView); // Scroll);
1227
+ XYZPanel.addComponent(/*BorderLayout.NORTH,*/topView); // Scroll);
12261228
12271229 /*
12281230 gridPanel = new JPanel(); //new BorderLayout());
....@@ -1330,6 +1332,7 @@
13301332 //bigPanel.setSize(new Dimension(10,10));
13311333 //bigPanel.add(ctrlPanel);
13321334 //bigPanel.add(gridPanel);
1335
+ /**
13331336 bigThree = new JPanel();
13341337 //big.setLayout(new FlowLayout(FlowLayout.LEFT));
13351338 bigThree.setLayout(new GridBagLayout()); //1,3,5,5));
....@@ -1353,7 +1356,13 @@
13531356 // aConstraints.gridheight = 3;
13541357 aWindowConstraints.fill = GridBagConstraints.VERTICAL;
13551358 bigThree.add(XYZPanel, aWindowConstraints);
1359
+ /**/
13561360
1361
+ bigThree = new cGridBag();
1362
+ bigThree.addComponent(scenePanel);
1363
+ bigThree.addComponent(centralPanel);
1364
+ bigThree.addComponent(XYZPanel);
1365
+
13571366 // // SIDE EFFECT!!!
13581367 // aConstraints.gridx = 0;
13591368 // aConstraints.gridy = 0;
....@@ -4546,10 +4555,10 @@
45464555 JScrollPane infoPanel;
45474556 JPanel optionsPanel;
45484557 JTabbedPane objectPanel;
4549
- JPanel XYZPanel;
4558
+ cGridBag XYZPanel;
45504559 JSplitPane gridPanel;
45514560 JSplitPane bigPanel;
4552
- JPanel bigThree;
4561
+ cGridBag bigThree;
45534562 JTabbedPane scenePanel;
45544563 JPanel centralPanel;
45554564 JSplitPane cameraPanel;