Normand Briere
2019-05-01 25cef97465f0bfa8959663754e9243006324c81c
GroupEditor.java
....@@ -12,6 +12,7 @@
1212 import com.jme.math.Vector3f;
1313 import com.jme.renderer.ColorRGBA;
1414
15
+import grafeme.ui.*;
1516 //import buoy.widget.BFileChooser;
1617
1718 class GroupEditor extends ObjEditor implements //iParse, //iCallBack,
....@@ -433,31 +434,24 @@
433434 oe.radioPanel.add(dummyButton);
434435 oe.buttonGroup.add(dummyButton);
435436 */
436
- aConstraints.gridy += 1;
437
-
438437 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
439
-
440
- oe.aConstraints.gridwidth = 1;
441
- oe.aConstraints.gridx = 0;
442438
443439 oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints);
444440 liveCB.setToolTipText("Enabled animation");
445441 liveCB.addItemListener(this);
446442
447
- oe.aConstraints.gridx += 1;
448443 oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK), oe.aConstraints);
449444 trackCB.setToolTipText("Enable tracking");
450445 trackCB.addItemListener(this);
451446
452
- oe.aConstraints.gridx += 1;
453
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
447
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
454448 screenfitButton.setToolTipText("Screen fit");
455449 screenfitButton.addActionListener(this);
456
- oe.aConstraints.gridx += 1;
450
+
457451 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
458452 // screenfitpointButton.addActionListener(this);
459453 // oe.aConstraints.gridx += 1;
460
- oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
454
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
461455 snapobjectButton.addActionListener(this);
462456 snapobjectButton.setToolTipText("Snap Object");
463457 oe.aConstraints.gridx += 1;
....@@ -467,39 +461,34 @@
467461 oe.aConstraints.weighty = 0;
468462 oe.aConstraints.gridwidth = 1;
469463
470
- oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
464
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
471465 flashSelectionButton.setToolTipText("Show selection");
472466 flashSelectionButton.addActionListener(this);
473467
474
- oe.toolbarPanel.add(new cButton(" ", false));
468
+ oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
475469
476
- oe.aConstraints.gridx += 1;
477
- oe.aConstraints.weighty = 0;
478
- oe.aConstraints.gridwidth = 1;
479
-
480
- //
481
- oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
470
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
482471 twoButton.setToolTipText("Show center view only");
483472 twoButton.addActionListener(this);
484
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
473
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
485474 fourButton.addActionListener(this);
486475 fourButton.setToolTipText("Show left panel only");
487
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
476
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
488477 sixButton.setToolTipText("2-column layout left");
489478 sixButton.addActionListener(this);
490
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
479
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
491480 threeButton.setToolTipText("2-column layout right");
492481 threeButton.addActionListener(this);
493
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
482
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
494483 sevenButton.setToolTipText("3-column layout");
495484 sevenButton.addActionListener(this);
496485 //
497486
498
- oe.toolbarPanel.add(rootButton = new cButton(" o o o ")); //, oe.aConstraints);
487
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
499488 rootButton.setToolTipText("Edit object in new tab");
500489 rootButton.addActionListener(this);
501490 oe.aConstraints.gridx += 1;
502
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
491
+ oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
503492 closeButton.setToolTipText("Close tab");
504493 closeButton.addActionListener(this);
505494 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
....@@ -604,15 +593,15 @@
604593 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
605594 }
606595
607
- void AddOptions(JPanel panel, GridBagConstraints constraints)
596
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
608597 {
609
- constraints.gridx = 0;
610
- constraints.gridy = 0;
611
- panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), constraints);
598
+ //constraints.gridx = 0;
599
+ //constraints.gridy = 0;
600
+ panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
612601 fastCB.setToolTipText("Fast mode");
613602 fastCB.addItemListener(this);
614
- constraints.gridy += 1;
615
- panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), constraints);
603
+ //constraints.gridy += 1;
604
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
616605 supportCB.setToolTipText("Enabled rigging");
617606 supportCB.addItemListener(this);
618607
....@@ -620,26 +609,26 @@
620609 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
621610 // localCB.addItemListener(this);
622611
623
- constraints.gridy += 1;
624
- panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD), constraints);
612
+ //constraints.gridy += 1;
613
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
625614 crowdCB.setToolTipText("Used for crowds");
626615 crowdCB.addItemListener(this);
627616
628
- constraints.gridy += 1;
629
- panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), constraints);
617
+ //constraints.gridy += 1;
618
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
630619 smoothCB.setToolTipText("Snapping delay");
631620 smoothCB.addItemListener(this);
632621
633
- constraints.gridy += 1;
634
- panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), constraints);
622
+ //constraints.gridy += 1;
623
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
635624 slowCB.setToolTipText("Smooth interpolation");
636625 slowCB.addItemListener(this);
637
- constraints.gridy += 1;
638
- panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE), constraints);
626
+ //constraints.gridy += 1;
627
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
639628 boxCB.setToolTipText("Display bounding boxes");
640629 boxCB.addItemListener(this);
641
- constraints.gridy += 1;
642
- panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE), constraints);
630
+ //constraints.gridy += 1;
631
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
643632 zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
644633 zoomBoxCB.addItemListener(this);
645634
....@@ -650,16 +639,16 @@
650639 if (false)
651640 {
652641 // handled in scripts
653
- constraints.gridy += 1;
654
- panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), constraints);
642
+ //constraints.gridy += 1;
643
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
655644 speakerCameraCB.addItemListener(this);
656645
657
- constraints.gridy += 1;
658
- panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), constraints);
646
+ //constraints.gridy += 1;
647
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
659648 speakerFocusCB.addItemListener(this);
660649
661
- constraints.gridy += 1;
662
- panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), constraints);
650
+ //constraints.gridy += 1;
651
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
663652 smoothfocusCB.addItemListener(this);
664653 }
665654
....@@ -667,12 +656,12 @@
667656 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
668657 // debugCB.addItemListener(this);
669658
670
- constraints.gridy += 1;
671
- panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL), constraints);
659
+ //constraints.gridy += 1;
660
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
672661 oeilCB.addItemListener(this);
673662
674
- constraints.gridy += 1;
675
- panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT), constraints);
663
+ //constraints.gridy += 1;
664
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
676665 lookAtCB.setToolTipText("Look-at target");
677666 lookAtCB.addItemListener(this);
678667
....@@ -1518,6 +1507,7 @@
15181507 //
15191508 public void actionPerformed(ActionEvent event) // , Object arg)
15201509 {
1510
+ Object source = event.getSource();
15211511 /*
15221512 if (event.getSource() == nameField)
15231513 {
....@@ -1529,11 +1519,11 @@
15291519 }
15301520 else
15311521 */
1532
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1522
+ if (source == lookAtItem || source == lookFromItem)
15331523 {
15341524 ScreenFit();
15351525 } else
1536
- if (event.getSource() == switchItem)
1526
+ if (source == switchItem)
15371527 {
15381528 cVector v1 = new cVector();
15391529 cVector v2 = new cVector();
....@@ -1542,11 +1532,11 @@
15421532 objEditor.cameraView.renderCamera.setAim(v2, v1);
15431533 objEditor.cameraView.repaint();
15441534 } else
1545
- if (event.getSource() == rectoidItem)
1535
+ if (source == rectoidItem)
15461536 {
15471537 makeSomething(new Box());
15481538 } else
1549
- if (event.getSource() == particleItem)
1539
+ if (source == particleItem)
15501540 {
15511541 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15521542 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1567,9 +1557,9 @@
15671557 applyExample(particleGeom, "SMOKE");
15681558 makeSomething(particleGeom);
15691559 } else
1570
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1560
+ if (source == ragdollItem || source == ragdoll2Item)
15711561 {
1572
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1562
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15731563
15741564 ragdoll.toParent = LA.newMatrix();
15751565 ragdoll.fromParent = LA.newMatrix();
....@@ -1587,7 +1577,7 @@
15871577 } else
15881578 /*
15891579 */
1590
- if (event.getSource() == heightFieldItem)
1580
+ if (source == heightFieldItem)
15911581 {
15921582 Object3D obj = new Object3D();
15931583
....@@ -1625,31 +1615,31 @@
16251615
16261616 makeSomething(obj);
16271617 } else
1628
- if (event.getSource() == gridItem)
1618
+ if (source == gridItem)
16291619 {
16301620 makeSomething(new Grid());
16311621 } else
1632
- if (event.getSource() == ellipsoidItem)
1622
+ if (source == ellipsoidItem)
16331623 {
16341624 makeSomething(new Sphere());
16351625 } else
1636
- if (event.getSource() == coneItem)
1626
+ if (source == coneItem)
16371627 {
16381628 makeSomething(new Cone());
16391629 } else
1640
- if (event.getSource() == torusItem)
1630
+ if (source == torusItem)
16411631 {
16421632 makeSomething(new Torus());
16431633 } else
1644
- if (event.getSource() == superItem)
1634
+ if (source == superItem)
16451635 {
16461636 makeSomething(new Superellipsoid());
16471637 } else
1648
- if (event.getSource() == kleinItem)
1638
+ if (source == kleinItem)
16491639 {
16501640 makeSomething(new Klein());
16511641 } else
1652
- if (event.getSource() == blobItem)
1642
+ if (source == blobItem)
16531643 {
16541644 Blob blob = new Blob();
16551645 BlobComponent comp = new BlobComponent();
....@@ -1657,15 +1647,15 @@
16571647 //blob.retile();
16581648 makeSomething(blob);
16591649 } else
1660
- if (event.getSource() == latheItem)
1650
+ if (source == latheItem)
16611651 {
16621652 makeSomething(new Lathe());
16631653 } else
1664
- if (event.getSource() == bezierItem)
1654
+ if (source == bezierItem)
16651655 {
16661656 makeSomething(new BezierSurface());
16671657 } else
1668
- if (event.getSource() == checkerItem)
1658
+ if (source == checkerItem)
16691659 {
16701660 /*
16711661 Object3D obj = new BezierSurface(5,8);
....@@ -1680,7 +1670,7 @@
16801670 */
16811671 makeSomething(new Checker());
16821672 } else
1683
- if (event.getSource() == meshItem)
1673
+ if (source == meshItem)
16841674 {
16851675 Object3D itemtomake = new Object3D();
16861676 Object3D child;
....@@ -1701,35 +1691,35 @@
17011691 makeSomething(child);
17021692 }
17031693 } else
1704
- if (event.getSource() == springItem)
1694
+ if (source == springItem)
17051695 {
17061696 cSpring s = new cSpring();
17071697 s.setup();
17081698 makeSomething(s);
17091699 } else
1710
- if (event.getSource() == flagItem)
1700
+ if (source == flagItem)
17111701 {
17121702 cSpring s = new cFlag();
17131703 s.setup();
17141704 makeSomething(s);
17151705 } else
1716
- if (event.getSource() == lightItem)
1706
+ if (source == lightItem)
17171707 {
17181708 makeSomething(new Light());
17191709 } else
1720
- if (event.getSource() == csgItem)
1710
+ if (source == csgItem)
17211711 {
17221712 group(new CSG());
17231713 } else
1724
- if (event.getSource() == templateItem)
1714
+ if (source == templateItem)
17251715 {
17261716 group(new cTemplate());
17271717 } else
1728
- if (event.getSource() == attributeItem)
1718
+ if (source == attributeItem)
17291719 {
17301720 makeSomething(new Attribute());
17311721 } else
1732
- if (event.getSource() == pointflowItem)
1722
+ if (source == pointflowItem)
17331723 {
17341724 makeSomething(new PointFlow());
17351725 } else
....@@ -1741,7 +1731,7 @@
17411731 } else
17421732 */
17431733
1744
- if (event.getSource() == superLoopItem)
1734
+ if (source == superLoopItem)
17451735 {
17461736 Composite g = new cGroup();
17471737 for (int i=0; i<15; i++)
....@@ -1763,7 +1753,7 @@
17631753
17641754 group(g);
17651755 } else
1766
- if (event.getSource() == loopItem)
1756
+ if (source == loopItem)
17671757 {
17681758 Composite csg = new GroupLeaf();
17691759 csg.count = 5;
....@@ -1772,7 +1762,7 @@
17721762 csg.addChild(child);
17731763 child.addChild(csg);
17741764 } else
1775
- if (event.getSource() == doubleItem)
1765
+ if (source == doubleItem)
17761766 {
17771767 Composite csg = new GroupLeaf();
17781768 csg.count = 5;
....@@ -1784,7 +1774,7 @@
17841774 csg.addChild(child);
17851775 child.addChild(csg);
17861776 } else
1787
- if (event.getSource() == tripleItem)
1777
+ if (source == tripleItem)
17881778 {
17891779 Composite csg = new GroupLeaf();
17901780 csg.count = 4;
....@@ -1800,70 +1790,70 @@
18001790 child.addChild(csg);
18011791 } else
18021792
1803
- if (event.getSource() == importGFDItem)
1793
+ if (source == importGFDItem)
18041794 {
18051795 ImportGFD();
18061796 } else
1807
- if (event.getSource() == importVRMLX3DItem)
1797
+ if (source == importVRMLX3DItem)
18081798 {
18091799 ImportVRMLX3D();
18101800 } else
1811
- if (event.getSource() == import3DSItem)
1801
+ if (source == import3DSItem)
18121802 {
18131803 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
18141804 } else
1815
- if (event.getSource() == importOBJItem)
1805
+ if (source == importOBJItem)
18161806 {
18171807 objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
18181808 } else
1819
- if (event.getSource() == computeAOItem)
1809
+ if (source == computeAOItem)
18201810 {
18211811 Globals.drawMode = CameraPane.OCCLUSION;
18221812 Globals.theRenderer.repaint();
18231813 } else
1824
- if (event.getSource() == recompileItem)
1814
+ if (source == recompileItem)
18251815 {
18261816 Recompile();
18271817 refreshContents();
18281818 } else
1829
- if (event.getSource() == editScriptItem)
1819
+ if (source == editScriptItem)
18301820 {
18311821 OpenDialog();
18321822 refreshContents();
18331823 } else
1834
- if (event.getSource() == invariantsItem)
1824
+ if (source == invariantsItem)
18351825 {
18361826 System.out.println("Invariants:");
18371827 GrafreeD.grafreeD.universe.invariants();
18381828 } else
1839
- if (event.getSource() == memoryItem)
1829
+ if (source == memoryItem)
18401830 {
18411831 //System.out.println("Invariants:");
18421832 PrintMemory();
18431833 } else
1844
- if (event.getSource() == pathItem)
1834
+ if (source == pathItem)
18451835 {
18461836 PrintPath();
18471837 } else
1848
- if (event.getSource() == analyzeItem)
1838
+ if (source == analyzeItem)
18491839 {
18501840 AnalyzeObject();
18511841 } else
1852
- if (event.getSource() == dumpItem)
1842
+ if (source == dumpItem)
18531843 {
18541844 DumpObject();
18551845 } else
1856
- if (event.getSource() == screenfitButton)
1846
+ if (source == screenfitButton)
18571847 {
18581848 //Reload(lastConverter, lastFilename, true);
18591849 ScreenFit();
18601850 } else
1861
- if (event.getSource() == screenfitpointButton)
1851
+ if (source == screenfitpointButton)
18621852 {
18631853 //Reload(lastConverter, lastFilename, true);
18641854 ScreenFitPoint();
18651855 } else
1866
- if (event.getSource() == snapobjectButton)
1856
+ if (source == snapobjectButton)
18671857 {
18681858 //Reload(lastConverter, lastFilename, true);
18691859 SnapObject();
....@@ -1874,13 +1864,13 @@
18741864 // Recompile();
18751865 // refreshContents();
18761866 // } else
1877
- if (event.getSource() == gcButton)
1867
+ if (source == gcButton)
18781868 {
18791869 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18801870 System.gc();
18811871 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18821872 } else
1883
- if (event.getSource() == editLeafItem)
1873
+ if (source == editLeafItem)
18841874 {
18851875 Object3D obj;
18861876 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1894,62 +1884,62 @@
18941884 }
18951885 refreshContents(true);
18961886 } else
1897
- if (event.getSource() == openWindowItem)
1887
+ if (source == openWindowItem)
18981888 {
18991889 EditSelection(true);
19001890 } else
1901
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1891
+ if (source == cutItem || source == clearButton)
19021892 {
19031893 loadClipboard(true);
19041894 } else
1905
- if (event.getSource() == duplicateItem)
1895
+ if (source == duplicateItem)
19061896 {
19071897 Object3D keep = GrafreeD.clipboard;
19081898 loadClipboard(false);
19091899 paste(false);
19101900 GrafreeD.clipboard = keep;
19111901 } else
1912
- if (event.getSource() == cloneItem)
1902
+ if (source == cloneItem)
19131903 {
19141904 CloneSelection(false);
19151905 } else
1916
- if (event.getSource() == cloneSupportItem)
1906
+ if (source == cloneSupportItem)
19171907 {
19181908 CloneSelection(true);
19191909 } else
1920
- if (event.getSource() == copyItem)
1910
+ if (source == copyItem)
19211911 {
19221912 loadClipboard(false);
19231913 } else
1924
- if (event.getSource() == pasteItem)
1914
+ if (source == pasteItem)
19251915 {
19261916 paste(false);
19271917 } else
1928
- if (event.getSource() == pasteLinkItem)
1918
+ if (source == pasteLinkItem)
19291919 {
19301920 pasteInto(false);
19311921 } else
1932
- if (event.getSource() == pasteCloneItem)
1922
+ if (source == pasteCloneItem)
19331923 {
19341924 pasteInto(true);
19351925 } else
1936
- if (event.getSource() == pasteExpandItem)
1926
+ if (source == pasteExpandItem)
19371927 {
19381928 paste(true);
19391929 } else
1940
- if (event.getSource() == synchronizeItem)
1930
+ if (source == synchronizeItem)
19411931 {
19421932 Overwrite(Object3D.TRANSFORM);
19431933 } else
1944
- if (event.getSource() == overwriteNameItem)
1934
+ if (source == overwriteNameItem)
19451935 {
19461936 Overwrite(Object3D.NAME);
19471937 } else
1948
- if (event.getSource() == overwriteUVItem)
1938
+ if (source == overwriteUVItem)
19491939 {
19501940 Overwrite(Object3D.UV);
19511941 } else
1952
- if (event.getSource() == overwriteMatItem)
1942
+ if (source == overwriteMatItem)
19531943 {
19541944 /* july 2015
19551945 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1969,7 +1959,7 @@
19691959
19701960 Overwrite(dropAttributes);
19711961 }
1972
- if (event.getSource() == overwriteGeoItem)
1962
+ if (source == overwriteGeoItem)
19731963 {
19741964 Overwrite(Object3D.GEOMETRY);
19751965 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1986,7 +1976,7 @@
19861976 // refreshContents();
19871977 // }
19881978 } else
1989
- if (event.getSource() == generateMeshItem)
1979
+ if (source == generateMeshItem)
19901980 {
19911981 //if (group.selection.size() == 1)
19921982 // for (int i=0; i<group.selection.size(); i++)
....@@ -1997,7 +1987,7 @@
19971987 ResetModel();
19981988 refreshContents();
19991989 } else
2000
- if (event.getSource() == extractGeometriesItem)
1990
+ if (source == extractGeometriesItem)
20011991 {
20021992 boolean one = false;
20031993
....@@ -2024,7 +2014,7 @@
20242014 ResetModel();
20252015 refreshContents();
20262016 } else
2027
- if (event.getSource() == cloneGeometriesItem)
2017
+ if (source == cloneGeometriesItem)
20282018 {
20292019 boolean one = false;
20302020
....@@ -2050,7 +2040,7 @@
20502040 ResetModel();
20512041 refreshContents();
20522042 } else
2053
- if (event.getSource() == shareGeometriesItem)
2043
+ if (source == shareGeometriesItem)
20542044 {
20552045 boolean one = false;
20562046
....@@ -2080,7 +2070,7 @@
20802070 refreshContents();
20812071 }
20822072 } else
2083
- if (event.getSource() == mergeGeometriesItem)
2073
+ if (source == mergeGeometriesItem)
20842074 {
20852075 boolean one = false;
20862076
....@@ -2110,7 +2100,7 @@
21102100 ResetModel();
21112101 refreshContents();
21122102 } else
2113
- if (event.getSource() == linkverticesItem)
2103
+ if (source == linkverticesItem)
21142104 {
21152105 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21162106 // {
....@@ -2143,7 +2133,7 @@
21432133 refreshContents();
21442134 }
21452135 } else
2146
- if (event.getSource() == resetsupportItem)
2136
+ if (source == resetsupportItem)
21472137 {
21482138 for (int i=0; i<group.selection.size(); i++)
21492139 {
....@@ -2155,7 +2145,7 @@
21552145
21562146 refreshContents();
21572147 } else
2158
- if (event.getSource() == relinkverticesItem)
2148
+ if (source == relinkverticesItem)
21592149 {
21602150 boolean random = CameraPane.RANDOM;
21612151 CameraPane.RANDOM = false; // parse all random nodes
....@@ -2164,7 +2154,7 @@
21642154
21652155 refreshContents();
21662156 } else
2167
- if (event.getSource() == resetreferencesItem)
2157
+ if (source == resetreferencesItem)
21682158 {
21692159 for (int i=0; i<group.selection.size(); i++)
21702160 {
....@@ -2173,7 +2163,7 @@
21732163
21742164 refreshContents();
21752165 } else
2176
- if (event.getSource() == setMasterItem)
2166
+ if (source == setMasterItem)
21772167 {
21782168 if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21792169 {
....@@ -2186,7 +2176,7 @@
21862176 refreshContents();
21872177 }
21882178 } else
2189
- if (event.getSource() == poseMeshItem)
2179
+ if (source == poseMeshItem)
21902180 {
21912181 if (group.selection.size() == 1)
21922182 {
....@@ -2205,19 +2195,19 @@
22052195 }
22062196
22072197 } else
2208
- if (event.getSource() == revertMeshItem)
2198
+ if (source == revertMeshItem)
22092199 {
22102200 RevertMeshes();
22112201 } else
2212
- if (event.getSource() == resetMeshItem)
2202
+ if (source == resetMeshItem)
22132203 {
22142204 ResetAll();
22152205 } else
2216
- if (event.getSource() == stepAllItem)
2206
+ if (source == stepAllItem)
22172207 {
22182208 StepAll();
22192209 } else
2220
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2210
+ if (source == clearItem) // || event.getSource() == clearButton)
22212211 {
22222212 //int indices[] = jList.getSelectedIndices();
22232213 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2225,46 +2215,46 @@
22252215
22262216 ClearSelection(false);
22272217 } else
2228
- if (event.getSource() == clearAllItem)
2218
+ if (source == clearAllItem)
22292219 {
22302220 ClearSelection(true);
22312221 } else
2232
- if (event.getSource() == grabItem)
2222
+ if (source == grabItem)
22332223 {
22342224 group(new cGroup(), true);
22352225 } else
2236
- if (event.getSource() == hideItem)
2226
+ if (source == hideItem)
22372227 {
22382228 group(new HiddenObject());
22392229 } else
2240
- if (event.getSource() == frontItem)
2230
+ if (source == frontItem)
22412231 {
22422232 front();
22432233 } else
2244
- if (event.getSource() == backItem)
2234
+ if (source == backItem)
22452235 {
22462236 back();
22472237 } else
2248
- if (event.getSource() == cameraItem)
2238
+ if (source == cameraItem)
22492239 {
22502240 makeSomething(new Camera());
22512241 } else
2252
- if (event.getSource() == compositeItem)
2242
+ if (source == compositeItem)
22532243 {
22542244 group(new Composite());
22552245 } else
2256
- if (event.getSource() == randomItem)
2246
+ if (source == randomItem)
22572247 {
22582248 RandomNode random = new RandomNode();
22592249 group(random);
22602250 if (random.size() > 0)
22612251 random.name = random.get(0).name + "Rnd";
22622252 } else
2263
- if (event.getSource() == physicsItem)
2253
+ if (source == physicsItem)
22642254 {
22652255 group(new PhysicsNode());
22662256 } else
2267
- if (event.getSource() == frameselectorItem)
2257
+ if (source == frameselectorItem)
22682258 {
22692259 for (int i=0; i<group.selection.size(); i++)
22702260 {
....@@ -2276,7 +2266,7 @@
22762266 ResetModel();
22772267 refreshContents();
22782268 } else
2279
- if (event.getSource() == switchGeoItem)
2269
+ if (source == switchGeoItem)
22802270 {
22812271 for (int i=0; i<group.selection.size(); i++)
22822272 {
....@@ -2288,7 +2278,7 @@
22882278 ResetModel();
22892279 refreshContents();
22902280 } else
2291
- if (event.getSource() == switchTransfoItem)
2281
+ if (source == switchTransfoItem)
22922282 {
22932283 for (int i=0; i<group.selection.size(); i++)
22942284 {
....@@ -2300,7 +2290,7 @@
23002290 ResetModel();
23012291 refreshContents();
23022292 } else
2303
- if (event.getSource() == morphItem)
2293
+ if (source == morphItem)
23042294 {
23052295 for (int i=0; i<group.selection.size(); i++)
23062296 {
....@@ -2312,7 +2302,7 @@
23122302 ResetModel();
23132303 refreshContents();
23142304 } else
2315
- if (event.getSource() == scriptNodeItem)
2305
+ if (source == scriptNodeItem)
23162306 {
23172307 boolean atleastone = false;
23182308
....@@ -2351,31 +2341,31 @@
23512341 }
23522342 }
23532343 } else
2354
- if (event.getSource() == linkerItem)
2344
+ if (source == linkerItem)
23552345 {
23562346 group(new cLinker());
23572347 } else
2358
- if (event.getSource() == textureItem)
2348
+ if (source == textureItem)
23592349 {
23602350 group(new TextureNode());
23612351 } else
2362
- if (event.getSource() == billboardItem)
2352
+ if (source == billboardItem)
23632353 {
23642354 group(new BillboardNode());
23652355 } else
2366
- if (event.getSource() == shadowXItem)
2356
+ if (source == shadowXItem)
23672357 {
23682358 CastShadow(0);
23692359 } else
2370
- if (event.getSource() == shadowYItem)
2360
+ if (source == shadowYItem)
23712361 {
23722362 CastShadow(1);
23732363 } else
2374
- if (event.getSource() == shadowZItem)
2364
+ if (source == shadowZItem)
23752365 {
23762366 CastShadow(2);
23772367 } else
2378
- if (event.getSource() == ungroupItem)
2368
+ if (source == ungroupItem)
23792369 {
23802370 //ungroup();
23812371 for (int i=0; i<group.selection.size(); i++)
....@@ -2387,179 +2377,179 @@
23872377
23882378 refreshContents();
23892379 } else
2390
- if (event.getSource() == genUVItem)
2380
+ if (source == genUVItem)
23912381 {
23922382 GenUV();
23932383 } else
2394
- if (event.getSource() == genNormalsCADItem)
2384
+ if (source == genNormalsCADItem)
23952385 {
23962386 GenNormals(true);
23972387 } else
2398
- if (event.getSource() == genNormalsMESHItem)
2388
+ if (source == genNormalsMESHItem)
23992389 {
24002390 GenNormals(true); // TODO
24012391 } else
2402
- if (event.getSource() == genNormalsORGANItem)
2392
+ if (source == genNormalsORGANItem)
24032393 {
24042394 GenNormals(false);
24052395 } else
2406
- if (event.getSource() == genNormalsMINEItem)
2396
+ if (source == genNormalsMINEItem)
24072397 {
24082398 GenNormalsMINE();
24092399 } else
2410
- if (event.getSource() == stripifyItem)
2400
+ if (source == stripifyItem)
24112401 {
24122402 Stripify();
24132403 } else
2414
- if (event.getSource() == unstripifyItem)
2404
+ if (source == unstripifyItem)
24152405 {
24162406 Unstripify();
24172407 } else
2418
- if (event.getSource() == trimItem)
2408
+ if (source == trimItem)
24192409 {
24202410 Trim();
24212411 } else
2422
- if (event.getSource() == untrimItem)
2412
+ if (source == untrimItem)
24232413 {
24242414 Untrim();
24252415 } else
2426
- if (event.getSource() == clearColorsItem)
2416
+ if (source == clearColorsItem)
24272417 {
24282418 ClearColors();
24292419 } else
2430
- if (event.getSource() == clearMaterialsItem)
2420
+ if (source == clearMaterialsItem)
24312421 {
24322422 ClearMaterials();
24332423 } else
2434
- if (event.getSource() == liveleavesItem)
2424
+ if (source == liveleavesItem)
24352425 {
24362426 LiveLeaves(true);
24372427 } else
2438
- if (event.getSource() == unliveleavesItem)
2428
+ if (source == unliveleavesItem)
24392429 {
24402430 LiveLeaves(false);
24412431 } else
2442
- if (event.getSource() == supportleavesItem)
2432
+ if (source == supportleavesItem)
24432433 {
24442434 SupportLeaves(true);
24452435 } else
2446
- if (event.getSource() == unsupportleavesItem)
2436
+ if (source == unsupportleavesItem)
24472437 {
24482438 SupportLeaves(false);
24492439 } else
2450
- if (event.getSource() == hideleavesItem)
2440
+ if (source == hideleavesItem)
24512441 {
24522442 HideLeaves(true);
24532443 } else
2454
- if (event.getSource() == showleavesItem)
2444
+ if (source == showleavesItem)
24552445 {
24562446 HideLeaves(false);
24572447 } else
2458
- if (event.getSource() == markleavesItem)
2448
+ if (source == markleavesItem)
24592449 {
24602450 MarkLeaves(true);
24612451 } else
2462
- if (event.getSource() == unmarkleavesItem)
2452
+ if (source == unmarkleavesItem)
24632453 {
24642454 MarkLeaves(false);
24652455 } else
2466
- if (event.getSource() == flipVItem)
2456
+ if (source == flipVItem)
24672457 {
24682458 FlipV(true);
24692459 } else
2470
- if (event.getSource() == unflipVItem)
2460
+ if (source == unflipVItem)
24712461 {
24722462 FlipV(false);
24732463 } else
2474
- if (event.getSource() == lowTexturesItem)
2464
+ if (source == lowTexturesItem)
24752465 {
24762466 SetTexRes(0);
24772467 } else
2478
- if (event.getSource() == normalTexturesItem)
2468
+ if (source == normalTexturesItem)
24792469 {
24802470 SetTexRes(1);
24812471 } else
2482
- if (event.getSource() == highTexturesItem)
2472
+ if (source == highTexturesItem)
24832473 {
24842474 SetTexRes(2);
24852475 } else
2486
- if (event.getSource() == veryhighTexturesItem)
2476
+ if (source == veryhighTexturesItem)
24872477 {
24882478 SetTexRes(3);
24892479 } else
2490
- if (event.getSource() == maxTexturesItem)
2480
+ if (source == maxTexturesItem)
24912481 {
24922482 SetTexRes(4);
24932483 } else
2494
- if (event.getSource() == panoTexturesItem)
2484
+ if (source == panoTexturesItem)
24952485 {
24962486 SetTexRes(5);
24972487 } else
2498
- if (event.getSource() == reverseNormalsItem)
2488
+ if (source == reverseNormalsItem)
24992489 {
25002490 ReverseNormals();
25012491 } else
2502
- if (event.getSource() == parseverticesItem)
2492
+ if (source == parseverticesItem)
25032493 {
25042494 ParseVertices();
25052495 } else
2506
- if (event.getSource() == textureFieldItem)
2496
+ if (source == textureFieldItem)
25072497 {
25082498 TextureVertices();
25092499 } else
2510
- if (event.getSource() == alignItem)
2500
+ if (source == alignItem)
25112501 {
25122502 Align();
25132503 } else
2514
- if (event.getSource() == mirrorItem)
2504
+ if (source == mirrorItem)
25152505 {
25162506 MirrorPoses();
25172507 } else
2518
- if (event.getSource() == reduceMorphItem)
2508
+ if (source == reduceMorphItem)
25192509 {
25202510 MeshReduction(false);
25212511 } else
2522
- if (event.getSource() == reduce34MorphItem)
2512
+ if (source == reduce34MorphItem)
25232513 {
25242514 MeshReduction(true);
25252515 } else
2526
- if (event.getSource() == reverseTrianglesItem)
2516
+ if (source == reverseTrianglesItem)
25272517 {
25282518 ReverseTriangles();
25292519 } else
2530
- if (event.getSource() == reduceMeshItem)
2520
+ if (source == reduceMeshItem)
25312521 {
25322522 ReduceMesh(false);
25332523 } else
2534
- if (event.getSource() == reduce34MeshItem)
2524
+ if (source == reduce34MeshItem)
25352525 {
25362526 ReduceMesh(true);
25372527 } else
2538
- if (event.getSource() == increaseMeshItem)
2528
+ if (source == increaseMeshItem)
25392529 {
25402530 IncreaseMesh();
25412531 } else
2542
- if (event.getSource() == clipMeshItem)
2532
+ if (source == clipMeshItem)
25432533 {
25442534 ClipMesh();
25452535 } else
2546
- if (event.getSource() == smoothMeshItem)
2536
+ if (source == smoothMeshItem)
25472537 {
25482538 SmoothMesh();
25492539 } else
2550
- if (event.getSource() == transformgeometryItem)
2540
+ if (source == transformgeometryItem)
25512541 {
25522542 TransformGeometry();
25532543 } else
2554
- if (event.getSource() == resetTransformItem)
2544
+ if (source == resetTransformItem)
25552545 {
25562546 ResetTransform();
25572547 } else
2558
- if (event.getSource() == resetCentroidItem)
2548
+ if (source == resetCentroidItem)
25592549 {
25602550 ResetCentroid();
25612551 } else
2562
- if (event.getSource() == resetParentItem)
2552
+ if (source == resetParentItem)
25632553 {
25642554 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25652555 {
....@@ -2569,7 +2559,7 @@
25692559
25702560 refreshContents();
25712561 } else
2572
- if (event.getSource() == repairParentItem)
2562
+ if (source == repairParentItem)
25732563 {
25742564 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25752565 {
....@@ -2583,7 +2573,7 @@
25832573
25842574 refreshContents();
25852575 } else
2586
- if (event.getSource() == repairShadowItem)
2576
+ if (source == repairShadowItem)
25872577 {
25882578 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25892579 {
....@@ -2597,7 +2587,7 @@
25972587
25982588 refreshContents();
25992589 } else
2600
- if (event.getSource() == sortbysizeItem)
2590
+ if (source == sortbysizeItem)
26012591 {
26022592 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
26032593 {
....@@ -2609,7 +2599,7 @@
26092599 ResetModel();
26102600 refreshContents();
26112601 } else
2612
- if (event.getSource() == sortbynameItem)
2602
+ if (source == sortbynameItem)
26132603 {
26142604 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
26152605 {
....@@ -2621,7 +2611,7 @@
26212611 ResetModel();
26222612 refreshContents();
26232613 } else
2624
- if (event.getSource() == attachPigmentItem)
2614
+ if (source == attachPigmentItem)
26252615 {
26262616 String texture = GetFile("Attach pigment");
26272617 Object3D obj;
....@@ -2633,7 +2623,7 @@
26332623
26342624 refreshContents();
26352625 } else
2636
- if (event.getSource() == detachPigmentItem)
2626
+ if (source == detachPigmentItem)
26372627 {
26382628 Object3D obj;
26392629 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2644,7 +2634,7 @@
26442634
26452635 refreshContents();
26462636 } else
2647
- if (event.getSource() == attachBumpItem)
2637
+ if (source == attachBumpItem)
26482638 {
26492639 String texture = GetFile("Attach bump");
26502640 Object3D obj;
....@@ -2656,7 +2646,7 @@
26562646
26572647 refreshContents();
26582648 } else
2659
- if (event.getSource() == detachBumpItem)
2649
+ if (source == detachBumpItem)
26602650 {
26612651 Object3D obj;
26622652 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2667,7 +2657,7 @@
26672657
26682658 refreshContents();
26692659 } else
2670
- if (event.getSource() == pigmentBumpItem)
2660
+ if (source == pigmentBumpItem)
26712661 {
26722662 Object3D obj;
26732663 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2678,158 +2668,195 @@
26782668
26792669 refreshContents();
26802670 } else
2681
- if (event.getSource() == flashSelectionButton)
2671
+ if (source == flashSelectionButton)
26822672 {
26832673 CameraPane.flash = true;
26842674 refreshContents();
26852675 } else
2686
- if (event.getSource() == oneButton)
2676
+ if (source == oneButton)
26872677 {
26882678 } else
2689
- if (event.getSource() == twoButton)
2679
+ if (source == twoButton)
26902680 {
26912681 radio.layout = twoButton;
26922682 // bug
26932683 //gridPanel.setDividerLocation(1.0);
26942684 //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();
2685
+// bigThree.remove(scenePanel);
2686
+// bigThree.remove(centralPanel);
2687
+// bigThree.remove(XYZPanel);
2688
+// aWindowConstraints.gridx = 0;
2689
+// aWindowConstraints.gridy = 0;
2690
+// aWindowConstraints.gridwidth = 1;
2691
+// // aConstraints.gridheight = 3;
2692
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2693
+// aWindowConstraints.weightx = 0;
2694
+// aWindowConstraints.weighty = 1;
2695
+// //bigThree.add(jtp, aWindowConstraints);
2696
+// aWindowConstraints.weightx = 1;
2697
+// aWindowConstraints.gridwidth = 3;
2698
+// // aConstraints.gridheight = 3;
2699
+// aWindowConstraints.gridx = 1;
2700
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2701
+// bigThree.add(centralPanel, aWindowConstraints);
2702
+// aWindowConstraints.weightx = 0;
2703
+// aWindowConstraints.gridx = 4;
2704
+// aWindowConstraints.gridwidth = 1;
2705
+// // aConstraints.gridheight = 3;
2706
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2707
+// //bigThree.add(XYZPanel, aWindowConstraints);
2708
+// scenePanel.setVisible(false);
2709
+// centralPanel.setVisible(true);
2710
+// XYZPanel.setVisible(false);
2711
+ bigThree.ClearUI();
2712
+ bigThree.add(centralPanel);
2713
+ bigThree.FlushUI();
27192714 } else
2720
- if (event.getSource() == threeButton)
2715
+ if (source == threeButton)
27212716 {
27222717 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();
2718
+
2719
+// bigThree.remove(scenePanel);
2720
+// bigThree.remove(centralPanel);
2721
+// bigThree.remove(XYZPanel);
2722
+// aWindowConstraints.gridx = 0;
2723
+// aWindowConstraints.gridy = 0;
2724
+// aWindowConstraints.gridwidth = 1;
2725
+// // aConstraints.gridheight = 3;
2726
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2727
+// aWindowConstraints.weightx = 0;
2728
+// aWindowConstraints.weighty = 1;
2729
+// //bigThree.add(jtp, aWindowConstraints);
2730
+// aWindowConstraints.weightx = 1;
2731
+// aWindowConstraints.gridwidth = 3;
2732
+// // aConstraints.gridheight = 3;
2733
+// aWindowConstraints.gridx = 1;
2734
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2735
+// bigThree.add(centralPanel, aWindowConstraints);
2736
+// aWindowConstraints.weightx = 0;
2737
+// aWindowConstraints.gridx = 4;
2738
+// aWindowConstraints.gridwidth = 1;
2739
+// // aConstraints.gridheight = 3;
2740
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2741
+// bigThree.add(XYZPanel, aWindowConstraints);
2742
+// bigThree.validate();
2743
+// scenePanel.setVisible(false);
2744
+// centralPanel.setVisible(true);
2745
+// XYZPanel.setVisible(true);
2746
+ bigThree.ClearUI();
2747
+ bigThree.add(centralPanel);
2748
+ bigThree.add(XYZPanel);
2749
+ bigThree.FlushUI();
27472750 } else
2748
- if (event.getSource() == fourButton)
2751
+ if (source == fourButton)
27492752 {
27502753 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();
2754
+
2755
+// bigThree.remove(scenePanel);
2756
+// bigThree.remove(centralPanel);
2757
+// bigThree.remove(XYZPanel);
2758
+// aWindowConstraints.gridx = 0;
2759
+// aWindowConstraints.gridy = 0;
2760
+// aWindowConstraints.gridwidth = 1;
2761
+// // aWindowConstraints.gridheight = 3;
2762
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2763
+// aWindowConstraints.weightx = 1;
2764
+// aWindowConstraints.weighty = 1;
2765
+// bigThree.add(scenePanel, aWindowConstraints);
2766
+// aWindowConstraints.weightx = 1;
2767
+// aWindowConstraints.gridwidth = 3;
2768
+// // aConstraints.gridheight = 3;
2769
+// aWindowConstraints.gridx = 1;
2770
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2771
+// //bigThree.add(cameraPanel, aWindowConstraints);
2772
+// aWindowConstraints.weightx = 0;
2773
+// aWindowConstraints.gridx = 4;
2774
+// aWindowConstraints.gridwidth = 1;
2775
+// // aWindowConstraints.gridheight = 3;
2776
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2777
+// //bigThree.add(XYZPanel, aWindowConstraints);
2778
+// bigThree.validate();
2779
+// scenePanel.setVisible(true);
2780
+// centralPanel.setVisible(false);
2781
+// XYZPanel.setVisible(false);
2782
+ bigThree.ClearUI();
2783
+ bigThree.add(scenePanel);
2784
+ bigThree.FlushUI();
27752785 } else
2776
- if (event.getSource() == sixButton)
2786
+ if (source == sixButton)
27772787 {
27782788 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();
2789
+
2790
+// bigThree.remove(scenePanel);
2791
+// bigThree.remove(centralPanel);
2792
+// bigThree.remove(XYZPanel);
2793
+// aWindowConstraints.gridx = 0;
2794
+// aWindowConstraints.gridy = 0;
2795
+// aWindowConstraints.gridwidth = 1;
2796
+// // aConstraints.gridheight = 3;
2797
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2798
+// aWindowConstraints.weightx = 0;
2799
+// aWindowConstraints.weighty = 1;
2800
+// bigThree.add(scenePanel, aWindowConstraints);
2801
+// aWindowConstraints.weightx = 1;
2802
+// aWindowConstraints.gridwidth = 3;
2803
+// // aWindowConstraints.gridheight = 3;
2804
+// aWindowConstraints.gridx = 1;
2805
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2806
+// bigThree.add(centralPanel, aWindowConstraints);
2807
+// aWindowConstraints.weightx = 0;
2808
+// aWindowConstraints.gridx = 4;
2809
+// aWindowConstraints.gridwidth = 1;
2810
+// // aWindowConstraints.gridheight = 3;
2811
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2812
+// //bigThree.add(XYZPanel, aConstraints);
2813
+// bigThree.validate();
2814
+// scenePanel.setVisible(true);
2815
+// centralPanel.setVisible(true);
2816
+// XYZPanel.setVisible(false);
2817
+ bigThree.ClearUI();
2818
+ bigThree.add(scenePanel);
2819
+ bigThree.add(centralPanel);
2820
+ bigThree.FlushUI();
28032821 } else
2804
- if (event.getSource() == sevenButton)
2822
+ if (source == sevenButton)
28052823 {
28062824 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();
2825
+
2826
+// bigThree.remove(scenePanel);
2827
+// bigThree.remove(centralPanel);
2828
+// bigThree.remove(XYZPanel);
2829
+// aWindowConstraints.gridx = 0;
2830
+// aWindowConstraints.gridy = 0;
2831
+// aWindowConstraints.gridwidth = 1;
2832
+// // aWindowConstraints.gridheight = 3;
2833
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2834
+// aWindowConstraints.weightx = 0;
2835
+// aWindowConstraints.weighty = 1;
2836
+// bigThree.add(scenePanel, aWindowConstraints);
2837
+// aWindowConstraints.weightx = 1;
2838
+// aWindowConstraints.gridwidth = 3;
2839
+// // aWindowConstraints.gridheight = 3;
2840
+// aWindowConstraints.gridx = 1;
2841
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2842
+// bigThree.add(centralPanel, aWindowConstraints);
2843
+// aWindowConstraints.weightx = 0;
2844
+// aWindowConstraints.gridx = 4;
2845
+// aWindowConstraints.gridwidth = 1;
2846
+// // aConstraints.gridheight = 3;
2847
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2848
+// bigThree.add(XYZPanel, aWindowConstraints);
2849
+// bigThree.validate();
2850
+// scenePanel.setVisible(true);
2851
+// centralPanel.setVisible(true);
2852
+// XYZPanel.setVisible(true);
2853
+ bigThree.ClearUI();
2854
+ bigThree.add(scenePanel);
2855
+ bigThree.add(centralPanel);
2856
+ bigThree.add(XYZPanel);
2857
+ bigThree.FlushUI();
28312858 } else
2832
- if (event.getSource() == rootButton)
2859
+ if (source == rootButton)
28332860 {
28342861 Object3D obj;
28352862 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2841,7 +2868,7 @@
28412868
28422869 refreshContents(true);
28432870 } else
2844
- if (event.getSource() == closeButton)
2871
+ if (source == closeButton)
28452872 {
28462873 //System.out.println("CLOSE: " + buttonGroup.getSelection());
28472874 cRadio ab;
....@@ -2862,11 +2889,11 @@
28622889 }
28632890 refreshContents(true);
28642891 } else
2865
- if (event.getSource() == editItem || event.getSource() == editButton)
2892
+ if (source == editItem || source == editButton)
28662893 {
28672894 EditSelection(false);
28682895 } else
2869
- if (event.getSource() == uneditButton)
2896
+ if (source == uneditButton)
28702897 {
28712898 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28722899 {
....@@ -2878,12 +2905,12 @@
28782905
28792906 child.editWindow = null; // ???????????
28802907 }
2881
- objEditor.ctrlPanel.revalidate();
2908
+ objEditor.ctrlPanel.validate();
28822909 //objEditor.jTree.clearSelection();
28832910 //objEditor.ResetSliders();
28842911 refreshContents(true);
28852912 } else
2886
- if (event.getSource() == clearPanelButton)
2913
+ if (source == clearPanelButton)
28872914 {
28882915 assert(copy == group);
28892916 //copy.ClearUI();
....@@ -2894,7 +2921,7 @@
28942921 listUI.clear();
28952922 refreshContents(true);
28962923 } else
2897
- if (event.getSource() == allParamsButton)
2924
+ if (source == allParamsButton)
28982925 {
28992926 assert(copy == group);
29002927
....@@ -2915,19 +2942,19 @@
29152942
29162943 refreshContents(true);
29172944 } else
2918
- if (event.getSource() == unselectButton)
2945
+ if (source == unselectButton)
29192946 {
29202947 objEditor.jTree.clearSelection();
29212948 // ?? oct 2012 GrafreeD.clipboard.clear();
29222949 objEditor.ResetSliders();
29232950 refreshContents(true);
29242951 } else
2925
- if(event.getSource() instanceof cRadio)
2952
+ if(source instanceof cRadio)
29262953 {
29272954 group.parent = keepparent;
29282955 group.attributes = 0;
29292956 //group.editWindow = null;
2930
- /*cRadio*/ radio = (cRadio)event.getSource();
2957
+ /*cRadio*/ radio = (cRadio)source;
29312958 Object3D obj = radio.GetObject();
29322959 System.out.println("Edit " + obj);
29332960 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)