Normand Briere
2019-04-29 c0c300a9dbd4c0fc127e003e9481d3f9246bbe7a
GroupEditor.java
....@@ -434,6 +434,9 @@
434434 oe.buttonGroup.add(dummyButton);
435435 */
436436 aConstraints.gridy += 1;
437
+
438
+ //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
439
+
437440 oe.aConstraints.gridwidth = 1;
438441 oe.aConstraints.gridx = 0;
439442
....@@ -442,76 +445,7 @@
442445 liveCB.addItemListener(this);
443446
444447 oe.aConstraints.gridx += 1;
445
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), oe.aConstraints);
446
- fastCB.setToolTipText("Fast mode");
447
- fastCB.addItemListener(this);
448
- oe.aConstraints.gridx += 1;
449
- oe.toolbarPanel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), oe.aConstraints);
450
- supportCB.setToolTipText("Enabled rigging");
451
- supportCB.addItemListener(this);
452
-
453
- // oe.aConstraints.gridx += 1;
454
- // oe.toolbarPanel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), oe.aConstraints);
455
- // localCB.addItemListener(this);
456
-
457
- oe.aConstraints.gridx += 1;
458
- oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD), oe.aConstraints);
459
- crowdCB.setToolTipText("Used for crowds");
460
- crowdCB.addItemListener(this);
461
-
462
- oe.aConstraints.gridx += 1;
463
- oe.toolbarPanel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), oe.aConstraints);
464
- smoothCB.setToolTipText("Snapping delay");
465
- smoothCB.addItemListener(this);
466
-
467
- oe.aConstraints.gridx += 1;
468
- oe.toolbarPanel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), oe.aConstraints);
469
- slowCB.setToolTipText("Smooth interpolation");
470
- slowCB.addItemListener(this);
471
- oe.aConstraints.gridx += 1;
472
- oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE), oe.aConstraints);
473
- boxCB.setToolTipText("Display bounding boxes");
474
- boxCB.addItemListener(this);
475
- oe.aConstraints.gridx += 1;
476
- oe.toolbarPanel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE), oe.aConstraints);
477
- zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
478
- zoomBoxCB.addItemListener(this);
479
-
480
-// oe.aConstraints.gridx += 1;
481
-// oe.toolbarPanel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), oe.aConstraints);
482
-// speakerMocapCB.addItemListener(this);
483
-
484
- if (false)
485
- {
486
- // handled in scripts
487
- oe.aConstraints.gridx += 1;
488
- oe.toolbarPanel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), oe.aConstraints);
489
- speakerCameraCB.addItemListener(this);
490
-
491
- oe.aConstraints.gridx += 1;
492
- oe.toolbarPanel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), oe.aConstraints);
493
- speakerFocusCB.addItemListener(this);
494
-
495
- oe.aConstraints.gridx += 1;
496
- oe.toolbarPanel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), oe.aConstraints);
497
- smoothfocusCB.addItemListener(this);
498
- }
499
-
500
-//oe.aConstraints.gridx += 1;
501
-//oe.toolbarPanel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), oe.aConstraints);
502
-// debugCB.addItemListener(this);
503
-
504
- oe.aConstraints.gridx += 1;
505
- oe.toolbarPanel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL), oe.aConstraints);
506
- oeilCB.addItemListener(this);
507
-
508
- oe.aConstraints.gridx += 1;
509
- oe.toolbarPanel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT), oe.aConstraints);
510
- lookAtCB.setToolTipText("Look-at target");
511
- lookAtCB.addItemListener(this);
512
-
513
- oe.aConstraints.gridx += 1;
514
- oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK), oe.aConstraints);
448
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK), oe.aConstraints);
515449 trackCB.setToolTipText("Enable tracking");
516450 trackCB.addItemListener(this);
517451
....@@ -669,6 +603,80 @@
669603 radio.layout = sevenButton;
670604 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
671605 }
606
+
607
+ void AddOptions(JPanel panel, GridBagConstraints constraints)
608
+ {
609
+ constraints.gridx = 0;
610
+ constraints.gridy = 0;
611
+ panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), constraints);
612
+ fastCB.setToolTipText("Fast mode");
613
+ fastCB.addItemListener(this);
614
+ constraints.gridy += 1;
615
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), constraints);
616
+ supportCB.setToolTipText("Enabled rigging");
617
+ supportCB.addItemListener(this);
618
+
619
+ // constraints.gridy += 1;
620
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
621
+ // localCB.addItemListener(this);
622
+
623
+ constraints.gridy += 1;
624
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD), constraints);
625
+ crowdCB.setToolTipText("Used for crowds");
626
+ crowdCB.addItemListener(this);
627
+
628
+ constraints.gridy += 1;
629
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), constraints);
630
+ smoothCB.setToolTipText("Snapping delay");
631
+ smoothCB.addItemListener(this);
632
+
633
+ constraints.gridy += 1;
634
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), constraints);
635
+ slowCB.setToolTipText("Smooth interpolation");
636
+ slowCB.addItemListener(this);
637
+ constraints.gridy += 1;
638
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE), constraints);
639
+ boxCB.setToolTipText("Display bounding boxes");
640
+ boxCB.addItemListener(this);
641
+ constraints.gridy += 1;
642
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE), constraints);
643
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
644
+ zoomBoxCB.addItemListener(this);
645
+
646
+// constraints.gridy += 1;
647
+// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
648
+// speakerMocapCB.addItemListener(this);
649
+
650
+ if (false)
651
+ {
652
+ // handled in scripts
653
+ constraints.gridy += 1;
654
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), constraints);
655
+ speakerCameraCB.addItemListener(this);
656
+
657
+ constraints.gridy += 1;
658
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), constraints);
659
+ speakerFocusCB.addItemListener(this);
660
+
661
+ constraints.gridy += 1;
662
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), constraints);
663
+ smoothfocusCB.addItemListener(this);
664
+ }
665
+
666
+//constraints.gridx += 1;
667
+//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
668
+// debugCB.addItemListener(this);
669
+
670
+ constraints.gridy += 1;
671
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL), constraints);
672
+ oeilCB.addItemListener(this);
673
+
674
+ constraints.gridy += 1;
675
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT), constraints);
676
+ lookAtCB.setToolTipText("Look-at target");
677
+ lookAtCB.addItemListener(this);
678
+
679
+ }
672680
673681 void EditObject(Object3D obj)
674682 {
....@@ -1510,6 +1518,7 @@
15101518 //
15111519 public void actionPerformed(ActionEvent event) // , Object arg)
15121520 {
1521
+ Object source = event.getSource();
15131522 /*
15141523 if (event.getSource() == nameField)
15151524 {
....@@ -1521,11 +1530,11 @@
15211530 }
15221531 else
15231532 */
1524
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1533
+ if (source == lookAtItem || source == lookFromItem)
15251534 {
15261535 ScreenFit();
15271536 } else
1528
- if (event.getSource() == switchItem)
1537
+ if (source == switchItem)
15291538 {
15301539 cVector v1 = new cVector();
15311540 cVector v2 = new cVector();
....@@ -1534,11 +1543,11 @@
15341543 objEditor.cameraView.renderCamera.setAim(v2, v1);
15351544 objEditor.cameraView.repaint();
15361545 } else
1537
- if (event.getSource() == rectoidItem)
1546
+ if (source == rectoidItem)
15381547 {
15391548 makeSomething(new Box());
15401549 } else
1541
- if (event.getSource() == particleItem)
1550
+ if (source == particleItem)
15421551 {
15431552 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15441553 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1559,9 +1568,9 @@
15591568 applyExample(particleGeom, "SMOKE");
15601569 makeSomething(particleGeom);
15611570 } else
1562
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1571
+ if (source == ragdollItem || source == ragdoll2Item)
15631572 {
1564
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1573
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15651574
15661575 ragdoll.toParent = LA.newMatrix();
15671576 ragdoll.fromParent = LA.newMatrix();
....@@ -1579,7 +1588,7 @@
15791588 } else
15801589 /*
15811590 */
1582
- if (event.getSource() == heightFieldItem)
1591
+ if (source == heightFieldItem)
15831592 {
15841593 Object3D obj = new Object3D();
15851594
....@@ -1617,31 +1626,31 @@
16171626
16181627 makeSomething(obj);
16191628 } else
1620
- if (event.getSource() == gridItem)
1629
+ if (source == gridItem)
16211630 {
16221631 makeSomething(new Grid());
16231632 } else
1624
- if (event.getSource() == ellipsoidItem)
1633
+ if (source == ellipsoidItem)
16251634 {
16261635 makeSomething(new Sphere());
16271636 } else
1628
- if (event.getSource() == coneItem)
1637
+ if (source == coneItem)
16291638 {
16301639 makeSomething(new Cone());
16311640 } else
1632
- if (event.getSource() == torusItem)
1641
+ if (source == torusItem)
16331642 {
16341643 makeSomething(new Torus());
16351644 } else
1636
- if (event.getSource() == superItem)
1645
+ if (source == superItem)
16371646 {
16381647 makeSomething(new Superellipsoid());
16391648 } else
1640
- if (event.getSource() == kleinItem)
1649
+ if (source == kleinItem)
16411650 {
16421651 makeSomething(new Klein());
16431652 } else
1644
- if (event.getSource() == blobItem)
1653
+ if (source == blobItem)
16451654 {
16461655 Blob blob = new Blob();
16471656 BlobComponent comp = new BlobComponent();
....@@ -1649,15 +1658,15 @@
16491658 //blob.retile();
16501659 makeSomething(blob);
16511660 } else
1652
- if (event.getSource() == latheItem)
1661
+ if (source == latheItem)
16531662 {
16541663 makeSomething(new Lathe());
16551664 } else
1656
- if (event.getSource() == bezierItem)
1665
+ if (source == bezierItem)
16571666 {
16581667 makeSomething(new BezierSurface());
16591668 } else
1660
- if (event.getSource() == checkerItem)
1669
+ if (source == checkerItem)
16611670 {
16621671 /*
16631672 Object3D obj = new BezierSurface(5,8);
....@@ -1672,7 +1681,7 @@
16721681 */
16731682 makeSomething(new Checker());
16741683 } else
1675
- if (event.getSource() == meshItem)
1684
+ if (source == meshItem)
16761685 {
16771686 Object3D itemtomake = new Object3D();
16781687 Object3D child;
....@@ -1693,35 +1702,35 @@
16931702 makeSomething(child);
16941703 }
16951704 } else
1696
- if (event.getSource() == springItem)
1705
+ if (source == springItem)
16971706 {
16981707 cSpring s = new cSpring();
16991708 s.setup();
17001709 makeSomething(s);
17011710 } else
1702
- if (event.getSource() == flagItem)
1711
+ if (source == flagItem)
17031712 {
17041713 cSpring s = new cFlag();
17051714 s.setup();
17061715 makeSomething(s);
17071716 } else
1708
- if (event.getSource() == lightItem)
1717
+ if (source == lightItem)
17091718 {
17101719 makeSomething(new Light());
17111720 } else
1712
- if (event.getSource() == csgItem)
1721
+ if (source == csgItem)
17131722 {
17141723 group(new CSG());
17151724 } else
1716
- if (event.getSource() == templateItem)
1725
+ if (source == templateItem)
17171726 {
17181727 group(new cTemplate());
17191728 } else
1720
- if (event.getSource() == attributeItem)
1729
+ if (source == attributeItem)
17211730 {
17221731 makeSomething(new Attribute());
17231732 } else
1724
- if (event.getSource() == pointflowItem)
1733
+ if (source == pointflowItem)
17251734 {
17261735 makeSomething(new PointFlow());
17271736 } else
....@@ -1733,7 +1742,7 @@
17331742 } else
17341743 */
17351744
1736
- if (event.getSource() == superLoopItem)
1745
+ if (source == superLoopItem)
17371746 {
17381747 Composite g = new cGroup();
17391748 for (int i=0; i<15; i++)
....@@ -1755,7 +1764,7 @@
17551764
17561765 group(g);
17571766 } else
1758
- if (event.getSource() == loopItem)
1767
+ if (source == loopItem)
17591768 {
17601769 Composite csg = new GroupLeaf();
17611770 csg.count = 5;
....@@ -1764,7 +1773,7 @@
17641773 csg.addChild(child);
17651774 child.addChild(csg);
17661775 } else
1767
- if (event.getSource() == doubleItem)
1776
+ if (source == doubleItem)
17681777 {
17691778 Composite csg = new GroupLeaf();
17701779 csg.count = 5;
....@@ -1776,7 +1785,7 @@
17761785 csg.addChild(child);
17771786 child.addChild(csg);
17781787 } else
1779
- if (event.getSource() == tripleItem)
1788
+ if (source == tripleItem)
17801789 {
17811790 Composite csg = new GroupLeaf();
17821791 csg.count = 4;
....@@ -1792,70 +1801,70 @@
17921801 child.addChild(csg);
17931802 } else
17941803
1795
- if (event.getSource() == importGFDItem)
1804
+ if (source == importGFDItem)
17961805 {
17971806 ImportGFD();
17981807 } else
1799
- if (event.getSource() == importVRMLX3DItem)
1808
+ if (source == importVRMLX3DItem)
18001809 {
18011810 ImportVRMLX3D();
18021811 } else
1803
- if (event.getSource() == import3DSItem)
1812
+ if (source == import3DSItem)
18041813 {
18051814 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
18061815 } else
1807
- if (event.getSource() == importOBJItem)
1816
+ if (source == importOBJItem)
18081817 {
18091818 objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
18101819 } else
1811
- if (event.getSource() == computeAOItem)
1820
+ if (source == computeAOItem)
18121821 {
18131822 Globals.drawMode = CameraPane.OCCLUSION;
18141823 Globals.theRenderer.repaint();
18151824 } else
1816
- if (event.getSource() == recompileItem)
1825
+ if (source == recompileItem)
18171826 {
18181827 Recompile();
18191828 refreshContents();
18201829 } else
1821
- if (event.getSource() == editScriptItem)
1830
+ if (source == editScriptItem)
18221831 {
18231832 OpenDialog();
18241833 refreshContents();
18251834 } else
1826
- if (event.getSource() == invariantsItem)
1835
+ if (source == invariantsItem)
18271836 {
18281837 System.out.println("Invariants:");
18291838 GrafreeD.grafreeD.universe.invariants();
18301839 } else
1831
- if (event.getSource() == memoryItem)
1840
+ if (source == memoryItem)
18321841 {
18331842 //System.out.println("Invariants:");
18341843 PrintMemory();
18351844 } else
1836
- if (event.getSource() == pathItem)
1845
+ if (source == pathItem)
18371846 {
18381847 PrintPath();
18391848 } else
1840
- if (event.getSource() == analyzeItem)
1849
+ if (source == analyzeItem)
18411850 {
18421851 AnalyzeObject();
18431852 } else
1844
- if (event.getSource() == dumpItem)
1853
+ if (source == dumpItem)
18451854 {
18461855 DumpObject();
18471856 } else
1848
- if (event.getSource() == screenfitButton)
1857
+ if (source == screenfitButton)
18491858 {
18501859 //Reload(lastConverter, lastFilename, true);
18511860 ScreenFit();
18521861 } else
1853
- if (event.getSource() == screenfitpointButton)
1862
+ if (source == screenfitpointButton)
18541863 {
18551864 //Reload(lastConverter, lastFilename, true);
18561865 ScreenFitPoint();
18571866 } else
1858
- if (event.getSource() == snapobjectButton)
1867
+ if (source == snapobjectButton)
18591868 {
18601869 //Reload(lastConverter, lastFilename, true);
18611870 SnapObject();
....@@ -1866,13 +1875,13 @@
18661875 // Recompile();
18671876 // refreshContents();
18681877 // } else
1869
- if (event.getSource() == gcButton)
1878
+ if (source == gcButton)
18701879 {
18711880 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18721881 System.gc();
18731882 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18741883 } else
1875
- if (event.getSource() == editLeafItem)
1884
+ if (source == editLeafItem)
18761885 {
18771886 Object3D obj;
18781887 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1886,62 +1895,62 @@
18861895 }
18871896 refreshContents(true);
18881897 } else
1889
- if (event.getSource() == openWindowItem)
1898
+ if (source == openWindowItem)
18901899 {
18911900 EditSelection(true);
18921901 } else
1893
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1902
+ if (source == cutItem || source == clearButton)
18941903 {
18951904 loadClipboard(true);
18961905 } else
1897
- if (event.getSource() == duplicateItem)
1906
+ if (source == duplicateItem)
18981907 {
18991908 Object3D keep = GrafreeD.clipboard;
19001909 loadClipboard(false);
19011910 paste(false);
19021911 GrafreeD.clipboard = keep;
19031912 } else
1904
- if (event.getSource() == cloneItem)
1913
+ if (source == cloneItem)
19051914 {
19061915 CloneSelection(false);
19071916 } else
1908
- if (event.getSource() == cloneSupportItem)
1917
+ if (source == cloneSupportItem)
19091918 {
19101919 CloneSelection(true);
19111920 } else
1912
- if (event.getSource() == copyItem)
1921
+ if (source == copyItem)
19131922 {
19141923 loadClipboard(false);
19151924 } else
1916
- if (event.getSource() == pasteItem)
1925
+ if (source == pasteItem)
19171926 {
19181927 paste(false);
19191928 } else
1920
- if (event.getSource() == pasteLinkItem)
1929
+ if (source == pasteLinkItem)
19211930 {
19221931 pasteInto(false);
19231932 } else
1924
- if (event.getSource() == pasteCloneItem)
1933
+ if (source == pasteCloneItem)
19251934 {
19261935 pasteInto(true);
19271936 } else
1928
- if (event.getSource() == pasteExpandItem)
1937
+ if (source == pasteExpandItem)
19291938 {
19301939 paste(true);
19311940 } else
1932
- if (event.getSource() == synchronizeItem)
1941
+ if (source == synchronizeItem)
19331942 {
19341943 Overwrite(Object3D.TRANSFORM);
19351944 } else
1936
- if (event.getSource() == overwriteNameItem)
1945
+ if (source == overwriteNameItem)
19371946 {
19381947 Overwrite(Object3D.NAME);
19391948 } else
1940
- if (event.getSource() == overwriteUVItem)
1949
+ if (source == overwriteUVItem)
19411950 {
19421951 Overwrite(Object3D.UV);
19431952 } else
1944
- if (event.getSource() == overwriteMatItem)
1953
+ if (source == overwriteMatItem)
19451954 {
19461955 /* july 2015
19471956 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1961,7 +1970,7 @@
19611970
19621971 Overwrite(dropAttributes);
19631972 }
1964
- if (event.getSource() == overwriteGeoItem)
1973
+ if (source == overwriteGeoItem)
19651974 {
19661975 Overwrite(Object3D.GEOMETRY);
19671976 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1978,7 +1987,7 @@
19781987 // refreshContents();
19791988 // }
19801989 } else
1981
- if (event.getSource() == generateMeshItem)
1990
+ if (source == generateMeshItem)
19821991 {
19831992 //if (group.selection.size() == 1)
19841993 // for (int i=0; i<group.selection.size(); i++)
....@@ -1989,7 +1998,7 @@
19891998 ResetModel();
19901999 refreshContents();
19912000 } else
1992
- if (event.getSource() == extractGeometriesItem)
2001
+ if (source == extractGeometriesItem)
19932002 {
19942003 boolean one = false;
19952004
....@@ -2016,7 +2025,7 @@
20162025 ResetModel();
20172026 refreshContents();
20182027 } else
2019
- if (event.getSource() == cloneGeometriesItem)
2028
+ if (source == cloneGeometriesItem)
20202029 {
20212030 boolean one = false;
20222031
....@@ -2042,7 +2051,7 @@
20422051 ResetModel();
20432052 refreshContents();
20442053 } else
2045
- if (event.getSource() == shareGeometriesItem)
2054
+ if (source == shareGeometriesItem)
20462055 {
20472056 boolean one = false;
20482057
....@@ -2072,7 +2081,7 @@
20722081 refreshContents();
20732082 }
20742083 } else
2075
- if (event.getSource() == mergeGeometriesItem)
2084
+ if (source == mergeGeometriesItem)
20762085 {
20772086 boolean one = false;
20782087
....@@ -2102,7 +2111,7 @@
21022111 ResetModel();
21032112 refreshContents();
21042113 } else
2105
- if (event.getSource() == linkverticesItem)
2114
+ if (source == linkverticesItem)
21062115 {
21072116 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21082117 // {
....@@ -2135,7 +2144,7 @@
21352144 refreshContents();
21362145 }
21372146 } else
2138
- if (event.getSource() == resetsupportItem)
2147
+ if (source == resetsupportItem)
21392148 {
21402149 for (int i=0; i<group.selection.size(); i++)
21412150 {
....@@ -2147,7 +2156,7 @@
21472156
21482157 refreshContents();
21492158 } else
2150
- if (event.getSource() == relinkverticesItem)
2159
+ if (source == relinkverticesItem)
21512160 {
21522161 boolean random = CameraPane.RANDOM;
21532162 CameraPane.RANDOM = false; // parse all random nodes
....@@ -2156,7 +2165,7 @@
21562165
21572166 refreshContents();
21582167 } else
2159
- if (event.getSource() == resetreferencesItem)
2168
+ if (source == resetreferencesItem)
21602169 {
21612170 for (int i=0; i<group.selection.size(); i++)
21622171 {
....@@ -2165,7 +2174,7 @@
21652174
21662175 refreshContents();
21672176 } else
2168
- if (event.getSource() == setMasterItem)
2177
+ if (source == setMasterItem)
21692178 {
21702179 if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21712180 {
....@@ -2178,7 +2187,7 @@
21782187 refreshContents();
21792188 }
21802189 } else
2181
- if (event.getSource() == poseMeshItem)
2190
+ if (source == poseMeshItem)
21822191 {
21832192 if (group.selection.size() == 1)
21842193 {
....@@ -2197,19 +2206,19 @@
21972206 }
21982207
21992208 } else
2200
- if (event.getSource() == revertMeshItem)
2209
+ if (source == revertMeshItem)
22012210 {
22022211 RevertMeshes();
22032212 } else
2204
- if (event.getSource() == resetMeshItem)
2213
+ if (source == resetMeshItem)
22052214 {
22062215 ResetAll();
22072216 } else
2208
- if (event.getSource() == stepAllItem)
2217
+ if (source == stepAllItem)
22092218 {
22102219 StepAll();
22112220 } else
2212
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2221
+ if (source == clearItem) // || event.getSource() == clearButton)
22132222 {
22142223 //int indices[] = jList.getSelectedIndices();
22152224 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2217,46 +2226,46 @@
22172226
22182227 ClearSelection(false);
22192228 } else
2220
- if (event.getSource() == clearAllItem)
2229
+ if (source == clearAllItem)
22212230 {
22222231 ClearSelection(true);
22232232 } else
2224
- if (event.getSource() == grabItem)
2233
+ if (source == grabItem)
22252234 {
22262235 group(new cGroup(), true);
22272236 } else
2228
- if (event.getSource() == hideItem)
2237
+ if (source == hideItem)
22292238 {
22302239 group(new HiddenObject());
22312240 } else
2232
- if (event.getSource() == frontItem)
2241
+ if (source == frontItem)
22332242 {
22342243 front();
22352244 } else
2236
- if (event.getSource() == backItem)
2245
+ if (source == backItem)
22372246 {
22382247 back();
22392248 } else
2240
- if (event.getSource() == cameraItem)
2249
+ if (source == cameraItem)
22412250 {
22422251 makeSomething(new Camera());
22432252 } else
2244
- if (event.getSource() == compositeItem)
2253
+ if (source == compositeItem)
22452254 {
22462255 group(new Composite());
22472256 } else
2248
- if (event.getSource() == randomItem)
2257
+ if (source == randomItem)
22492258 {
22502259 RandomNode random = new RandomNode();
22512260 group(random);
22522261 if (random.size() > 0)
22532262 random.name = random.get(0).name + "Rnd";
22542263 } else
2255
- if (event.getSource() == physicsItem)
2264
+ if (source == physicsItem)
22562265 {
22572266 group(new PhysicsNode());
22582267 } else
2259
- if (event.getSource() == frameselectorItem)
2268
+ if (source == frameselectorItem)
22602269 {
22612270 for (int i=0; i<group.selection.size(); i++)
22622271 {
....@@ -2268,7 +2277,7 @@
22682277 ResetModel();
22692278 refreshContents();
22702279 } else
2271
- if (event.getSource() == switchGeoItem)
2280
+ if (source == switchGeoItem)
22722281 {
22732282 for (int i=0; i<group.selection.size(); i++)
22742283 {
....@@ -2280,7 +2289,7 @@
22802289 ResetModel();
22812290 refreshContents();
22822291 } else
2283
- if (event.getSource() == switchTransfoItem)
2292
+ if (source == switchTransfoItem)
22842293 {
22852294 for (int i=0; i<group.selection.size(); i++)
22862295 {
....@@ -2292,7 +2301,7 @@
22922301 ResetModel();
22932302 refreshContents();
22942303 } else
2295
- if (event.getSource() == morphItem)
2304
+ if (source == morphItem)
22962305 {
22972306 for (int i=0; i<group.selection.size(); i++)
22982307 {
....@@ -2304,7 +2313,7 @@
23042313 ResetModel();
23052314 refreshContents();
23062315 } else
2307
- if (event.getSource() == scriptNodeItem)
2316
+ if (source == scriptNodeItem)
23082317 {
23092318 boolean atleastone = false;
23102319
....@@ -2343,31 +2352,31 @@
23432352 }
23442353 }
23452354 } else
2346
- if (event.getSource() == linkerItem)
2355
+ if (source == linkerItem)
23472356 {
23482357 group(new cLinker());
23492358 } else
2350
- if (event.getSource() == textureItem)
2359
+ if (source == textureItem)
23512360 {
23522361 group(new TextureNode());
23532362 } else
2354
- if (event.getSource() == billboardItem)
2363
+ if (source == billboardItem)
23552364 {
23562365 group(new BillboardNode());
23572366 } else
2358
- if (event.getSource() == shadowXItem)
2367
+ if (source == shadowXItem)
23592368 {
23602369 CastShadow(0);
23612370 } else
2362
- if (event.getSource() == shadowYItem)
2371
+ if (source == shadowYItem)
23632372 {
23642373 CastShadow(1);
23652374 } else
2366
- if (event.getSource() == shadowZItem)
2375
+ if (source == shadowZItem)
23672376 {
23682377 CastShadow(2);
23692378 } else
2370
- if (event.getSource() == ungroupItem)
2379
+ if (source == ungroupItem)
23712380 {
23722381 //ungroup();
23732382 for (int i=0; i<group.selection.size(); i++)
....@@ -2379,179 +2388,179 @@
23792388
23802389 refreshContents();
23812390 } else
2382
- if (event.getSource() == genUVItem)
2391
+ if (source == genUVItem)
23832392 {
23842393 GenUV();
23852394 } else
2386
- if (event.getSource() == genNormalsCADItem)
2395
+ if (source == genNormalsCADItem)
23872396 {
23882397 GenNormals(true);
23892398 } else
2390
- if (event.getSource() == genNormalsMESHItem)
2399
+ if (source == genNormalsMESHItem)
23912400 {
23922401 GenNormals(true); // TODO
23932402 } else
2394
- if (event.getSource() == genNormalsORGANItem)
2403
+ if (source == genNormalsORGANItem)
23952404 {
23962405 GenNormals(false);
23972406 } else
2398
- if (event.getSource() == genNormalsMINEItem)
2407
+ if (source == genNormalsMINEItem)
23992408 {
24002409 GenNormalsMINE();
24012410 } else
2402
- if (event.getSource() == stripifyItem)
2411
+ if (source == stripifyItem)
24032412 {
24042413 Stripify();
24052414 } else
2406
- if (event.getSource() == unstripifyItem)
2415
+ if (source == unstripifyItem)
24072416 {
24082417 Unstripify();
24092418 } else
2410
- if (event.getSource() == trimItem)
2419
+ if (source == trimItem)
24112420 {
24122421 Trim();
24132422 } else
2414
- if (event.getSource() == untrimItem)
2423
+ if (source == untrimItem)
24152424 {
24162425 Untrim();
24172426 } else
2418
- if (event.getSource() == clearColorsItem)
2427
+ if (source == clearColorsItem)
24192428 {
24202429 ClearColors();
24212430 } else
2422
- if (event.getSource() == clearMaterialsItem)
2431
+ if (source == clearMaterialsItem)
24232432 {
24242433 ClearMaterials();
24252434 } else
2426
- if (event.getSource() == liveleavesItem)
2435
+ if (source == liveleavesItem)
24272436 {
24282437 LiveLeaves(true);
24292438 } else
2430
- if (event.getSource() == unliveleavesItem)
2439
+ if (source == unliveleavesItem)
24312440 {
24322441 LiveLeaves(false);
24332442 } else
2434
- if (event.getSource() == supportleavesItem)
2443
+ if (source == supportleavesItem)
24352444 {
24362445 SupportLeaves(true);
24372446 } else
2438
- if (event.getSource() == unsupportleavesItem)
2447
+ if (source == unsupportleavesItem)
24392448 {
24402449 SupportLeaves(false);
24412450 } else
2442
- if (event.getSource() == hideleavesItem)
2451
+ if (source == hideleavesItem)
24432452 {
24442453 HideLeaves(true);
24452454 } else
2446
- if (event.getSource() == showleavesItem)
2455
+ if (source == showleavesItem)
24472456 {
24482457 HideLeaves(false);
24492458 } else
2450
- if (event.getSource() == markleavesItem)
2459
+ if (source == markleavesItem)
24512460 {
24522461 MarkLeaves(true);
24532462 } else
2454
- if (event.getSource() == unmarkleavesItem)
2463
+ if (source == unmarkleavesItem)
24552464 {
24562465 MarkLeaves(false);
24572466 } else
2458
- if (event.getSource() == flipVItem)
2467
+ if (source == flipVItem)
24592468 {
24602469 FlipV(true);
24612470 } else
2462
- if (event.getSource() == unflipVItem)
2471
+ if (source == unflipVItem)
24632472 {
24642473 FlipV(false);
24652474 } else
2466
- if (event.getSource() == lowTexturesItem)
2475
+ if (source == lowTexturesItem)
24672476 {
24682477 SetTexRes(0);
24692478 } else
2470
- if (event.getSource() == normalTexturesItem)
2479
+ if (source == normalTexturesItem)
24712480 {
24722481 SetTexRes(1);
24732482 } else
2474
- if (event.getSource() == highTexturesItem)
2483
+ if (source == highTexturesItem)
24752484 {
24762485 SetTexRes(2);
24772486 } else
2478
- if (event.getSource() == veryhighTexturesItem)
2487
+ if (source == veryhighTexturesItem)
24792488 {
24802489 SetTexRes(3);
24812490 } else
2482
- if (event.getSource() == maxTexturesItem)
2491
+ if (source == maxTexturesItem)
24832492 {
24842493 SetTexRes(4);
24852494 } else
2486
- if (event.getSource() == panoTexturesItem)
2495
+ if (source == panoTexturesItem)
24872496 {
24882497 SetTexRes(5);
24892498 } else
2490
- if (event.getSource() == reverseNormalsItem)
2499
+ if (source == reverseNormalsItem)
24912500 {
24922501 ReverseNormals();
24932502 } else
2494
- if (event.getSource() == parseverticesItem)
2503
+ if (source == parseverticesItem)
24952504 {
24962505 ParseVertices();
24972506 } else
2498
- if (event.getSource() == textureFieldItem)
2507
+ if (source == textureFieldItem)
24992508 {
25002509 TextureVertices();
25012510 } else
2502
- if (event.getSource() == alignItem)
2511
+ if (source == alignItem)
25032512 {
25042513 Align();
25052514 } else
2506
- if (event.getSource() == mirrorItem)
2515
+ if (source == mirrorItem)
25072516 {
25082517 MirrorPoses();
25092518 } else
2510
- if (event.getSource() == reduceMorphItem)
2519
+ if (source == reduceMorphItem)
25112520 {
25122521 MeshReduction(false);
25132522 } else
2514
- if (event.getSource() == reduce34MorphItem)
2523
+ if (source == reduce34MorphItem)
25152524 {
25162525 MeshReduction(true);
25172526 } else
2518
- if (event.getSource() == reverseTrianglesItem)
2527
+ if (source == reverseTrianglesItem)
25192528 {
25202529 ReverseTriangles();
25212530 } else
2522
- if (event.getSource() == reduceMeshItem)
2531
+ if (source == reduceMeshItem)
25232532 {
25242533 ReduceMesh(false);
25252534 } else
2526
- if (event.getSource() == reduce34MeshItem)
2535
+ if (source == reduce34MeshItem)
25272536 {
25282537 ReduceMesh(true);
25292538 } else
2530
- if (event.getSource() == increaseMeshItem)
2539
+ if (source == increaseMeshItem)
25312540 {
25322541 IncreaseMesh();
25332542 } else
2534
- if (event.getSource() == clipMeshItem)
2543
+ if (source == clipMeshItem)
25352544 {
25362545 ClipMesh();
25372546 } else
2538
- if (event.getSource() == smoothMeshItem)
2547
+ if (source == smoothMeshItem)
25392548 {
25402549 SmoothMesh();
25412550 } else
2542
- if (event.getSource() == transformgeometryItem)
2551
+ if (source == transformgeometryItem)
25432552 {
25442553 TransformGeometry();
25452554 } else
2546
- if (event.getSource() == resetTransformItem)
2555
+ if (source == resetTransformItem)
25472556 {
25482557 ResetTransform();
25492558 } else
2550
- if (event.getSource() == resetCentroidItem)
2559
+ if (source == resetCentroidItem)
25512560 {
25522561 ResetCentroid();
25532562 } else
2554
- if (event.getSource() == resetParentItem)
2563
+ if (source == resetParentItem)
25552564 {
25562565 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25572566 {
....@@ -2561,7 +2570,7 @@
25612570
25622571 refreshContents();
25632572 } else
2564
- if (event.getSource() == repairParentItem)
2573
+ if (source == repairParentItem)
25652574 {
25662575 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25672576 {
....@@ -2575,7 +2584,7 @@
25752584
25762585 refreshContents();
25772586 } else
2578
- if (event.getSource() == repairShadowItem)
2587
+ if (source == repairShadowItem)
25792588 {
25802589 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25812590 {
....@@ -2589,7 +2598,7 @@
25892598
25902599 refreshContents();
25912600 } else
2592
- if (event.getSource() == sortbysizeItem)
2601
+ if (source == sortbysizeItem)
25932602 {
25942603 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25952604 {
....@@ -2601,7 +2610,7 @@
26012610 ResetModel();
26022611 refreshContents();
26032612 } else
2604
- if (event.getSource() == sortbynameItem)
2613
+ if (source == sortbynameItem)
26052614 {
26062615 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
26072616 {
....@@ -2613,7 +2622,7 @@
26132622 ResetModel();
26142623 refreshContents();
26152624 } else
2616
- if (event.getSource() == attachPigmentItem)
2625
+ if (source == attachPigmentItem)
26172626 {
26182627 String texture = GetFile("Attach pigment");
26192628 Object3D obj;
....@@ -2625,7 +2634,7 @@
26252634
26262635 refreshContents();
26272636 } else
2628
- if (event.getSource() == detachPigmentItem)
2637
+ if (source == detachPigmentItem)
26292638 {
26302639 Object3D obj;
26312640 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2636,7 +2645,7 @@
26362645
26372646 refreshContents();
26382647 } else
2639
- if (event.getSource() == attachBumpItem)
2648
+ if (source == attachBumpItem)
26402649 {
26412650 String texture = GetFile("Attach bump");
26422651 Object3D obj;
....@@ -2648,7 +2657,7 @@
26482657
26492658 refreshContents();
26502659 } else
2651
- if (event.getSource() == detachBumpItem)
2660
+ if (source == detachBumpItem)
26522661 {
26532662 Object3D obj;
26542663 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2659,7 +2668,7 @@
26592668
26602669 refreshContents();
26612670 } else
2662
- if (event.getSource() == pigmentBumpItem)
2671
+ if (source == pigmentBumpItem)
26632672 {
26642673 Object3D obj;
26652674 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2670,158 +2679,195 @@
26702679
26712680 refreshContents();
26722681 } else
2673
- if (event.getSource() == flashSelectionButton)
2682
+ if (source == flashSelectionButton)
26742683 {
26752684 CameraPane.flash = true;
26762685 refreshContents();
26772686 } else
2678
- if (event.getSource() == oneButton)
2687
+ if (source == oneButton)
26792688 {
26802689 } else
2681
- if (event.getSource() == twoButton)
2690
+ if (source == twoButton)
26822691 {
26832692 radio.layout = twoButton;
26842693 // bug
26852694 //gridPanel.setDividerLocation(1.0);
26862695 //bigPanel.setDividerLocation(0.0);
2687
- bigThree.remove(scenePanel);
2688
- bigThree.remove(centralPanel);
2689
- bigThree.remove(XYZPanel);
2690
- aWindowConstraints.gridx = 0;
2691
- aWindowConstraints.gridy = 0;
2692
- aWindowConstraints.gridwidth = 1;
2693
- // aConstraints.gridheight = 3;
2694
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2695
- aWindowConstraints.weightx = 0;
2696
- aWindowConstraints.weighty = 1;
2697
- //bigThree.add(jtp, aWindowConstraints);
2698
- aWindowConstraints.weightx = 1;
2699
- aWindowConstraints.gridwidth = 3;
2700
- // aConstraints.gridheight = 3;
2701
- aWindowConstraints.gridx = 1;
2702
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2703
- bigThree.add(centralPanel, aWindowConstraints);
2704
- aWindowConstraints.weightx = 0;
2705
- aWindowConstraints.gridx = 4;
2706
- aWindowConstraints.gridwidth = 1;
2707
- // aConstraints.gridheight = 3;
2708
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2709
- //bigThree.add(XYZPanel, aWindowConstraints);
2710
- bigThree.revalidate();
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.add(centralPanel);
2724
+ bigThree.FlushUI();
27112725 } else
2712
- if (event.getSource() == threeButton)
2726
+ if (source == threeButton)
27132727 {
27142728 radio.layout = threeButton;
2715
- bigThree.remove(scenePanel);
2716
- bigThree.remove(centralPanel);
2717
- bigThree.remove(XYZPanel);
2718
- aWindowConstraints.gridx = 0;
2719
- aWindowConstraints.gridy = 0;
2720
- aWindowConstraints.gridwidth = 1;
2721
- // aConstraints.gridheight = 3;
2722
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2723
- aWindowConstraints.weightx = 0;
2724
- aWindowConstraints.weighty = 1;
2725
- //bigThree.add(jtp, aWindowConstraints);
2726
- aWindowConstraints.weightx = 1;
2727
- aWindowConstraints.gridwidth = 3;
2728
- // aConstraints.gridheight = 3;
2729
- aWindowConstraints.gridx = 1;
2730
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2731
- bigThree.add(centralPanel, aWindowConstraints);
2732
- aWindowConstraints.weightx = 0;
2733
- aWindowConstraints.gridx = 4;
2734
- aWindowConstraints.gridwidth = 1;
2735
- // aConstraints.gridheight = 3;
2736
- aConstraints.fill = GridBagConstraints.VERTICAL;
2737
- bigThree.add(XYZPanel, aWindowConstraints);
2738
- bigThree.revalidate();
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.add(centralPanel);
2759
+ bigThree.add(XYZPanel);
2760
+ bigThree.FlushUI();
27392761 } else
2740
- if (event.getSource() == fourButton)
2762
+ if (source == fourButton)
27412763 {
27422764 radio.layout = fourButton;
2743
- bigThree.remove(scenePanel);
2744
- bigThree.remove(centralPanel);
2745
- bigThree.remove(XYZPanel);
2746
- aWindowConstraints.gridx = 0;
2747
- aWindowConstraints.gridy = 0;
2748
- aWindowConstraints.gridwidth = 1;
2749
- // aWindowConstraints.gridheight = 3;
2750
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2751
- aWindowConstraints.weightx = 1;
2752
- aWindowConstraints.weighty = 1;
2753
- bigThree.add(scenePanel, aWindowConstraints);
2754
- aWindowConstraints.weightx = 1;
2755
- aWindowConstraints.gridwidth = 3;
2756
- // aConstraints.gridheight = 3;
2757
- aWindowConstraints.gridx = 1;
2758
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2759
- //bigThree.add(cameraPanel, aWindowConstraints);
2760
- aWindowConstraints.weightx = 0;
2761
- aWindowConstraints.gridx = 4;
2762
- aWindowConstraints.gridwidth = 1;
2763
- // aWindowConstraints.gridheight = 3;
2764
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2765
- //bigThree.add(XYZPanel, aWindowConstraints);
2766
- bigThree.revalidate();
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.add(scenePanel);
2795
+ bigThree.FlushUI();
27672796 } else
2768
- if (event.getSource() == sixButton)
2797
+ if (source == sixButton)
27692798 {
27702799 radio.layout = sixButton;
2771
- bigThree.remove(scenePanel);
2772
- bigThree.remove(centralPanel);
2773
- bigThree.remove(XYZPanel);
2774
- aWindowConstraints.gridx = 0;
2775
- aWindowConstraints.gridy = 0;
2776
- aWindowConstraints.gridwidth = 1;
2777
- // aConstraints.gridheight = 3;
2778
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2779
- aWindowConstraints.weightx = 0;
2780
- aWindowConstraints.weighty = 1;
2781
- bigThree.add(scenePanel, aWindowConstraints);
2782
- aWindowConstraints.weightx = 1;
2783
- aWindowConstraints.gridwidth = 3;
2784
- // aWindowConstraints.gridheight = 3;
2785
- aWindowConstraints.gridx = 1;
2786
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2787
- bigThree.add(centralPanel, aWindowConstraints);
2788
- aWindowConstraints.weightx = 0;
2789
- aWindowConstraints.gridx = 4;
2790
- aWindowConstraints.gridwidth = 1;
2791
- // aWindowConstraints.gridheight = 3;
2792
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2793
- //bigThree.add(XYZPanel, aConstraints);
2794
- bigThree.revalidate();
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.add(scenePanel);
2830
+ bigThree.add(centralPanel);
2831
+ bigThree.FlushUI();
27952832 } else
2796
- if (event.getSource() == sevenButton)
2833
+ if (source == sevenButton)
27972834 {
27982835 radio.layout = sevenButton;
2799
- bigThree.remove(scenePanel);
2800
- bigThree.remove(centralPanel);
2801
- bigThree.remove(XYZPanel);
2802
- aWindowConstraints.gridx = 0;
2803
- aWindowConstraints.gridy = 0;
2804
- aWindowConstraints.gridwidth = 1;
2805
- // aWindowConstraints.gridheight = 3;
2806
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2807
- aWindowConstraints.weightx = 0;
2808
- aWindowConstraints.weighty = 1;
2809
- bigThree.add(scenePanel, aWindowConstraints);
2810
- aWindowConstraints.weightx = 1;
2811
- aWindowConstraints.gridwidth = 3;
2812
- // aWindowConstraints.gridheight = 3;
2813
- aWindowConstraints.gridx = 1;
2814
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2815
- bigThree.add(centralPanel, aWindowConstraints);
2816
- aWindowConstraints.weightx = 0;
2817
- aWindowConstraints.gridx = 4;
2818
- aWindowConstraints.gridwidth = 1;
2819
- // aConstraints.gridheight = 3;
2820
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2821
- bigThree.add(XYZPanel, aWindowConstraints);
2822
- bigThree.revalidate();
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.add(scenePanel);
2866
+ bigThree.add(centralPanel);
2867
+ bigThree.add(XYZPanel);
2868
+ bigThree.FlushUI();
28232869 } else
2824
- if (event.getSource() == rootButton)
2870
+ if (source == rootButton)
28252871 {
28262872 Object3D obj;
28272873 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2833,7 +2879,7 @@
28332879
28342880 refreshContents(true);
28352881 } else
2836
- if (event.getSource() == closeButton)
2882
+ if (source == closeButton)
28372883 {
28382884 //System.out.println("CLOSE: " + buttonGroup.getSelection());
28392885 cRadio ab;
....@@ -2854,11 +2900,11 @@
28542900 }
28552901 refreshContents(true);
28562902 } else
2857
- if (event.getSource() == editItem || event.getSource() == editButton)
2903
+ if (source == editItem || source == editButton)
28582904 {
28592905 EditSelection(false);
28602906 } else
2861
- if (event.getSource() == uneditButton)
2907
+ if (source == uneditButton)
28622908 {
28632909 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28642910 {
....@@ -2875,7 +2921,7 @@
28752921 //objEditor.ResetSliders();
28762922 refreshContents(true);
28772923 } else
2878
- if (event.getSource() == clearPanelButton)
2924
+ if (source == clearPanelButton)
28792925 {
28802926 assert(copy == group);
28812927 //copy.ClearUI();
....@@ -2886,7 +2932,7 @@
28862932 listUI.clear();
28872933 refreshContents(true);
28882934 } else
2889
- if (event.getSource() == allParamsButton)
2935
+ if (source == allParamsButton)
28902936 {
28912937 assert(copy == group);
28922938
....@@ -2907,19 +2953,19 @@
29072953
29082954 refreshContents(true);
29092955 } else
2910
- if (event.getSource() == unselectButton)
2956
+ if (source == unselectButton)
29112957 {
29122958 objEditor.jTree.clearSelection();
29132959 // ?? oct 2012 GrafreeD.clipboard.clear();
29142960 objEditor.ResetSliders();
29152961 refreshContents(true);
29162962 } else
2917
- if(event.getSource() instanceof cRadio)
2963
+ if(source instanceof cRadio)
29182964 {
29192965 group.parent = keepparent;
29202966 group.attributes = 0;
29212967 //group.editWindow = null;
2922
- /*cRadio*/ radio = (cRadio)event.getSource();
2968
+ /*cRadio*/ radio = (cRadio)source;
29232969 Object3D obj = radio.GetObject();
29242970 System.out.println("Edit " + obj);
29252971 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)