Normand Briere
2019-04-29 8c837a9e50c29e66bdf5bd7ea2fd15b1a7d5d598
GroupEditor.java
....@@ -12,6 +12,7 @@
1212 import com.jme.math.Vector3f;
1313 import com.jme.renderer.ColorRGBA;
1414
15
+import grafeme.ui.*;
1516 //import buoy.widget.BFileChooser;
1617
1718 class GroupEditor extends ObjEditor implements //iParse, //iCallBack,
....@@ -434,76 +435,24 @@
434435 oe.buttonGroup.add(dummyButton);
435436 */
436437 aConstraints.gridy += 1;
438
+
439
+ //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
440
+
437441 oe.aConstraints.gridwidth = 1;
438442 oe.aConstraints.gridx = 0;
439443
440444 oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints);
445
+ liveCB.setToolTipText("Enabled animation");
441446 liveCB.addItemListener(this);
442447
443448 oe.aConstraints.gridx += 1;
444
- oe.toolbarPanel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), oe.aConstraints);
445
- supportCB.addItemListener(this);
446
-
447
- // oe.aConstraints.gridx += 1;
448
- // oe.toolbarPanel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), oe.aConstraints);
449
- // localCB.addItemListener(this);
450
-
451
- oe.aConstraints.gridx += 1;
452
- oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD), oe.aConstraints);
453
- crowdCB.addItemListener(this);
454
-
455
- oe.aConstraints.gridx += 1;
456
- oe.toolbarPanel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), oe.aConstraints);
457
- smoothCB.addItemListener(this);
458
-
459
- oe.aConstraints.gridx += 1;
460
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), oe.aConstraints);
461
- fastCB.addItemListener(this);
462
- oe.aConstraints.gridx += 1;
463
- oe.toolbarPanel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), oe.aConstraints);
464
- slowCB.addItemListener(this);
465
- oe.aConstraints.gridx += 1;
466
- oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.FAST), oe.aConstraints);
467
- boxCB.addItemListener(this);
468
-
469
-// oe.aConstraints.gridx += 1;
470
-// oe.toolbarPanel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), oe.aConstraints);
471
-// speakerMocapCB.addItemListener(this);
472
-
473
- if (false)
474
- {
475
- // handled in scripts
476
- oe.aConstraints.gridx += 1;
477
- oe.toolbarPanel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), oe.aConstraints);
478
- speakerCameraCB.addItemListener(this);
479
-
480
- oe.aConstraints.gridx += 1;
481
- oe.toolbarPanel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), oe.aConstraints);
482
- speakerFocusCB.addItemListener(this);
483
-
484
- oe.aConstraints.gridx += 1;
485
- oe.toolbarPanel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), oe.aConstraints);
486
- smoothfocusCB.addItemListener(this);
487
- }
488
-
489
-//oe.aConstraints.gridx += 1;
490
-//oe.toolbarPanel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), oe.aConstraints);
491
-// debugCB.addItemListener(this);
492
-
493
- oe.aConstraints.gridx += 1;
494
- oe.toolbarPanel.add(oeilCB = new cCheckBox("O", CameraPane.OEIL), oe.aConstraints);
495
- oeilCB.addItemListener(this);
496
-
497
- oe.aConstraints.gridx += 1;
498
- oe.toolbarPanel.add(lookAtCB = new cCheckBox("T", CameraPane.LOOKAT), oe.aConstraints);
499
- lookAtCB.addItemListener(this);
500
-
501
- oe.aConstraints.gridx += 1;
502
- oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK), oe.aConstraints);
449
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK), oe.aConstraints);
450
+ trackCB.setToolTipText("Enable tracking");
503451 trackCB.addItemListener(this);
504452
505453 oe.aConstraints.gridx += 1;
506454 oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
455
+ screenfitButton.setToolTipText("Screen fit");
507456 screenfitButton.addActionListener(this);
508457 oe.aConstraints.gridx += 1;
509458 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
....@@ -511,6 +460,7 @@
511460 // oe.aConstraints.gridx += 1;
512461 oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
513462 snapobjectButton.addActionListener(this);
463
+ snapobjectButton.setToolTipText("Snap Object");
514464 oe.aConstraints.gridx += 1;
515465
516466 //aConstraints.gridx = 0;
....@@ -519,6 +469,7 @@
519469 oe.aConstraints.gridwidth = 1;
520470
521471 oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
472
+ flashSelectionButton.setToolTipText("Show selection");
522473 flashSelectionButton.addActionListener(this);
523474
524475 oe.toolbarPanel.add(new cButton(" ", false));
....@@ -529,21 +480,28 @@
529480
530481 //
531482 oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
483
+ twoButton.setToolTipText("Show center view only");
532484 twoButton.addActionListener(this);
533485 oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
534486 fourButton.addActionListener(this);
487
+ fourButton.setToolTipText("Show left panel only");
535488 oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
489
+ sixButton.setToolTipText("2-column layout left");
536490 sixButton.addActionListener(this);
537491 oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
492
+ threeButton.setToolTipText("2-column layout right");
538493 threeButton.addActionListener(this);
539494 oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
495
+ sevenButton.setToolTipText("3-column layout");
540496 sevenButton.addActionListener(this);
541497 //
542498
543
- oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints);
499
+ oe.toolbarPanel.add(rootButton = new cButton(" o o o ")); //, oe.aConstraints);
500
+ rootButton.setToolTipText("Edit object in new tab");
544501 rootButton.addActionListener(this);
545502 oe.aConstraints.gridx += 1;
546503 oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
504
+ closeButton.setToolTipText("Close tab");
547505 closeButton.addActionListener(this);
548506 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
549507 //clearButton.addActionListener(this);
....@@ -646,6 +604,80 @@
646604 radio.layout = sevenButton;
647605 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
648606 }
607
+
608
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
609
+ {
610
+ //constraints.gridx = 0;
611
+ //constraints.gridy = 0;
612
+ panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
613
+ fastCB.setToolTipText("Fast mode");
614
+ fastCB.addItemListener(this);
615
+ //constraints.gridy += 1;
616
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
617
+ supportCB.setToolTipText("Enabled rigging");
618
+ supportCB.addItemListener(this);
619
+
620
+ // constraints.gridy += 1;
621
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
622
+ // localCB.addItemListener(this);
623
+
624
+ //constraints.gridy += 1;
625
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
626
+ crowdCB.setToolTipText("Used for crowds");
627
+ crowdCB.addItemListener(this);
628
+
629
+ //constraints.gridy += 1;
630
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
631
+ smoothCB.setToolTipText("Snapping delay");
632
+ smoothCB.addItemListener(this);
633
+
634
+ //constraints.gridy += 1;
635
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
636
+ slowCB.setToolTipText("Smooth interpolation");
637
+ slowCB.addItemListener(this);
638
+ //constraints.gridy += 1;
639
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
640
+ boxCB.setToolTipText("Display bounding boxes");
641
+ boxCB.addItemListener(this);
642
+ //constraints.gridy += 1;
643
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
644
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
645
+ zoomBoxCB.addItemListener(this);
646
+
647
+// constraints.gridy += 1;
648
+// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
649
+// speakerMocapCB.addItemListener(this);
650
+
651
+ if (false)
652
+ {
653
+ // handled in scripts
654
+ //constraints.gridy += 1;
655
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
656
+ speakerCameraCB.addItemListener(this);
657
+
658
+ //constraints.gridy += 1;
659
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
660
+ speakerFocusCB.addItemListener(this);
661
+
662
+ //constraints.gridy += 1;
663
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
664
+ smoothfocusCB.addItemListener(this);
665
+ }
666
+
667
+//constraints.gridx += 1;
668
+//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
669
+// debugCB.addItemListener(this);
670
+
671
+ //constraints.gridy += 1;
672
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
673
+ oeilCB.addItemListener(this);
674
+
675
+ //constraints.gridy += 1;
676
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
677
+ lookAtCB.setToolTipText("Look-at target");
678
+ lookAtCB.addItemListener(this);
679
+
680
+ }
649681
650682 void EditObject(Object3D obj)
651683 {
....@@ -676,6 +708,7 @@
676708 JCheckBox fastCB;
677709 JCheckBox slowCB;
678710 JCheckBox boxCB;
711
+ JCheckBox zoomBoxCB;
679712 JCheckBox trackCB;
680713 JCheckBox smoothfocusCB;
681714 // JCheckBox speakerMocapCB;
....@@ -755,6 +788,10 @@
755788 Recompile();
756789 cameraView.repaint();
757790 // refreshContents();
791
+ }
792
+ else if(e.getSource() == zoomBoxCB)
793
+ {
794
+ cameraView.ToggleZoomBoxMode();
758795 }
759796 else if(e.getSource() == smoothfocusCB)
760797 {
....@@ -1482,6 +1519,7 @@
14821519 //
14831520 public void actionPerformed(ActionEvent event) // , Object arg)
14841521 {
1522
+ Object source = event.getSource();
14851523 /*
14861524 if (event.getSource() == nameField)
14871525 {
....@@ -1493,11 +1531,11 @@
14931531 }
14941532 else
14951533 */
1496
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1534
+ if (source == lookAtItem || source == lookFromItem)
14971535 {
14981536 ScreenFit();
14991537 } else
1500
- if (event.getSource() == switchItem)
1538
+ if (source == switchItem)
15011539 {
15021540 cVector v1 = new cVector();
15031541 cVector v2 = new cVector();
....@@ -1506,11 +1544,11 @@
15061544 objEditor.cameraView.renderCamera.setAim(v2, v1);
15071545 objEditor.cameraView.repaint();
15081546 } else
1509
- if (event.getSource() == rectoidItem)
1547
+ if (source == rectoidItem)
15101548 {
15111549 makeSomething(new Box());
15121550 } else
1513
- if (event.getSource() == particleItem)
1551
+ if (source == particleItem)
15141552 {
15151553 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15161554 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1531,9 +1569,9 @@
15311569 applyExample(particleGeom, "SMOKE");
15321570 makeSomething(particleGeom);
15331571 } else
1534
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1572
+ if (source == ragdollItem || source == ragdoll2Item)
15351573 {
1536
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1574
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15371575
15381576 ragdoll.toParent = LA.newMatrix();
15391577 ragdoll.fromParent = LA.newMatrix();
....@@ -1551,7 +1589,7 @@
15511589 } else
15521590 /*
15531591 */
1554
- if (event.getSource() == heightFieldItem)
1592
+ if (source == heightFieldItem)
15551593 {
15561594 Object3D obj = new Object3D();
15571595
....@@ -1589,31 +1627,31 @@
15891627
15901628 makeSomething(obj);
15911629 } else
1592
- if (event.getSource() == gridItem)
1630
+ if (source == gridItem)
15931631 {
15941632 makeSomething(new Grid());
15951633 } else
1596
- if (event.getSource() == ellipsoidItem)
1634
+ if (source == ellipsoidItem)
15971635 {
15981636 makeSomething(new Sphere());
15991637 } else
1600
- if (event.getSource() == coneItem)
1638
+ if (source == coneItem)
16011639 {
16021640 makeSomething(new Cone());
16031641 } else
1604
- if (event.getSource() == torusItem)
1642
+ if (source == torusItem)
16051643 {
16061644 makeSomething(new Torus());
16071645 } else
1608
- if (event.getSource() == superItem)
1646
+ if (source == superItem)
16091647 {
16101648 makeSomething(new Superellipsoid());
16111649 } else
1612
- if (event.getSource() == kleinItem)
1650
+ if (source == kleinItem)
16131651 {
16141652 makeSomething(new Klein());
16151653 } else
1616
- if (event.getSource() == blobItem)
1654
+ if (source == blobItem)
16171655 {
16181656 Blob blob = new Blob();
16191657 BlobComponent comp = new BlobComponent();
....@@ -1621,15 +1659,15 @@
16211659 //blob.retile();
16221660 makeSomething(blob);
16231661 } else
1624
- if (event.getSource() == latheItem)
1662
+ if (source == latheItem)
16251663 {
16261664 makeSomething(new Lathe());
16271665 } else
1628
- if (event.getSource() == bezierItem)
1666
+ if (source == bezierItem)
16291667 {
16301668 makeSomething(new BezierSurface());
16311669 } else
1632
- if (event.getSource() == checkerItem)
1670
+ if (source == checkerItem)
16331671 {
16341672 /*
16351673 Object3D obj = new BezierSurface(5,8);
....@@ -1644,7 +1682,7 @@
16441682 */
16451683 makeSomething(new Checker());
16461684 } else
1647
- if (event.getSource() == meshItem)
1685
+ if (source == meshItem)
16481686 {
16491687 Object3D itemtomake = new Object3D();
16501688 Object3D child;
....@@ -1665,35 +1703,35 @@
16651703 makeSomething(child);
16661704 }
16671705 } else
1668
- if (event.getSource() == springItem)
1706
+ if (source == springItem)
16691707 {
16701708 cSpring s = new cSpring();
16711709 s.setup();
16721710 makeSomething(s);
16731711 } else
1674
- if (event.getSource() == flagItem)
1712
+ if (source == flagItem)
16751713 {
16761714 cSpring s = new cFlag();
16771715 s.setup();
16781716 makeSomething(s);
16791717 } else
1680
- if (event.getSource() == lightItem)
1718
+ if (source == lightItem)
16811719 {
16821720 makeSomething(new Light());
16831721 } else
1684
- if (event.getSource() == csgItem)
1722
+ if (source == csgItem)
16851723 {
16861724 group(new CSG());
16871725 } else
1688
- if (event.getSource() == templateItem)
1726
+ if (source == templateItem)
16891727 {
16901728 group(new cTemplate());
16911729 } else
1692
- if (event.getSource() == attributeItem)
1730
+ if (source == attributeItem)
16931731 {
16941732 makeSomething(new Attribute());
16951733 } else
1696
- if (event.getSource() == pointflowItem)
1734
+ if (source == pointflowItem)
16971735 {
16981736 makeSomething(new PointFlow());
16991737 } else
....@@ -1705,7 +1743,7 @@
17051743 } else
17061744 */
17071745
1708
- if (event.getSource() == superLoopItem)
1746
+ if (source == superLoopItem)
17091747 {
17101748 Composite g = new cGroup();
17111749 for (int i=0; i<15; i++)
....@@ -1727,7 +1765,7 @@
17271765
17281766 group(g);
17291767 } else
1730
- if (event.getSource() == loopItem)
1768
+ if (source == loopItem)
17311769 {
17321770 Composite csg = new GroupLeaf();
17331771 csg.count = 5;
....@@ -1736,7 +1774,7 @@
17361774 csg.addChild(child);
17371775 child.addChild(csg);
17381776 } else
1739
- if (event.getSource() == doubleItem)
1777
+ if (source == doubleItem)
17401778 {
17411779 Composite csg = new GroupLeaf();
17421780 csg.count = 5;
....@@ -1748,7 +1786,7 @@
17481786 csg.addChild(child);
17491787 child.addChild(csg);
17501788 } else
1751
- if (event.getSource() == tripleItem)
1789
+ if (source == tripleItem)
17521790 {
17531791 Composite csg = new GroupLeaf();
17541792 csg.count = 4;
....@@ -1764,70 +1802,70 @@
17641802 child.addChild(csg);
17651803 } else
17661804
1767
- if (event.getSource() == importGFDItem)
1805
+ if (source == importGFDItem)
17681806 {
17691807 ImportGFD();
17701808 } else
1771
- if (event.getSource() == importVRMLX3DItem)
1809
+ if (source == importVRMLX3DItem)
17721810 {
17731811 ImportVRMLX3D();
17741812 } else
1775
- if (event.getSource() == import3DSItem)
1813
+ if (source == import3DSItem)
17761814 {
17771815 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
17781816 } else
1779
- if (event.getSource() == importOBJItem)
1817
+ if (source == importOBJItem)
17801818 {
17811819 objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
17821820 } else
1783
- if (event.getSource() == computeAOItem)
1821
+ if (source == computeAOItem)
17841822 {
17851823 Globals.drawMode = CameraPane.OCCLUSION;
17861824 Globals.theRenderer.repaint();
17871825 } else
1788
- if (event.getSource() == recompileItem)
1826
+ if (source == recompileItem)
17891827 {
17901828 Recompile();
17911829 refreshContents();
17921830 } else
1793
- if (event.getSource() == editScriptItem)
1831
+ if (source == editScriptItem)
17941832 {
17951833 OpenDialog();
17961834 refreshContents();
17971835 } else
1798
- if (event.getSource() == invariantsItem)
1836
+ if (source == invariantsItem)
17991837 {
18001838 System.out.println("Invariants:");
18011839 GrafreeD.grafreeD.universe.invariants();
18021840 } else
1803
- if (event.getSource() == memoryItem)
1841
+ if (source == memoryItem)
18041842 {
18051843 //System.out.println("Invariants:");
18061844 PrintMemory();
18071845 } else
1808
- if (event.getSource() == pathItem)
1846
+ if (source == pathItem)
18091847 {
18101848 PrintPath();
18111849 } else
1812
- if (event.getSource() == analyzeItem)
1850
+ if (source == analyzeItem)
18131851 {
18141852 AnalyzeObject();
18151853 } else
1816
- if (event.getSource() == dumpItem)
1854
+ if (source == dumpItem)
18171855 {
18181856 DumpObject();
18191857 } else
1820
- if (event.getSource() == screenfitButton)
1858
+ if (source == screenfitButton)
18211859 {
18221860 //Reload(lastConverter, lastFilename, true);
18231861 ScreenFit();
18241862 } else
1825
- if (event.getSource() == screenfitpointButton)
1863
+ if (source == screenfitpointButton)
18261864 {
18271865 //Reload(lastConverter, lastFilename, true);
18281866 ScreenFitPoint();
18291867 } else
1830
- if (event.getSource() == snapobjectButton)
1868
+ if (source == snapobjectButton)
18311869 {
18321870 //Reload(lastConverter, lastFilename, true);
18331871 SnapObject();
....@@ -1838,13 +1876,13 @@
18381876 // Recompile();
18391877 // refreshContents();
18401878 // } else
1841
- if (event.getSource() == gcButton)
1879
+ if (source == gcButton)
18421880 {
18431881 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18441882 System.gc();
18451883 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18461884 } else
1847
- if (event.getSource() == editLeafItem)
1885
+ if (source == editLeafItem)
18481886 {
18491887 Object3D obj;
18501888 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1858,62 +1896,62 @@
18581896 }
18591897 refreshContents(true);
18601898 } else
1861
- if (event.getSource() == openWindowItem)
1899
+ if (source == openWindowItem)
18621900 {
18631901 EditSelection(true);
18641902 } else
1865
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1903
+ if (source == cutItem || source == clearButton)
18661904 {
18671905 loadClipboard(true);
18681906 } else
1869
- if (event.getSource() == duplicateItem)
1907
+ if (source == duplicateItem)
18701908 {
18711909 Object3D keep = GrafreeD.clipboard;
18721910 loadClipboard(false);
18731911 paste(false);
18741912 GrafreeD.clipboard = keep;
18751913 } else
1876
- if (event.getSource() == cloneItem)
1914
+ if (source == cloneItem)
18771915 {
18781916 CloneSelection(false);
18791917 } else
1880
- if (event.getSource() == cloneSupportItem)
1918
+ if (source == cloneSupportItem)
18811919 {
18821920 CloneSelection(true);
18831921 } else
1884
- if (event.getSource() == copyItem)
1922
+ if (source == copyItem)
18851923 {
18861924 loadClipboard(false);
18871925 } else
1888
- if (event.getSource() == pasteItem)
1926
+ if (source == pasteItem)
18891927 {
18901928 paste(false);
18911929 } else
1892
- if (event.getSource() == pasteLinkItem)
1930
+ if (source == pasteLinkItem)
18931931 {
18941932 pasteInto(false);
18951933 } else
1896
- if (event.getSource() == pasteCloneItem)
1934
+ if (source == pasteCloneItem)
18971935 {
18981936 pasteInto(true);
18991937 } else
1900
- if (event.getSource() == pasteExpandItem)
1938
+ if (source == pasteExpandItem)
19011939 {
19021940 paste(true);
19031941 } else
1904
- if (event.getSource() == synchronizeItem)
1942
+ if (source == synchronizeItem)
19051943 {
19061944 Overwrite(Object3D.TRANSFORM);
19071945 } else
1908
- if (event.getSource() == overwriteNameItem)
1946
+ if (source == overwriteNameItem)
19091947 {
19101948 Overwrite(Object3D.NAME);
19111949 } else
1912
- if (event.getSource() == overwriteUVItem)
1950
+ if (source == overwriteUVItem)
19131951 {
19141952 Overwrite(Object3D.UV);
19151953 } else
1916
- if (event.getSource() == overwriteMatItem)
1954
+ if (source == overwriteMatItem)
19171955 {
19181956 /* july 2015
19191957 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1933,7 +1971,7 @@
19331971
19341972 Overwrite(dropAttributes);
19351973 }
1936
- if (event.getSource() == overwriteGeoItem)
1974
+ if (source == overwriteGeoItem)
19371975 {
19381976 Overwrite(Object3D.GEOMETRY);
19391977 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1950,7 +1988,7 @@
19501988 // refreshContents();
19511989 // }
19521990 } else
1953
- if (event.getSource() == generateMeshItem)
1991
+ if (source == generateMeshItem)
19541992 {
19551993 //if (group.selection.size() == 1)
19561994 // for (int i=0; i<group.selection.size(); i++)
....@@ -1961,7 +1999,7 @@
19611999 ResetModel();
19622000 refreshContents();
19632001 } else
1964
- if (event.getSource() == extractGeometriesItem)
2002
+ if (source == extractGeometriesItem)
19652003 {
19662004 boolean one = false;
19672005
....@@ -1988,7 +2026,7 @@
19882026 ResetModel();
19892027 refreshContents();
19902028 } else
1991
- if (event.getSource() == cloneGeometriesItem)
2029
+ if (source == cloneGeometriesItem)
19922030 {
19932031 boolean one = false;
19942032
....@@ -2014,7 +2052,7 @@
20142052 ResetModel();
20152053 refreshContents();
20162054 } else
2017
- if (event.getSource() == shareGeometriesItem)
2055
+ if (source == shareGeometriesItem)
20182056 {
20192057 boolean one = false;
20202058
....@@ -2044,7 +2082,7 @@
20442082 refreshContents();
20452083 }
20462084 } else
2047
- if (event.getSource() == mergeGeometriesItem)
2085
+ if (source == mergeGeometriesItem)
20482086 {
20492087 boolean one = false;
20502088
....@@ -2074,7 +2112,7 @@
20742112 ResetModel();
20752113 refreshContents();
20762114 } else
2077
- if (event.getSource() == linkverticesItem)
2115
+ if (source == linkverticesItem)
20782116 {
20792117 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20802118 // {
....@@ -2107,7 +2145,7 @@
21072145 refreshContents();
21082146 }
21092147 } else
2110
- if (event.getSource() == resetsupportItem)
2148
+ if (source == resetsupportItem)
21112149 {
21122150 for (int i=0; i<group.selection.size(); i++)
21132151 {
....@@ -2119,7 +2157,7 @@
21192157
21202158 refreshContents();
21212159 } else
2122
- if (event.getSource() == relinkverticesItem)
2160
+ if (source == relinkverticesItem)
21232161 {
21242162 boolean random = CameraPane.RANDOM;
21252163 CameraPane.RANDOM = false; // parse all random nodes
....@@ -2128,7 +2166,7 @@
21282166
21292167 refreshContents();
21302168 } else
2131
- if (event.getSource() == resetreferencesItem)
2169
+ if (source == resetreferencesItem)
21322170 {
21332171 for (int i=0; i<group.selection.size(); i++)
21342172 {
....@@ -2137,7 +2175,7 @@
21372175
21382176 refreshContents();
21392177 } else
2140
- if (event.getSource() == setMasterItem)
2178
+ if (source == setMasterItem)
21412179 {
21422180 if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21432181 {
....@@ -2150,7 +2188,7 @@
21502188 refreshContents();
21512189 }
21522190 } else
2153
- if (event.getSource() == poseMeshItem)
2191
+ if (source == poseMeshItem)
21542192 {
21552193 if (group.selection.size() == 1)
21562194 {
....@@ -2169,19 +2207,19 @@
21692207 }
21702208
21712209 } else
2172
- if (event.getSource() == revertMeshItem)
2210
+ if (source == revertMeshItem)
21732211 {
21742212 RevertMeshes();
21752213 } else
2176
- if (event.getSource() == resetMeshItem)
2214
+ if (source == resetMeshItem)
21772215 {
21782216 ResetAll();
21792217 } else
2180
- if (event.getSource() == stepAllItem)
2218
+ if (source == stepAllItem)
21812219 {
21822220 StepAll();
21832221 } else
2184
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2222
+ if (source == clearItem) // || event.getSource() == clearButton)
21852223 {
21862224 //int indices[] = jList.getSelectedIndices();
21872225 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2189,46 +2227,46 @@
21892227
21902228 ClearSelection(false);
21912229 } else
2192
- if (event.getSource() == clearAllItem)
2230
+ if (source == clearAllItem)
21932231 {
21942232 ClearSelection(true);
21952233 } else
2196
- if (event.getSource() == grabItem)
2234
+ if (source == grabItem)
21972235 {
21982236 group(new cGroup(), true);
21992237 } else
2200
- if (event.getSource() == hideItem)
2238
+ if (source == hideItem)
22012239 {
22022240 group(new HiddenObject());
22032241 } else
2204
- if (event.getSource() == frontItem)
2242
+ if (source == frontItem)
22052243 {
22062244 front();
22072245 } else
2208
- if (event.getSource() == backItem)
2246
+ if (source == backItem)
22092247 {
22102248 back();
22112249 } else
2212
- if (event.getSource() == cameraItem)
2250
+ if (source == cameraItem)
22132251 {
22142252 makeSomething(new Camera());
22152253 } else
2216
- if (event.getSource() == compositeItem)
2254
+ if (source == compositeItem)
22172255 {
22182256 group(new Composite());
22192257 } else
2220
- if (event.getSource() == randomItem)
2258
+ if (source == randomItem)
22212259 {
22222260 RandomNode random = new RandomNode();
22232261 group(random);
22242262 if (random.size() > 0)
22252263 random.name = random.get(0).name + "Rnd";
22262264 } else
2227
- if (event.getSource() == physicsItem)
2265
+ if (source == physicsItem)
22282266 {
22292267 group(new PhysicsNode());
22302268 } else
2231
- if (event.getSource() == frameselectorItem)
2269
+ if (source == frameselectorItem)
22322270 {
22332271 for (int i=0; i<group.selection.size(); i++)
22342272 {
....@@ -2240,7 +2278,7 @@
22402278 ResetModel();
22412279 refreshContents();
22422280 } else
2243
- if (event.getSource() == switchGeoItem)
2281
+ if (source == switchGeoItem)
22442282 {
22452283 for (int i=0; i<group.selection.size(); i++)
22462284 {
....@@ -2252,7 +2290,7 @@
22522290 ResetModel();
22532291 refreshContents();
22542292 } else
2255
- if (event.getSource() == switchTransfoItem)
2293
+ if (source == switchTransfoItem)
22562294 {
22572295 for (int i=0; i<group.selection.size(); i++)
22582296 {
....@@ -2264,7 +2302,7 @@
22642302 ResetModel();
22652303 refreshContents();
22662304 } else
2267
- if (event.getSource() == morphItem)
2305
+ if (source == morphItem)
22682306 {
22692307 for (int i=0; i<group.selection.size(); i++)
22702308 {
....@@ -2276,7 +2314,7 @@
22762314 ResetModel();
22772315 refreshContents();
22782316 } else
2279
- if (event.getSource() == scriptNodeItem)
2317
+ if (source == scriptNodeItem)
22802318 {
22812319 boolean atleastone = false;
22822320
....@@ -2315,31 +2353,31 @@
23152353 }
23162354 }
23172355 } else
2318
- if (event.getSource() == linkerItem)
2356
+ if (source == linkerItem)
23192357 {
23202358 group(new cLinker());
23212359 } else
2322
- if (event.getSource() == textureItem)
2360
+ if (source == textureItem)
23232361 {
23242362 group(new TextureNode());
23252363 } else
2326
- if (event.getSource() == billboardItem)
2364
+ if (source == billboardItem)
23272365 {
23282366 group(new BillboardNode());
23292367 } else
2330
- if (event.getSource() == shadowXItem)
2368
+ if (source == shadowXItem)
23312369 {
23322370 CastShadow(0);
23332371 } else
2334
- if (event.getSource() == shadowYItem)
2372
+ if (source == shadowYItem)
23352373 {
23362374 CastShadow(1);
23372375 } else
2338
- if (event.getSource() == shadowZItem)
2376
+ if (source == shadowZItem)
23392377 {
23402378 CastShadow(2);
23412379 } else
2342
- if (event.getSource() == ungroupItem)
2380
+ if (source == ungroupItem)
23432381 {
23442382 //ungroup();
23452383 for (int i=0; i<group.selection.size(); i++)
....@@ -2351,179 +2389,179 @@
23512389
23522390 refreshContents();
23532391 } else
2354
- if (event.getSource() == genUVItem)
2392
+ if (source == genUVItem)
23552393 {
23562394 GenUV();
23572395 } else
2358
- if (event.getSource() == genNormalsCADItem)
2396
+ if (source == genNormalsCADItem)
23592397 {
23602398 GenNormals(true);
23612399 } else
2362
- if (event.getSource() == genNormalsMESHItem)
2400
+ if (source == genNormalsMESHItem)
23632401 {
23642402 GenNormals(true); // TODO
23652403 } else
2366
- if (event.getSource() == genNormalsORGANItem)
2404
+ if (source == genNormalsORGANItem)
23672405 {
23682406 GenNormals(false);
23692407 } else
2370
- if (event.getSource() == genNormalsMINEItem)
2408
+ if (source == genNormalsMINEItem)
23712409 {
23722410 GenNormalsMINE();
23732411 } else
2374
- if (event.getSource() == stripifyItem)
2412
+ if (source == stripifyItem)
23752413 {
23762414 Stripify();
23772415 } else
2378
- if (event.getSource() == unstripifyItem)
2416
+ if (source == unstripifyItem)
23792417 {
23802418 Unstripify();
23812419 } else
2382
- if (event.getSource() == trimItem)
2420
+ if (source == trimItem)
23832421 {
23842422 Trim();
23852423 } else
2386
- if (event.getSource() == untrimItem)
2424
+ if (source == untrimItem)
23872425 {
23882426 Untrim();
23892427 } else
2390
- if (event.getSource() == clearColorsItem)
2428
+ if (source == clearColorsItem)
23912429 {
23922430 ClearColors();
23932431 } else
2394
- if (event.getSource() == clearMaterialsItem)
2432
+ if (source == clearMaterialsItem)
23952433 {
23962434 ClearMaterials();
23972435 } else
2398
- if (event.getSource() == liveleavesItem)
2436
+ if (source == liveleavesItem)
23992437 {
24002438 LiveLeaves(true);
24012439 } else
2402
- if (event.getSource() == unliveleavesItem)
2440
+ if (source == unliveleavesItem)
24032441 {
24042442 LiveLeaves(false);
24052443 } else
2406
- if (event.getSource() == supportleavesItem)
2444
+ if (source == supportleavesItem)
24072445 {
24082446 SupportLeaves(true);
24092447 } else
2410
- if (event.getSource() == unsupportleavesItem)
2448
+ if (source == unsupportleavesItem)
24112449 {
24122450 SupportLeaves(false);
24132451 } else
2414
- if (event.getSource() == hideleavesItem)
2452
+ if (source == hideleavesItem)
24152453 {
24162454 HideLeaves(true);
24172455 } else
2418
- if (event.getSource() == showleavesItem)
2456
+ if (source == showleavesItem)
24192457 {
24202458 HideLeaves(false);
24212459 } else
2422
- if (event.getSource() == markleavesItem)
2460
+ if (source == markleavesItem)
24232461 {
24242462 MarkLeaves(true);
24252463 } else
2426
- if (event.getSource() == unmarkleavesItem)
2464
+ if (source == unmarkleavesItem)
24272465 {
24282466 MarkLeaves(false);
24292467 } else
2430
- if (event.getSource() == flipVItem)
2468
+ if (source == flipVItem)
24312469 {
24322470 FlipV(true);
24332471 } else
2434
- if (event.getSource() == unflipVItem)
2472
+ if (source == unflipVItem)
24352473 {
24362474 FlipV(false);
24372475 } else
2438
- if (event.getSource() == lowTexturesItem)
2476
+ if (source == lowTexturesItem)
24392477 {
24402478 SetTexRes(0);
24412479 } else
2442
- if (event.getSource() == normalTexturesItem)
2480
+ if (source == normalTexturesItem)
24432481 {
24442482 SetTexRes(1);
24452483 } else
2446
- if (event.getSource() == highTexturesItem)
2484
+ if (source == highTexturesItem)
24472485 {
24482486 SetTexRes(2);
24492487 } else
2450
- if (event.getSource() == veryhighTexturesItem)
2488
+ if (source == veryhighTexturesItem)
24512489 {
24522490 SetTexRes(3);
24532491 } else
2454
- if (event.getSource() == maxTexturesItem)
2492
+ if (source == maxTexturesItem)
24552493 {
24562494 SetTexRes(4);
24572495 } else
2458
- if (event.getSource() == panoTexturesItem)
2496
+ if (source == panoTexturesItem)
24592497 {
24602498 SetTexRes(5);
24612499 } else
2462
- if (event.getSource() == reverseNormalsItem)
2500
+ if (source == reverseNormalsItem)
24632501 {
24642502 ReverseNormals();
24652503 } else
2466
- if (event.getSource() == parseverticesItem)
2504
+ if (source == parseverticesItem)
24672505 {
24682506 ParseVertices();
24692507 } else
2470
- if (event.getSource() == textureFieldItem)
2508
+ if (source == textureFieldItem)
24712509 {
24722510 TextureVertices();
24732511 } else
2474
- if (event.getSource() == alignItem)
2512
+ if (source == alignItem)
24752513 {
24762514 Align();
24772515 } else
2478
- if (event.getSource() == mirrorItem)
2516
+ if (source == mirrorItem)
24792517 {
24802518 MirrorPoses();
24812519 } else
2482
- if (event.getSource() == reduceMorphItem)
2520
+ if (source == reduceMorphItem)
24832521 {
24842522 MeshReduction(false);
24852523 } else
2486
- if (event.getSource() == reduce34MorphItem)
2524
+ if (source == reduce34MorphItem)
24872525 {
24882526 MeshReduction(true);
24892527 } else
2490
- if (event.getSource() == reverseTrianglesItem)
2528
+ if (source == reverseTrianglesItem)
24912529 {
24922530 ReverseTriangles();
24932531 } else
2494
- if (event.getSource() == reduceMeshItem)
2532
+ if (source == reduceMeshItem)
24952533 {
24962534 ReduceMesh(false);
24972535 } else
2498
- if (event.getSource() == reduce34MeshItem)
2536
+ if (source == reduce34MeshItem)
24992537 {
25002538 ReduceMesh(true);
25012539 } else
2502
- if (event.getSource() == increaseMeshItem)
2540
+ if (source == increaseMeshItem)
25032541 {
25042542 IncreaseMesh();
25052543 } else
2506
- if (event.getSource() == clipMeshItem)
2544
+ if (source == clipMeshItem)
25072545 {
25082546 ClipMesh();
25092547 } else
2510
- if (event.getSource() == smoothMeshItem)
2548
+ if (source == smoothMeshItem)
25112549 {
25122550 SmoothMesh();
25132551 } else
2514
- if (event.getSource() == transformgeometryItem)
2552
+ if (source == transformgeometryItem)
25152553 {
25162554 TransformGeometry();
25172555 } else
2518
- if (event.getSource() == resetTransformItem)
2556
+ if (source == resetTransformItem)
25192557 {
25202558 ResetTransform();
25212559 } else
2522
- if (event.getSource() == resetCentroidItem)
2560
+ if (source == resetCentroidItem)
25232561 {
25242562 ResetCentroid();
25252563 } else
2526
- if (event.getSource() == resetParentItem)
2564
+ if (source == resetParentItem)
25272565 {
25282566 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25292567 {
....@@ -2533,7 +2571,7 @@
25332571
25342572 refreshContents();
25352573 } else
2536
- if (event.getSource() == repairParentItem)
2574
+ if (source == repairParentItem)
25372575 {
25382576 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25392577 {
....@@ -2547,7 +2585,7 @@
25472585
25482586 refreshContents();
25492587 } else
2550
- if (event.getSource() == repairShadowItem)
2588
+ if (source == repairShadowItem)
25512589 {
25522590 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25532591 {
....@@ -2561,7 +2599,7 @@
25612599
25622600 refreshContents();
25632601 } else
2564
- if (event.getSource() == sortbysizeItem)
2602
+ if (source == sortbysizeItem)
25652603 {
25662604 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25672605 {
....@@ -2573,7 +2611,7 @@
25732611 ResetModel();
25742612 refreshContents();
25752613 } else
2576
- if (event.getSource() == sortbynameItem)
2614
+ if (source == sortbynameItem)
25772615 {
25782616 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25792617 {
....@@ -2585,7 +2623,7 @@
25852623 ResetModel();
25862624 refreshContents();
25872625 } else
2588
- if (event.getSource() == attachPigmentItem)
2626
+ if (source == attachPigmentItem)
25892627 {
25902628 String texture = GetFile("Attach pigment");
25912629 Object3D obj;
....@@ -2597,7 +2635,7 @@
25972635
25982636 refreshContents();
25992637 } else
2600
- if (event.getSource() == detachPigmentItem)
2638
+ if (source == detachPigmentItem)
26012639 {
26022640 Object3D obj;
26032641 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2608,7 +2646,7 @@
26082646
26092647 refreshContents();
26102648 } else
2611
- if (event.getSource() == attachBumpItem)
2649
+ if (source == attachBumpItem)
26122650 {
26132651 String texture = GetFile("Attach bump");
26142652 Object3D obj;
....@@ -2620,7 +2658,7 @@
26202658
26212659 refreshContents();
26222660 } else
2623
- if (event.getSource() == detachBumpItem)
2661
+ if (source == detachBumpItem)
26242662 {
26252663 Object3D obj;
26262664 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2631,7 +2669,7 @@
26312669
26322670 refreshContents();
26332671 } else
2634
- if (event.getSource() == pigmentBumpItem)
2672
+ if (source == pigmentBumpItem)
26352673 {
26362674 Object3D obj;
26372675 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2642,158 +2680,195 @@
26422680
26432681 refreshContents();
26442682 } else
2645
- if (event.getSource() == flashSelectionButton)
2683
+ if (source == flashSelectionButton)
26462684 {
26472685 CameraPane.flash = true;
26482686 refreshContents();
26492687 } else
2650
- if (event.getSource() == oneButton)
2688
+ if (source == oneButton)
26512689 {
26522690 } else
2653
- if (event.getSource() == twoButton)
2691
+ if (source == twoButton)
26542692 {
26552693 radio.layout = twoButton;
26562694 // bug
26572695 //gridPanel.setDividerLocation(1.0);
26582696 //bigPanel.setDividerLocation(0.0);
2659
- bigThree.remove(scenePanel);
2660
- bigThree.remove(centralPanel);
2661
- bigThree.remove(XYZPanel);
2662
- aWindowConstraints.gridx = 0;
2663
- aWindowConstraints.gridy = 0;
2664
- aWindowConstraints.gridwidth = 1;
2665
- // aConstraints.gridheight = 3;
2666
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2667
- aWindowConstraints.weightx = 0;
2668
- aWindowConstraints.weighty = 1;
2669
- //bigThree.add(jtp, aWindowConstraints);
2670
- aWindowConstraints.weightx = 1;
2671
- aWindowConstraints.gridwidth = 3;
2672
- // aConstraints.gridheight = 3;
2673
- aWindowConstraints.gridx = 1;
2674
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2675
- bigThree.add(centralPanel, aWindowConstraints);
2676
- aWindowConstraints.weightx = 0;
2677
- aWindowConstraints.gridx = 4;
2678
- aWindowConstraints.gridwidth = 1;
2679
- // aConstraints.gridheight = 3;
2680
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2681
- //bigThree.add(XYZPanel, aWindowConstraints);
2682
- bigThree.revalidate();
2697
+// bigThree.remove(scenePanel);
2698
+// bigThree.remove(centralPanel);
2699
+// bigThree.remove(XYZPanel);
2700
+// aWindowConstraints.gridx = 0;
2701
+// aWindowConstraints.gridy = 0;
2702
+// aWindowConstraints.gridwidth = 1;
2703
+// // aConstraints.gridheight = 3;
2704
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2705
+// aWindowConstraints.weightx = 0;
2706
+// aWindowConstraints.weighty = 1;
2707
+// //bigThree.add(jtp, aWindowConstraints);
2708
+// aWindowConstraints.weightx = 1;
2709
+// aWindowConstraints.gridwidth = 3;
2710
+// // aConstraints.gridheight = 3;
2711
+// aWindowConstraints.gridx = 1;
2712
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2713
+// bigThree.add(centralPanel, aWindowConstraints);
2714
+// aWindowConstraints.weightx = 0;
2715
+// aWindowConstraints.gridx = 4;
2716
+// aWindowConstraints.gridwidth = 1;
2717
+// // aConstraints.gridheight = 3;
2718
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2719
+// //bigThree.add(XYZPanel, aWindowConstraints);
2720
+// scenePanel.setVisible(false);
2721
+// centralPanel.setVisible(true);
2722
+// XYZPanel.setVisible(false);
2723
+ bigThree.ClearUI();
2724
+ bigThree.add(centralPanel);
2725
+ bigThree.FlushUI();
26832726 } else
2684
- if (event.getSource() == threeButton)
2727
+ if (source == threeButton)
26852728 {
26862729 radio.layout = threeButton;
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
- aConstraints.fill = GridBagConstraints.VERTICAL;
2709
- bigThree.add(XYZPanel, aWindowConstraints);
2710
- bigThree.revalidate();
2730
+
2731
+// bigThree.remove(scenePanel);
2732
+// bigThree.remove(centralPanel);
2733
+// bigThree.remove(XYZPanel);
2734
+// aWindowConstraints.gridx = 0;
2735
+// aWindowConstraints.gridy = 0;
2736
+// aWindowConstraints.gridwidth = 1;
2737
+// // aConstraints.gridheight = 3;
2738
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2739
+// aWindowConstraints.weightx = 0;
2740
+// aWindowConstraints.weighty = 1;
2741
+// //bigThree.add(jtp, aWindowConstraints);
2742
+// aWindowConstraints.weightx = 1;
2743
+// aWindowConstraints.gridwidth = 3;
2744
+// // aConstraints.gridheight = 3;
2745
+// aWindowConstraints.gridx = 1;
2746
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2747
+// bigThree.add(centralPanel, aWindowConstraints);
2748
+// aWindowConstraints.weightx = 0;
2749
+// aWindowConstraints.gridx = 4;
2750
+// aWindowConstraints.gridwidth = 1;
2751
+// // aConstraints.gridheight = 3;
2752
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2753
+// bigThree.add(XYZPanel, aWindowConstraints);
2754
+// bigThree.validate();
2755
+// scenePanel.setVisible(false);
2756
+// centralPanel.setVisible(true);
2757
+// XYZPanel.setVisible(true);
2758
+ bigThree.ClearUI();
2759
+ bigThree.add(centralPanel);
2760
+ bigThree.add(XYZPanel);
2761
+ bigThree.FlushUI();
27112762 } else
2712
- if (event.getSource() == fourButton)
2763
+ if (source == fourButton)
27132764 {
27142765 radio.layout = fourButton;
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
- // aWindowConstraints.gridheight = 3;
2722
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2723
- aWindowConstraints.weightx = 1;
2724
- aWindowConstraints.weighty = 1;
2725
- bigThree.add(scenePanel, 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(cameraPanel, aWindowConstraints);
2732
- aWindowConstraints.weightx = 0;
2733
- aWindowConstraints.gridx = 4;
2734
- aWindowConstraints.gridwidth = 1;
2735
- // aWindowConstraints.gridheight = 3;
2736
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2737
- //bigThree.add(XYZPanel, aWindowConstraints);
2738
- bigThree.revalidate();
2766
+
2767
+// bigThree.remove(scenePanel);
2768
+// bigThree.remove(centralPanel);
2769
+// bigThree.remove(XYZPanel);
2770
+// aWindowConstraints.gridx = 0;
2771
+// aWindowConstraints.gridy = 0;
2772
+// aWindowConstraints.gridwidth = 1;
2773
+// // aWindowConstraints.gridheight = 3;
2774
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2775
+// aWindowConstraints.weightx = 1;
2776
+// aWindowConstraints.weighty = 1;
2777
+// bigThree.add(scenePanel, aWindowConstraints);
2778
+// aWindowConstraints.weightx = 1;
2779
+// aWindowConstraints.gridwidth = 3;
2780
+// // aConstraints.gridheight = 3;
2781
+// aWindowConstraints.gridx = 1;
2782
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2783
+// //bigThree.add(cameraPanel, aWindowConstraints);
2784
+// aWindowConstraints.weightx = 0;
2785
+// aWindowConstraints.gridx = 4;
2786
+// aWindowConstraints.gridwidth = 1;
2787
+// // aWindowConstraints.gridheight = 3;
2788
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2789
+// //bigThree.add(XYZPanel, aWindowConstraints);
2790
+// bigThree.validate();
2791
+// scenePanel.setVisible(true);
2792
+// centralPanel.setVisible(false);
2793
+// XYZPanel.setVisible(false);
2794
+ bigThree.ClearUI();
2795
+ bigThree.add(scenePanel);
2796
+ bigThree.FlushUI();
27392797 } else
2740
- if (event.getSource() == sixButton)
2798
+ if (source == sixButton)
27412799 {
27422800 radio.layout = sixButton;
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
- // aConstraints.gridheight = 3;
2750
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2751
- aWindowConstraints.weightx = 0;
2752
- aWindowConstraints.weighty = 1;
2753
- bigThree.add(scenePanel, aWindowConstraints);
2754
- aWindowConstraints.weightx = 1;
2755
- aWindowConstraints.gridwidth = 3;
2756
- // aWindowConstraints.gridheight = 3;
2757
- aWindowConstraints.gridx = 1;
2758
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2759
- bigThree.add(centralPanel, 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, aConstraints);
2766
- bigThree.revalidate();
2801
+
2802
+// bigThree.remove(scenePanel);
2803
+// bigThree.remove(centralPanel);
2804
+// bigThree.remove(XYZPanel);
2805
+// aWindowConstraints.gridx = 0;
2806
+// aWindowConstraints.gridy = 0;
2807
+// aWindowConstraints.gridwidth = 1;
2808
+// // aConstraints.gridheight = 3;
2809
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2810
+// aWindowConstraints.weightx = 0;
2811
+// aWindowConstraints.weighty = 1;
2812
+// bigThree.add(scenePanel, aWindowConstraints);
2813
+// aWindowConstraints.weightx = 1;
2814
+// aWindowConstraints.gridwidth = 3;
2815
+// // aWindowConstraints.gridheight = 3;
2816
+// aWindowConstraints.gridx = 1;
2817
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2818
+// bigThree.add(centralPanel, aWindowConstraints);
2819
+// aWindowConstraints.weightx = 0;
2820
+// aWindowConstraints.gridx = 4;
2821
+// aWindowConstraints.gridwidth = 1;
2822
+// // aWindowConstraints.gridheight = 3;
2823
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2824
+// //bigThree.add(XYZPanel, aConstraints);
2825
+// bigThree.validate();
2826
+// scenePanel.setVisible(true);
2827
+// centralPanel.setVisible(true);
2828
+// XYZPanel.setVisible(false);
2829
+ bigThree.ClearUI();
2830
+ bigThree.add(scenePanel);
2831
+ bigThree.add(centralPanel);
2832
+ bigThree.FlushUI();
27672833 } else
2768
- if (event.getSource() == sevenButton)
2834
+ if (source == sevenButton)
27692835 {
27702836 radio.layout = sevenButton;
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
- // aWindowConstraints.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
- // aConstraints.gridheight = 3;
2792
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2793
- bigThree.add(XYZPanel, aWindowConstraints);
2794
- bigThree.revalidate();
2837
+
2838
+// bigThree.remove(scenePanel);
2839
+// bigThree.remove(centralPanel);
2840
+// bigThree.remove(XYZPanel);
2841
+// aWindowConstraints.gridx = 0;
2842
+// aWindowConstraints.gridy = 0;
2843
+// aWindowConstraints.gridwidth = 1;
2844
+// // aWindowConstraints.gridheight = 3;
2845
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2846
+// aWindowConstraints.weightx = 0;
2847
+// aWindowConstraints.weighty = 1;
2848
+// bigThree.add(scenePanel, aWindowConstraints);
2849
+// aWindowConstraints.weightx = 1;
2850
+// aWindowConstraints.gridwidth = 3;
2851
+// // aWindowConstraints.gridheight = 3;
2852
+// aWindowConstraints.gridx = 1;
2853
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2854
+// bigThree.add(centralPanel, aWindowConstraints);
2855
+// aWindowConstraints.weightx = 0;
2856
+// aWindowConstraints.gridx = 4;
2857
+// aWindowConstraints.gridwidth = 1;
2858
+// // aConstraints.gridheight = 3;
2859
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2860
+// bigThree.add(XYZPanel, aWindowConstraints);
2861
+// bigThree.validate();
2862
+// scenePanel.setVisible(true);
2863
+// centralPanel.setVisible(true);
2864
+// XYZPanel.setVisible(true);
2865
+ bigThree.ClearUI();
2866
+ bigThree.add(scenePanel);
2867
+ bigThree.add(centralPanel);
2868
+ bigThree.add(XYZPanel);
2869
+ bigThree.FlushUI();
27952870 } else
2796
- if (event.getSource() == rootButton)
2871
+ if (source == rootButton)
27972872 {
27982873 Object3D obj;
27992874 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2805,7 +2880,7 @@
28052880
28062881 refreshContents(true);
28072882 } else
2808
- if (event.getSource() == closeButton)
2883
+ if (source == closeButton)
28092884 {
28102885 //System.out.println("CLOSE: " + buttonGroup.getSelection());
28112886 cRadio ab;
....@@ -2826,11 +2901,11 @@
28262901 }
28272902 refreshContents(true);
28282903 } else
2829
- if (event.getSource() == editItem || event.getSource() == editButton)
2904
+ if (source == editItem || source == editButton)
28302905 {
28312906 EditSelection(false);
28322907 } else
2833
- if (event.getSource() == uneditButton)
2908
+ if (source == uneditButton)
28342909 {
28352910 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28362911 {
....@@ -2842,12 +2917,12 @@
28422917
28432918 child.editWindow = null; // ???????????
28442919 }
2845
- objEditor.ctrlPanel.revalidate();
2920
+ objEditor.ctrlPanel.validate();
28462921 //objEditor.jTree.clearSelection();
28472922 //objEditor.ResetSliders();
28482923 refreshContents(true);
28492924 } else
2850
- if (event.getSource() == clearPanelButton)
2925
+ if (source == clearPanelButton)
28512926 {
28522927 assert(copy == group);
28532928 //copy.ClearUI();
....@@ -2858,7 +2933,7 @@
28582933 listUI.clear();
28592934 refreshContents(true);
28602935 } else
2861
- if (event.getSource() == allParamsButton)
2936
+ if (source == allParamsButton)
28622937 {
28632938 assert(copy == group);
28642939
....@@ -2879,19 +2954,19 @@
28792954
28802955 refreshContents(true);
28812956 } else
2882
- if (event.getSource() == unselectButton)
2957
+ if (source == unselectButton)
28832958 {
28842959 objEditor.jTree.clearSelection();
28852960 // ?? oct 2012 GrafreeD.clipboard.clear();
28862961 objEditor.ResetSliders();
28872962 refreshContents(true);
28882963 } else
2889
- if(event.getSource() instanceof cRadio)
2964
+ if(source instanceof cRadio)
28902965 {
28912966 group.parent = keepparent;
28922967 group.attributes = 0;
28932968 //group.editWindow = null;
2894
- /*cRadio*/ radio = (cRadio)event.getSource();
2969
+ /*cRadio*/ radio = (cRadio)source;
28952970 Object3D obj = radio.GetObject();
28962971 System.out.println("Edit " + obj);
28972972 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)