Normand Briere
2019-04-29 bed42c663d286d76a32f155049f9efabc2fdb73f
GroupEditor.java
....@@ -434,76 +434,24 @@
434434 oe.buttonGroup.add(dummyButton);
435435 */
436436 aConstraints.gridy += 1;
437
+
438
+ //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
439
+
437440 oe.aConstraints.gridwidth = 1;
438441 oe.aConstraints.gridx = 0;
439442
440443 oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints);
444
+ liveCB.setToolTipText("Enabled animation");
441445 liveCB.addItemListener(this);
442446
443447 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);
448
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK), oe.aConstraints);
449
+ trackCB.setToolTipText("Enable tracking");
503450 trackCB.addItemListener(this);
504451
505452 oe.aConstraints.gridx += 1;
506453 oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
454
+ screenfitButton.setToolTipText("Screen fit");
507455 screenfitButton.addActionListener(this);
508456 oe.aConstraints.gridx += 1;
509457 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
....@@ -511,6 +459,7 @@
511459 // oe.aConstraints.gridx += 1;
512460 oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
513461 snapobjectButton.addActionListener(this);
462
+ snapobjectButton.setToolTipText("Snap Object");
514463 oe.aConstraints.gridx += 1;
515464
516465 //aConstraints.gridx = 0;
....@@ -519,6 +468,7 @@
519468 oe.aConstraints.gridwidth = 1;
520469
521470 oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
471
+ flashSelectionButton.setToolTipText("Show selection");
522472 flashSelectionButton.addActionListener(this);
523473
524474 oe.toolbarPanel.add(new cButton(" ", false));
....@@ -529,21 +479,28 @@
529479
530480 //
531481 oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
482
+ twoButton.setToolTipText("Show center view only");
532483 twoButton.addActionListener(this);
533484 oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
534485 fourButton.addActionListener(this);
486
+ fourButton.setToolTipText("Show left panel only");
535487 oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
488
+ sixButton.setToolTipText("2-column layout left");
536489 sixButton.addActionListener(this);
537490 oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
491
+ threeButton.setToolTipText("2-column layout right");
538492 threeButton.addActionListener(this);
539493 oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
494
+ sevenButton.setToolTipText("3-column layout");
540495 sevenButton.addActionListener(this);
541496 //
542497
543
- oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints);
498
+ oe.toolbarPanel.add(rootButton = new cButton(" o o o ")); //, oe.aConstraints);
499
+ rootButton.setToolTipText("Edit object in new tab");
544500 rootButton.addActionListener(this);
545501 oe.aConstraints.gridx += 1;
546502 oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
503
+ closeButton.setToolTipText("Close tab");
547504 closeButton.addActionListener(this);
548505 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
549506 //clearButton.addActionListener(this);
....@@ -646,6 +603,80 @@
646603 radio.layout = sevenButton;
647604 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
648605 }
606
+
607
+ void AddOptions(JPanel panel, GridBagConstraints constraints)
608
+ {
609
+ constraints.gridx = 0;
610
+ constraints.gridy = 0;
611
+ panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), constraints);
612
+ fastCB.setToolTipText("Fast mode");
613
+ fastCB.addItemListener(this);
614
+ constraints.gridy += 1;
615
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), constraints);
616
+ supportCB.setToolTipText("Enabled rigging");
617
+ supportCB.addItemListener(this);
618
+
619
+ // constraints.gridy += 1;
620
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
621
+ // localCB.addItemListener(this);
622
+
623
+ constraints.gridy += 1;
624
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD), constraints);
625
+ crowdCB.setToolTipText("Used for crowds");
626
+ crowdCB.addItemListener(this);
627
+
628
+ constraints.gridy += 1;
629
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), constraints);
630
+ smoothCB.setToolTipText("Snapping delay");
631
+ smoothCB.addItemListener(this);
632
+
633
+ constraints.gridy += 1;
634
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), constraints);
635
+ slowCB.setToolTipText("Smooth interpolation");
636
+ slowCB.addItemListener(this);
637
+ constraints.gridy += 1;
638
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE), constraints);
639
+ boxCB.setToolTipText("Display bounding boxes");
640
+ boxCB.addItemListener(this);
641
+ constraints.gridy += 1;
642
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE), constraints);
643
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
644
+ zoomBoxCB.addItemListener(this);
645
+
646
+// constraints.gridy += 1;
647
+// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
648
+// speakerMocapCB.addItemListener(this);
649
+
650
+ if (false)
651
+ {
652
+ // handled in scripts
653
+ constraints.gridy += 1;
654
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), constraints);
655
+ speakerCameraCB.addItemListener(this);
656
+
657
+ constraints.gridy += 1;
658
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), constraints);
659
+ speakerFocusCB.addItemListener(this);
660
+
661
+ constraints.gridy += 1;
662
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), constraints);
663
+ smoothfocusCB.addItemListener(this);
664
+ }
665
+
666
+//constraints.gridx += 1;
667
+//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
668
+// debugCB.addItemListener(this);
669
+
670
+ constraints.gridy += 1;
671
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL), constraints);
672
+ oeilCB.addItemListener(this);
673
+
674
+ constraints.gridy += 1;
675
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT), constraints);
676
+ lookAtCB.setToolTipText("Look-at target");
677
+ lookAtCB.addItemListener(this);
678
+
679
+ }
649680
650681 void EditObject(Object3D obj)
651682 {
....@@ -676,6 +707,7 @@
676707 JCheckBox fastCB;
677708 JCheckBox slowCB;
678709 JCheckBox boxCB;
710
+ JCheckBox zoomBoxCB;
679711 JCheckBox trackCB;
680712 JCheckBox smoothfocusCB;
681713 // JCheckBox speakerMocapCB;
....@@ -755,6 +787,10 @@
755787 Recompile();
756788 cameraView.repaint();
757789 // refreshContents();
790
+ }
791
+ else if(e.getSource() == zoomBoxCB)
792
+ {
793
+ cameraView.ToggleZoomBoxMode();
758794 }
759795 else if(e.getSource() == smoothfocusCB)
760796 {
....@@ -1482,6 +1518,7 @@
14821518 //
14831519 public void actionPerformed(ActionEvent event) // , Object arg)
14841520 {
1521
+ Object source = event.getSource();
14851522 /*
14861523 if (event.getSource() == nameField)
14871524 {
....@@ -1493,11 +1530,11 @@
14931530 }
14941531 else
14951532 */
1496
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1533
+ if (source == lookAtItem || source == lookFromItem)
14971534 {
14981535 ScreenFit();
14991536 } else
1500
- if (event.getSource() == switchItem)
1537
+ if (source == switchItem)
15011538 {
15021539 cVector v1 = new cVector();
15031540 cVector v2 = new cVector();
....@@ -1506,11 +1543,11 @@
15061543 objEditor.cameraView.renderCamera.setAim(v2, v1);
15071544 objEditor.cameraView.repaint();
15081545 } else
1509
- if (event.getSource() == rectoidItem)
1546
+ if (source == rectoidItem)
15101547 {
15111548 makeSomething(new Box());
15121549 } else
1513
- if (event.getSource() == particleItem)
1550
+ if (source == particleItem)
15141551 {
15151552 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15161553 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1531,9 +1568,9 @@
15311568 applyExample(particleGeom, "SMOKE");
15321569 makeSomething(particleGeom);
15331570 } else
1534
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1571
+ if (source == ragdollItem || source == ragdoll2Item)
15351572 {
1536
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1573
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15371574
15381575 ragdoll.toParent = LA.newMatrix();
15391576 ragdoll.fromParent = LA.newMatrix();
....@@ -1551,7 +1588,7 @@
15511588 } else
15521589 /*
15531590 */
1554
- if (event.getSource() == heightFieldItem)
1591
+ if (source == heightFieldItem)
15551592 {
15561593 Object3D obj = new Object3D();
15571594
....@@ -1589,31 +1626,31 @@
15891626
15901627 makeSomething(obj);
15911628 } else
1592
- if (event.getSource() == gridItem)
1629
+ if (source == gridItem)
15931630 {
15941631 makeSomething(new Grid());
15951632 } else
1596
- if (event.getSource() == ellipsoidItem)
1633
+ if (source == ellipsoidItem)
15971634 {
15981635 makeSomething(new Sphere());
15991636 } else
1600
- if (event.getSource() == coneItem)
1637
+ if (source == coneItem)
16011638 {
16021639 makeSomething(new Cone());
16031640 } else
1604
- if (event.getSource() == torusItem)
1641
+ if (source == torusItem)
16051642 {
16061643 makeSomething(new Torus());
16071644 } else
1608
- if (event.getSource() == superItem)
1645
+ if (source == superItem)
16091646 {
16101647 makeSomething(new Superellipsoid());
16111648 } else
1612
- if (event.getSource() == kleinItem)
1649
+ if (source == kleinItem)
16131650 {
16141651 makeSomething(new Klein());
16151652 } else
1616
- if (event.getSource() == blobItem)
1653
+ if (source == blobItem)
16171654 {
16181655 Blob blob = new Blob();
16191656 BlobComponent comp = new BlobComponent();
....@@ -1621,15 +1658,15 @@
16211658 //blob.retile();
16221659 makeSomething(blob);
16231660 } else
1624
- if (event.getSource() == latheItem)
1661
+ if (source == latheItem)
16251662 {
16261663 makeSomething(new Lathe());
16271664 } else
1628
- if (event.getSource() == bezierItem)
1665
+ if (source == bezierItem)
16291666 {
16301667 makeSomething(new BezierSurface());
16311668 } else
1632
- if (event.getSource() == checkerItem)
1669
+ if (source == checkerItem)
16331670 {
16341671 /*
16351672 Object3D obj = new BezierSurface(5,8);
....@@ -1644,7 +1681,7 @@
16441681 */
16451682 makeSomething(new Checker());
16461683 } else
1647
- if (event.getSource() == meshItem)
1684
+ if (source == meshItem)
16481685 {
16491686 Object3D itemtomake = new Object3D();
16501687 Object3D child;
....@@ -1665,35 +1702,35 @@
16651702 makeSomething(child);
16661703 }
16671704 } else
1668
- if (event.getSource() == springItem)
1705
+ if (source == springItem)
16691706 {
16701707 cSpring s = new cSpring();
16711708 s.setup();
16721709 makeSomething(s);
16731710 } else
1674
- if (event.getSource() == flagItem)
1711
+ if (source == flagItem)
16751712 {
16761713 cSpring s = new cFlag();
16771714 s.setup();
16781715 makeSomething(s);
16791716 } else
1680
- if (event.getSource() == lightItem)
1717
+ if (source == lightItem)
16811718 {
16821719 makeSomething(new Light());
16831720 } else
1684
- if (event.getSource() == csgItem)
1721
+ if (source == csgItem)
16851722 {
16861723 group(new CSG());
16871724 } else
1688
- if (event.getSource() == templateItem)
1725
+ if (source == templateItem)
16891726 {
16901727 group(new cTemplate());
16911728 } else
1692
- if (event.getSource() == attributeItem)
1729
+ if (source == attributeItem)
16931730 {
16941731 makeSomething(new Attribute());
16951732 } else
1696
- if (event.getSource() == pointflowItem)
1733
+ if (source == pointflowItem)
16971734 {
16981735 makeSomething(new PointFlow());
16991736 } else
....@@ -1705,7 +1742,7 @@
17051742 } else
17061743 */
17071744
1708
- if (event.getSource() == superLoopItem)
1745
+ if (source == superLoopItem)
17091746 {
17101747 Composite g = new cGroup();
17111748 for (int i=0; i<15; i++)
....@@ -1727,7 +1764,7 @@
17271764
17281765 group(g);
17291766 } else
1730
- if (event.getSource() == loopItem)
1767
+ if (source == loopItem)
17311768 {
17321769 Composite csg = new GroupLeaf();
17331770 csg.count = 5;
....@@ -1736,7 +1773,7 @@
17361773 csg.addChild(child);
17371774 child.addChild(csg);
17381775 } else
1739
- if (event.getSource() == doubleItem)
1776
+ if (source == doubleItem)
17401777 {
17411778 Composite csg = new GroupLeaf();
17421779 csg.count = 5;
....@@ -1748,7 +1785,7 @@
17481785 csg.addChild(child);
17491786 child.addChild(csg);
17501787 } else
1751
- if (event.getSource() == tripleItem)
1788
+ if (source == tripleItem)
17521789 {
17531790 Composite csg = new GroupLeaf();
17541791 csg.count = 4;
....@@ -1764,70 +1801,70 @@
17641801 child.addChild(csg);
17651802 } else
17661803
1767
- if (event.getSource() == importGFDItem)
1804
+ if (source == importGFDItem)
17681805 {
17691806 ImportGFD();
17701807 } else
1771
- if (event.getSource() == importVRMLX3DItem)
1808
+ if (source == importVRMLX3DItem)
17721809 {
17731810 ImportVRMLX3D();
17741811 } else
1775
- if (event.getSource() == import3DSItem)
1812
+ if (source == import3DSItem)
17761813 {
17771814 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
17781815 } else
1779
- if (event.getSource() == importOBJItem)
1816
+ if (source == importOBJItem)
17801817 {
17811818 objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
17821819 } else
1783
- if (event.getSource() == computeAOItem)
1820
+ if (source == computeAOItem)
17841821 {
17851822 Globals.drawMode = CameraPane.OCCLUSION;
1786
- CameraPane.theRenderer.repaint();
1823
+ Globals.theRenderer.repaint();
17871824 } else
1788
- if (event.getSource() == recompileItem)
1825
+ if (source == recompileItem)
17891826 {
17901827 Recompile();
17911828 refreshContents();
17921829 } else
1793
- if (event.getSource() == editScriptItem)
1830
+ if (source == editScriptItem)
17941831 {
17951832 OpenDialog();
17961833 refreshContents();
17971834 } else
1798
- if (event.getSource() == invariantsItem)
1835
+ if (source == invariantsItem)
17991836 {
18001837 System.out.println("Invariants:");
18011838 GrafreeD.grafreeD.universe.invariants();
18021839 } else
1803
- if (event.getSource() == memoryItem)
1840
+ if (source == memoryItem)
18041841 {
18051842 //System.out.println("Invariants:");
18061843 PrintMemory();
18071844 } else
1808
- if (event.getSource() == pathItem)
1845
+ if (source == pathItem)
18091846 {
18101847 PrintPath();
18111848 } else
1812
- if (event.getSource() == analyzeItem)
1849
+ if (source == analyzeItem)
18131850 {
18141851 AnalyzeObject();
18151852 } else
1816
- if (event.getSource() == dumpItem)
1853
+ if (source == dumpItem)
18171854 {
18181855 DumpObject();
18191856 } else
1820
- if (event.getSource() == screenfitButton)
1857
+ if (source == screenfitButton)
18211858 {
18221859 //Reload(lastConverter, lastFilename, true);
18231860 ScreenFit();
18241861 } else
1825
- if (event.getSource() == screenfitpointButton)
1862
+ if (source == screenfitpointButton)
18261863 {
18271864 //Reload(lastConverter, lastFilename, true);
18281865 ScreenFitPoint();
18291866 } else
1830
- if (event.getSource() == snapobjectButton)
1867
+ if (source == snapobjectButton)
18311868 {
18321869 //Reload(lastConverter, lastFilename, true);
18331870 SnapObject();
....@@ -1838,13 +1875,13 @@
18381875 // Recompile();
18391876 // refreshContents();
18401877 // } else
1841
- if (event.getSource() == gcButton)
1878
+ if (source == gcButton)
18421879 {
18431880 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18441881 System.gc();
18451882 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18461883 } else
1847
- if (event.getSource() == editLeafItem)
1884
+ if (source == editLeafItem)
18481885 {
18491886 Object3D obj;
18501887 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1858,62 +1895,62 @@
18581895 }
18591896 refreshContents(true);
18601897 } else
1861
- if (event.getSource() == openWindowItem)
1898
+ if (source == openWindowItem)
18621899 {
18631900 EditSelection(true);
18641901 } else
1865
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1902
+ if (source == cutItem || source == clearButton)
18661903 {
18671904 loadClipboard(true);
18681905 } else
1869
- if (event.getSource() == duplicateItem)
1906
+ if (source == duplicateItem)
18701907 {
18711908 Object3D keep = GrafreeD.clipboard;
18721909 loadClipboard(false);
18731910 paste(false);
18741911 GrafreeD.clipboard = keep;
18751912 } else
1876
- if (event.getSource() == cloneItem)
1913
+ if (source == cloneItem)
18771914 {
18781915 CloneSelection(false);
18791916 } else
1880
- if (event.getSource() == cloneSupportItem)
1917
+ if (source == cloneSupportItem)
18811918 {
18821919 CloneSelection(true);
18831920 } else
1884
- if (event.getSource() == copyItem)
1921
+ if (source == copyItem)
18851922 {
18861923 loadClipboard(false);
18871924 } else
1888
- if (event.getSource() == pasteItem)
1925
+ if (source == pasteItem)
18891926 {
18901927 paste(false);
18911928 } else
1892
- if (event.getSource() == pasteLinkItem)
1929
+ if (source == pasteLinkItem)
18931930 {
18941931 pasteInto(false);
18951932 } else
1896
- if (event.getSource() == pasteCloneItem)
1933
+ if (source == pasteCloneItem)
18971934 {
18981935 pasteInto(true);
18991936 } else
1900
- if (event.getSource() == pasteExpandItem)
1937
+ if (source == pasteExpandItem)
19011938 {
19021939 paste(true);
19031940 } else
1904
- if (event.getSource() == synchronizeItem)
1941
+ if (source == synchronizeItem)
19051942 {
19061943 Overwrite(Object3D.TRANSFORM);
19071944 } else
1908
- if (event.getSource() == overwriteNameItem)
1945
+ if (source == overwriteNameItem)
19091946 {
19101947 Overwrite(Object3D.NAME);
19111948 } else
1912
- if (event.getSource() == overwriteUVItem)
1949
+ if (source == overwriteUVItem)
19131950 {
19141951 Overwrite(Object3D.UV);
19151952 } else
1916
- if (event.getSource() == overwriteMatItem)
1953
+ if (source == overwriteMatItem)
19171954 {
19181955 /* july 2015
19191956 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1933,7 +1970,7 @@
19331970
19341971 Overwrite(dropAttributes);
19351972 }
1936
- if (event.getSource() == overwriteGeoItem)
1973
+ if (source == overwriteGeoItem)
19371974 {
19381975 Overwrite(Object3D.GEOMETRY);
19391976 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1950,7 +1987,7 @@
19501987 // refreshContents();
19511988 // }
19521989 } else
1953
- if (event.getSource() == generateMeshItem)
1990
+ if (source == generateMeshItem)
19541991 {
19551992 //if (group.selection.size() == 1)
19561993 // for (int i=0; i<group.selection.size(); i++)
....@@ -1961,7 +1998,7 @@
19611998 ResetModel();
19621999 refreshContents();
19632000 } else
1964
- if (event.getSource() == extractGeometriesItem)
2001
+ if (source == extractGeometriesItem)
19652002 {
19662003 boolean one = false;
19672004
....@@ -1988,7 +2025,7 @@
19882025 ResetModel();
19892026 refreshContents();
19902027 } else
1991
- if (event.getSource() == cloneGeometriesItem)
2028
+ if (source == cloneGeometriesItem)
19922029 {
19932030 boolean one = false;
19942031
....@@ -2014,7 +2051,7 @@
20142051 ResetModel();
20152052 refreshContents();
20162053 } else
2017
- if (event.getSource() == shareGeometriesItem)
2054
+ if (source == shareGeometriesItem)
20182055 {
20192056 boolean one = false;
20202057
....@@ -2044,7 +2081,7 @@
20442081 refreshContents();
20452082 }
20462083 } else
2047
- if (event.getSource() == mergeGeometriesItem)
2084
+ if (source == mergeGeometriesItem)
20482085 {
20492086 boolean one = false;
20502087
....@@ -2074,7 +2111,7 @@
20742111 ResetModel();
20752112 refreshContents();
20762113 } else
2077
- if (event.getSource() == linkverticesItem)
2114
+ if (source == linkverticesItem)
20782115 {
20792116 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20802117 // {
....@@ -2094,7 +2131,7 @@
20942131 if (content instanceof cGroup && ((cGroup)content).transientlink )
20952132 content = ((cGroup)content).get(0);
20962133
2097
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
2134
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
20982135 for (int i=0; i<group.selection.size(); i++)
20992136 {
21002137 boolean random = CameraPane.RANDOM;
....@@ -2103,11 +2140,11 @@
21032140 // group.selection.get(i).setMasterThis(content); // should be identity
21042141 CameraPane.RANDOM = random;
21052142 }
2106
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
2143
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21072144 refreshContents();
21082145 }
21092146 } else
2110
- if (event.getSource() == resetsupportItem)
2147
+ if (source == resetsupportItem)
21112148 {
21122149 for (int i=0; i<group.selection.size(); i++)
21132150 {
....@@ -2119,7 +2156,7 @@
21192156
21202157 refreshContents();
21212158 } else
2122
- if (event.getSource() == relinkverticesItem)
2159
+ if (source == relinkverticesItem)
21232160 {
21242161 boolean random = CameraPane.RANDOM;
21252162 CameraPane.RANDOM = false; // parse all random nodes
....@@ -2128,7 +2165,7 @@
21282165
21292166 refreshContents();
21302167 } else
2131
- if (event.getSource() == resetreferencesItem)
2168
+ if (source == resetreferencesItem)
21322169 {
21332170 for (int i=0; i<group.selection.size(); i++)
21342171 {
....@@ -2137,7 +2174,7 @@
21372174
21382175 refreshContents();
21392176 } else
2140
- if (event.getSource() == setMasterItem)
2177
+ if (source == setMasterItem)
21412178 {
21422179 if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21432180 {
....@@ -2150,7 +2187,7 @@
21502187 refreshContents();
21512188 }
21522189 } else
2153
- if (event.getSource() == poseMeshItem)
2190
+ if (source == poseMeshItem)
21542191 {
21552192 if (group.selection.size() == 1)
21562193 {
....@@ -2169,19 +2206,19 @@
21692206 }
21702207
21712208 } else
2172
- if (event.getSource() == revertMeshItem)
2209
+ if (source == revertMeshItem)
21732210 {
21742211 RevertMeshes();
21752212 } else
2176
- if (event.getSource() == resetMeshItem)
2213
+ if (source == resetMeshItem)
21772214 {
21782215 ResetAll();
21792216 } else
2180
- if (event.getSource() == stepAllItem)
2217
+ if (source == stepAllItem)
21812218 {
21822219 StepAll();
21832220 } else
2184
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2221
+ if (source == clearItem) // || event.getSource() == clearButton)
21852222 {
21862223 //int indices[] = jList.getSelectedIndices();
21872224 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2189,46 +2226,46 @@
21892226
21902227 ClearSelection(false);
21912228 } else
2192
- if (event.getSource() == clearAllItem)
2229
+ if (source == clearAllItem)
21932230 {
21942231 ClearSelection(true);
21952232 } else
2196
- if (event.getSource() == grabItem)
2233
+ if (source == grabItem)
21972234 {
21982235 group(new cGroup(), true);
21992236 } else
2200
- if (event.getSource() == hideItem)
2237
+ if (source == hideItem)
22012238 {
22022239 group(new HiddenObject());
22032240 } else
2204
- if (event.getSource() == frontItem)
2241
+ if (source == frontItem)
22052242 {
22062243 front();
22072244 } else
2208
- if (event.getSource() == backItem)
2245
+ if (source == backItem)
22092246 {
22102247 back();
22112248 } else
2212
- if (event.getSource() == cameraItem)
2249
+ if (source == cameraItem)
22132250 {
22142251 makeSomething(new Camera());
22152252 } else
2216
- if (event.getSource() == compositeItem)
2253
+ if (source == compositeItem)
22172254 {
22182255 group(new Composite());
22192256 } else
2220
- if (event.getSource() == randomItem)
2257
+ if (source == randomItem)
22212258 {
22222259 RandomNode random = new RandomNode();
22232260 group(random);
22242261 if (random.size() > 0)
22252262 random.name = random.get(0).name + "Rnd";
22262263 } else
2227
- if (event.getSource() == physicsItem)
2264
+ if (source == physicsItem)
22282265 {
22292266 group(new PhysicsNode());
22302267 } else
2231
- if (event.getSource() == frameselectorItem)
2268
+ if (source == frameselectorItem)
22322269 {
22332270 for (int i=0; i<group.selection.size(); i++)
22342271 {
....@@ -2240,7 +2277,7 @@
22402277 ResetModel();
22412278 refreshContents();
22422279 } else
2243
- if (event.getSource() == switchGeoItem)
2280
+ if (source == switchGeoItem)
22442281 {
22452282 for (int i=0; i<group.selection.size(); i++)
22462283 {
....@@ -2252,7 +2289,7 @@
22522289 ResetModel();
22532290 refreshContents();
22542291 } else
2255
- if (event.getSource() == switchTransfoItem)
2292
+ if (source == switchTransfoItem)
22562293 {
22572294 for (int i=0; i<group.selection.size(); i++)
22582295 {
....@@ -2264,7 +2301,7 @@
22642301 ResetModel();
22652302 refreshContents();
22662303 } else
2267
- if (event.getSource() == morphItem)
2304
+ if (source == morphItem)
22682305 {
22692306 for (int i=0; i<group.selection.size(); i++)
22702307 {
....@@ -2276,7 +2313,7 @@
22762313 ResetModel();
22772314 refreshContents();
22782315 } else
2279
- if (event.getSource() == scriptNodeItem)
2316
+ if (source == scriptNodeItem)
22802317 {
22812318 boolean atleastone = false;
22822319
....@@ -2315,31 +2352,31 @@
23152352 }
23162353 }
23172354 } else
2318
- if (event.getSource() == linkerItem)
2355
+ if (source == linkerItem)
23192356 {
23202357 group(new cLinker());
23212358 } else
2322
- if (event.getSource() == textureItem)
2359
+ if (source == textureItem)
23232360 {
23242361 group(new TextureNode());
23252362 } else
2326
- if (event.getSource() == billboardItem)
2363
+ if (source == billboardItem)
23272364 {
23282365 group(new BillboardNode());
23292366 } else
2330
- if (event.getSource() == shadowXItem)
2367
+ if (source == shadowXItem)
23312368 {
23322369 CastShadow(0);
23332370 } else
2334
- if (event.getSource() == shadowYItem)
2371
+ if (source == shadowYItem)
23352372 {
23362373 CastShadow(1);
23372374 } else
2338
- if (event.getSource() == shadowZItem)
2375
+ if (source == shadowZItem)
23392376 {
23402377 CastShadow(2);
23412378 } else
2342
- if (event.getSource() == ungroupItem)
2379
+ if (source == ungroupItem)
23432380 {
23442381 //ungroup();
23452382 for (int i=0; i<group.selection.size(); i++)
....@@ -2351,179 +2388,179 @@
23512388
23522389 refreshContents();
23532390 } else
2354
- if (event.getSource() == genUVItem)
2391
+ if (source == genUVItem)
23552392 {
23562393 GenUV();
23572394 } else
2358
- if (event.getSource() == genNormalsCADItem)
2395
+ if (source == genNormalsCADItem)
23592396 {
23602397 GenNormals(true);
23612398 } else
2362
- if (event.getSource() == genNormalsMESHItem)
2399
+ if (source == genNormalsMESHItem)
23632400 {
23642401 GenNormals(true); // TODO
23652402 } else
2366
- if (event.getSource() == genNormalsORGANItem)
2403
+ if (source == genNormalsORGANItem)
23672404 {
23682405 GenNormals(false);
23692406 } else
2370
- if (event.getSource() == genNormalsMINEItem)
2407
+ if (source == genNormalsMINEItem)
23712408 {
23722409 GenNormalsMINE();
23732410 } else
2374
- if (event.getSource() == stripifyItem)
2411
+ if (source == stripifyItem)
23752412 {
23762413 Stripify();
23772414 } else
2378
- if (event.getSource() == unstripifyItem)
2415
+ if (source == unstripifyItem)
23792416 {
23802417 Unstripify();
23812418 } else
2382
- if (event.getSource() == trimItem)
2419
+ if (source == trimItem)
23832420 {
23842421 Trim();
23852422 } else
2386
- if (event.getSource() == untrimItem)
2423
+ if (source == untrimItem)
23872424 {
23882425 Untrim();
23892426 } else
2390
- if (event.getSource() == clearColorsItem)
2427
+ if (source == clearColorsItem)
23912428 {
23922429 ClearColors();
23932430 } else
2394
- if (event.getSource() == clearMaterialsItem)
2431
+ if (source == clearMaterialsItem)
23952432 {
23962433 ClearMaterials();
23972434 } else
2398
- if (event.getSource() == liveleavesItem)
2435
+ if (source == liveleavesItem)
23992436 {
24002437 LiveLeaves(true);
24012438 } else
2402
- if (event.getSource() == unliveleavesItem)
2439
+ if (source == unliveleavesItem)
24032440 {
24042441 LiveLeaves(false);
24052442 } else
2406
- if (event.getSource() == supportleavesItem)
2443
+ if (source == supportleavesItem)
24072444 {
24082445 SupportLeaves(true);
24092446 } else
2410
- if (event.getSource() == unsupportleavesItem)
2447
+ if (source == unsupportleavesItem)
24112448 {
24122449 SupportLeaves(false);
24132450 } else
2414
- if (event.getSource() == hideleavesItem)
2451
+ if (source == hideleavesItem)
24152452 {
24162453 HideLeaves(true);
24172454 } else
2418
- if (event.getSource() == showleavesItem)
2455
+ if (source == showleavesItem)
24192456 {
24202457 HideLeaves(false);
24212458 } else
2422
- if (event.getSource() == markleavesItem)
2459
+ if (source == markleavesItem)
24232460 {
24242461 MarkLeaves(true);
24252462 } else
2426
- if (event.getSource() == unmarkleavesItem)
2463
+ if (source == unmarkleavesItem)
24272464 {
24282465 MarkLeaves(false);
24292466 } else
2430
- if (event.getSource() == flipVItem)
2467
+ if (source == flipVItem)
24312468 {
24322469 FlipV(true);
24332470 } else
2434
- if (event.getSource() == unflipVItem)
2471
+ if (source == unflipVItem)
24352472 {
24362473 FlipV(false);
24372474 } else
2438
- if (event.getSource() == lowTexturesItem)
2475
+ if (source == lowTexturesItem)
24392476 {
24402477 SetTexRes(0);
24412478 } else
2442
- if (event.getSource() == normalTexturesItem)
2479
+ if (source == normalTexturesItem)
24432480 {
24442481 SetTexRes(1);
24452482 } else
2446
- if (event.getSource() == highTexturesItem)
2483
+ if (source == highTexturesItem)
24472484 {
24482485 SetTexRes(2);
24492486 } else
2450
- if (event.getSource() == veryhighTexturesItem)
2487
+ if (source == veryhighTexturesItem)
24512488 {
24522489 SetTexRes(3);
24532490 } else
2454
- if (event.getSource() == maxTexturesItem)
2491
+ if (source == maxTexturesItem)
24552492 {
24562493 SetTexRes(4);
24572494 } else
2458
- if (event.getSource() == panoTexturesItem)
2495
+ if (source == panoTexturesItem)
24592496 {
24602497 SetTexRes(5);
24612498 } else
2462
- if (event.getSource() == reverseNormalsItem)
2499
+ if (source == reverseNormalsItem)
24632500 {
24642501 ReverseNormals();
24652502 } else
2466
- if (event.getSource() == parseverticesItem)
2503
+ if (source == parseverticesItem)
24672504 {
24682505 ParseVertices();
24692506 } else
2470
- if (event.getSource() == textureFieldItem)
2507
+ if (source == textureFieldItem)
24712508 {
24722509 TextureVertices();
24732510 } else
2474
- if (event.getSource() == alignItem)
2511
+ if (source == alignItem)
24752512 {
24762513 Align();
24772514 } else
2478
- if (event.getSource() == mirrorItem)
2515
+ if (source == mirrorItem)
24792516 {
24802517 MirrorPoses();
24812518 } else
2482
- if (event.getSource() == reduceMorphItem)
2519
+ if (source == reduceMorphItem)
24832520 {
24842521 MeshReduction(false);
24852522 } else
2486
- if (event.getSource() == reduce34MorphItem)
2523
+ if (source == reduce34MorphItem)
24872524 {
24882525 MeshReduction(true);
24892526 } else
2490
- if (event.getSource() == reverseTrianglesItem)
2527
+ if (source == reverseTrianglesItem)
24912528 {
24922529 ReverseTriangles();
24932530 } else
2494
- if (event.getSource() == reduceMeshItem)
2531
+ if (source == reduceMeshItem)
24952532 {
24962533 ReduceMesh(false);
24972534 } else
2498
- if (event.getSource() == reduce34MeshItem)
2535
+ if (source == reduce34MeshItem)
24992536 {
25002537 ReduceMesh(true);
25012538 } else
2502
- if (event.getSource() == increaseMeshItem)
2539
+ if (source == increaseMeshItem)
25032540 {
25042541 IncreaseMesh();
25052542 } else
2506
- if (event.getSource() == clipMeshItem)
2543
+ if (source == clipMeshItem)
25072544 {
25082545 ClipMesh();
25092546 } else
2510
- if (event.getSource() == smoothMeshItem)
2547
+ if (source == smoothMeshItem)
25112548 {
25122549 SmoothMesh();
25132550 } else
2514
- if (event.getSource() == transformgeometryItem)
2551
+ if (source == transformgeometryItem)
25152552 {
25162553 TransformGeometry();
25172554 } else
2518
- if (event.getSource() == resetTransformItem)
2555
+ if (source == resetTransformItem)
25192556 {
25202557 ResetTransform();
25212558 } else
2522
- if (event.getSource() == resetCentroidItem)
2559
+ if (source == resetCentroidItem)
25232560 {
25242561 ResetCentroid();
25252562 } else
2526
- if (event.getSource() == resetParentItem)
2563
+ if (source == resetParentItem)
25272564 {
25282565 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25292566 {
....@@ -2533,7 +2570,7 @@
25332570
25342571 refreshContents();
25352572 } else
2536
- if (event.getSource() == repairParentItem)
2573
+ if (source == repairParentItem)
25372574 {
25382575 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25392576 {
....@@ -2547,7 +2584,7 @@
25472584
25482585 refreshContents();
25492586 } else
2550
- if (event.getSource() == repairShadowItem)
2587
+ if (source == repairShadowItem)
25512588 {
25522589 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25532590 {
....@@ -2561,7 +2598,7 @@
25612598
25622599 refreshContents();
25632600 } else
2564
- if (event.getSource() == sortbysizeItem)
2601
+ if (source == sortbysizeItem)
25652602 {
25662603 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25672604 {
....@@ -2573,7 +2610,7 @@
25732610 ResetModel();
25742611 refreshContents();
25752612 } else
2576
- if (event.getSource() == sortbynameItem)
2613
+ if (source == sortbynameItem)
25772614 {
25782615 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25792616 {
....@@ -2585,7 +2622,7 @@
25852622 ResetModel();
25862623 refreshContents();
25872624 } else
2588
- if (event.getSource() == attachPigmentItem)
2625
+ if (source == attachPigmentItem)
25892626 {
25902627 String texture = GetFile("Attach pigment");
25912628 Object3D obj;
....@@ -2597,7 +2634,7 @@
25972634
25982635 refreshContents();
25992636 } else
2600
- if (event.getSource() == detachPigmentItem)
2637
+ if (source == detachPigmentItem)
26012638 {
26022639 Object3D obj;
26032640 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2608,7 +2645,7 @@
26082645
26092646 refreshContents();
26102647 } else
2611
- if (event.getSource() == attachBumpItem)
2648
+ if (source == attachBumpItem)
26122649 {
26132650 String texture = GetFile("Attach bump");
26142651 Object3D obj;
....@@ -2620,7 +2657,7 @@
26202657
26212658 refreshContents();
26222659 } else
2623
- if (event.getSource() == detachBumpItem)
2660
+ if (source == detachBumpItem)
26242661 {
26252662 Object3D obj;
26262663 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2631,7 +2668,7 @@
26312668
26322669 refreshContents();
26332670 } else
2634
- if (event.getSource() == pigmentBumpItem)
2671
+ if (source == pigmentBumpItem)
26352672 {
26362673 Object3D obj;
26372674 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2642,158 +2679,195 @@
26422679
26432680 refreshContents();
26442681 } else
2645
- if (event.getSource() == flashSelectionButton)
2682
+ if (source == flashSelectionButton)
26462683 {
26472684 CameraPane.flash = true;
26482685 refreshContents();
26492686 } else
2650
- if (event.getSource() == oneButton)
2687
+ if (source == oneButton)
26512688 {
26522689 } else
2653
- if (event.getSource() == twoButton)
2690
+ if (source == twoButton)
26542691 {
26552692 radio.layout = twoButton;
26562693 // bug
26572694 //gridPanel.setDividerLocation(1.0);
26582695 //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();
2696
+// bigThree.remove(scenePanel);
2697
+// bigThree.remove(centralPanel);
2698
+// bigThree.remove(XYZPanel);
2699
+// aWindowConstraints.gridx = 0;
2700
+// aWindowConstraints.gridy = 0;
2701
+// aWindowConstraints.gridwidth = 1;
2702
+// // aConstraints.gridheight = 3;
2703
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2704
+// aWindowConstraints.weightx = 0;
2705
+// aWindowConstraints.weighty = 1;
2706
+// //bigThree.add(jtp, aWindowConstraints);
2707
+// aWindowConstraints.weightx = 1;
2708
+// aWindowConstraints.gridwidth = 3;
2709
+// // aConstraints.gridheight = 3;
2710
+// aWindowConstraints.gridx = 1;
2711
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2712
+// bigThree.add(centralPanel, aWindowConstraints);
2713
+// aWindowConstraints.weightx = 0;
2714
+// aWindowConstraints.gridx = 4;
2715
+// aWindowConstraints.gridwidth = 1;
2716
+// // aConstraints.gridheight = 3;
2717
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2718
+// //bigThree.add(XYZPanel, aWindowConstraints);
2719
+// scenePanel.setVisible(false);
2720
+// centralPanel.setVisible(true);
2721
+// XYZPanel.setVisible(false);
2722
+ bigThree.ClearUI();
2723
+ bigThree.addComponent(centralPanel);
2724
+ bigThree.FlushUI();
26832725 } else
2684
- if (event.getSource() == threeButton)
2726
+ if (source == threeButton)
26852727 {
26862728 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();
2729
+
2730
+// bigThree.remove(scenePanel);
2731
+// bigThree.remove(centralPanel);
2732
+// bigThree.remove(XYZPanel);
2733
+// aWindowConstraints.gridx = 0;
2734
+// aWindowConstraints.gridy = 0;
2735
+// aWindowConstraints.gridwidth = 1;
2736
+// // aConstraints.gridheight = 3;
2737
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2738
+// aWindowConstraints.weightx = 0;
2739
+// aWindowConstraints.weighty = 1;
2740
+// //bigThree.add(jtp, aWindowConstraints);
2741
+// aWindowConstraints.weightx = 1;
2742
+// aWindowConstraints.gridwidth = 3;
2743
+// // aConstraints.gridheight = 3;
2744
+// aWindowConstraints.gridx = 1;
2745
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2746
+// bigThree.add(centralPanel, aWindowConstraints);
2747
+// aWindowConstraints.weightx = 0;
2748
+// aWindowConstraints.gridx = 4;
2749
+// aWindowConstraints.gridwidth = 1;
2750
+// // aConstraints.gridheight = 3;
2751
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2752
+// bigThree.add(XYZPanel, aWindowConstraints);
2753
+// bigThree.validate();
2754
+// scenePanel.setVisible(false);
2755
+// centralPanel.setVisible(true);
2756
+// XYZPanel.setVisible(true);
2757
+ bigThree.ClearUI();
2758
+ bigThree.addComponent(centralPanel);
2759
+ bigThree.addComponent(XYZPanel);
2760
+ bigThree.FlushUI();
27112761 } else
2712
- if (event.getSource() == fourButton)
2762
+ if (source == fourButton)
27132763 {
27142764 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();
2765
+
2766
+// bigThree.remove(scenePanel);
2767
+// bigThree.remove(centralPanel);
2768
+// bigThree.remove(XYZPanel);
2769
+// aWindowConstraints.gridx = 0;
2770
+// aWindowConstraints.gridy = 0;
2771
+// aWindowConstraints.gridwidth = 1;
2772
+// // aWindowConstraints.gridheight = 3;
2773
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2774
+// aWindowConstraints.weightx = 1;
2775
+// aWindowConstraints.weighty = 1;
2776
+// bigThree.add(scenePanel, aWindowConstraints);
2777
+// aWindowConstraints.weightx = 1;
2778
+// aWindowConstraints.gridwidth = 3;
2779
+// // aConstraints.gridheight = 3;
2780
+// aWindowConstraints.gridx = 1;
2781
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2782
+// //bigThree.add(cameraPanel, aWindowConstraints);
2783
+// aWindowConstraints.weightx = 0;
2784
+// aWindowConstraints.gridx = 4;
2785
+// aWindowConstraints.gridwidth = 1;
2786
+// // aWindowConstraints.gridheight = 3;
2787
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2788
+// //bigThree.add(XYZPanel, aWindowConstraints);
2789
+// bigThree.validate();
2790
+// scenePanel.setVisible(true);
2791
+// centralPanel.setVisible(false);
2792
+// XYZPanel.setVisible(false);
2793
+ bigThree.ClearUI();
2794
+ bigThree.addComponent(scenePanel);
2795
+ bigThree.FlushUI();
27392796 } else
2740
- if (event.getSource() == sixButton)
2797
+ if (source == sixButton)
27412798 {
27422799 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();
2800
+
2801
+// bigThree.remove(scenePanel);
2802
+// bigThree.remove(centralPanel);
2803
+// bigThree.remove(XYZPanel);
2804
+// aWindowConstraints.gridx = 0;
2805
+// aWindowConstraints.gridy = 0;
2806
+// aWindowConstraints.gridwidth = 1;
2807
+// // aConstraints.gridheight = 3;
2808
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2809
+// aWindowConstraints.weightx = 0;
2810
+// aWindowConstraints.weighty = 1;
2811
+// bigThree.add(scenePanel, aWindowConstraints);
2812
+// aWindowConstraints.weightx = 1;
2813
+// aWindowConstraints.gridwidth = 3;
2814
+// // aWindowConstraints.gridheight = 3;
2815
+// aWindowConstraints.gridx = 1;
2816
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2817
+// bigThree.add(centralPanel, aWindowConstraints);
2818
+// aWindowConstraints.weightx = 0;
2819
+// aWindowConstraints.gridx = 4;
2820
+// aWindowConstraints.gridwidth = 1;
2821
+// // aWindowConstraints.gridheight = 3;
2822
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2823
+// //bigThree.add(XYZPanel, aConstraints);
2824
+// bigThree.validate();
2825
+// scenePanel.setVisible(true);
2826
+// centralPanel.setVisible(true);
2827
+// XYZPanel.setVisible(false);
2828
+ bigThree.ClearUI();
2829
+ bigThree.addComponent(scenePanel);
2830
+ bigThree.addComponent(centralPanel);
2831
+ bigThree.FlushUI();
27672832 } else
2768
- if (event.getSource() == sevenButton)
2833
+ if (source == sevenButton)
27692834 {
27702835 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();
2836
+
2837
+// bigThree.remove(scenePanel);
2838
+// bigThree.remove(centralPanel);
2839
+// bigThree.remove(XYZPanel);
2840
+// aWindowConstraints.gridx = 0;
2841
+// aWindowConstraints.gridy = 0;
2842
+// aWindowConstraints.gridwidth = 1;
2843
+// // aWindowConstraints.gridheight = 3;
2844
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2845
+// aWindowConstraints.weightx = 0;
2846
+// aWindowConstraints.weighty = 1;
2847
+// bigThree.add(scenePanel, aWindowConstraints);
2848
+// aWindowConstraints.weightx = 1;
2849
+// aWindowConstraints.gridwidth = 3;
2850
+// // aWindowConstraints.gridheight = 3;
2851
+// aWindowConstraints.gridx = 1;
2852
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2853
+// bigThree.add(centralPanel, aWindowConstraints);
2854
+// aWindowConstraints.weightx = 0;
2855
+// aWindowConstraints.gridx = 4;
2856
+// aWindowConstraints.gridwidth = 1;
2857
+// // aConstraints.gridheight = 3;
2858
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2859
+// bigThree.add(XYZPanel, aWindowConstraints);
2860
+// bigThree.validate();
2861
+// scenePanel.setVisible(true);
2862
+// centralPanel.setVisible(true);
2863
+// XYZPanel.setVisible(true);
2864
+ bigThree.ClearUI();
2865
+ bigThree.addComponent(scenePanel);
2866
+ bigThree.addComponent(centralPanel);
2867
+ bigThree.addComponent(XYZPanel);
2868
+ bigThree.FlushUI();
27952869 } else
2796
- if (event.getSource() == rootButton)
2870
+ if (source == rootButton)
27972871 {
27982872 Object3D obj;
27992873 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2805,7 +2879,7 @@
28052879
28062880 refreshContents(true);
28072881 } else
2808
- if (event.getSource() == closeButton)
2882
+ if (source == closeButton)
28092883 {
28102884 //System.out.println("CLOSE: " + buttonGroup.getSelection());
28112885 cRadio ab;
....@@ -2826,11 +2900,11 @@
28262900 }
28272901 refreshContents(true);
28282902 } else
2829
- if (event.getSource() == editItem || event.getSource() == editButton)
2903
+ if (source == editItem || source == editButton)
28302904 {
28312905 EditSelection(false);
28322906 } else
2833
- if (event.getSource() == uneditButton)
2907
+ if (source == uneditButton)
28342908 {
28352909 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28362910 {
....@@ -2847,7 +2921,7 @@
28472921 //objEditor.ResetSliders();
28482922 refreshContents(true);
28492923 } else
2850
- if (event.getSource() == clearPanelButton)
2924
+ if (source == clearPanelButton)
28512925 {
28522926 assert(copy == group);
28532927 //copy.ClearUI();
....@@ -2858,7 +2932,7 @@
28582932 listUI.clear();
28592933 refreshContents(true);
28602934 } else
2861
- if (event.getSource() == allParamsButton)
2935
+ if (source == allParamsButton)
28622936 {
28632937 assert(copy == group);
28642938
....@@ -2879,19 +2953,19 @@
28792953
28802954 refreshContents(true);
28812955 } else
2882
- if (event.getSource() == unselectButton)
2956
+ if (source == unselectButton)
28832957 {
28842958 objEditor.jTree.clearSelection();
28852959 // ?? oct 2012 GrafreeD.clipboard.clear();
28862960 objEditor.ResetSliders();
28872961 refreshContents(true);
28882962 } else
2889
- if(event.getSource() instanceof cRadio)
2963
+ if(source instanceof cRadio)
28902964 {
28912965 group.parent = keepparent;
28922966 group.attributes = 0;
28932967 //group.editWindow = null;
2894
- /*cRadio*/ radio = (cRadio)event.getSource();
2968
+ /*cRadio*/ radio = (cRadio)source;
28952969 Object3D obj = radio.GetObject();
28962970 System.out.println("Edit " + obj);
28972971 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2911,7 +2985,7 @@
29112985 }
29122986
29132987 copy = group;
2914
- //CameraPane.theRenderer.object = group;
2988
+ //Globals.theRenderer.object = group;
29152989 if(!useclient)
29162990 {
29172991 cameraView.renderCamera = radio.camera;
....@@ -3473,7 +3547,7 @@
34733547 String pigment = Object3D.GetPigment(tex);
34743548 //String bump = Object3D.GetBump(tex);
34753549
3476
- com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres);
3550
+ com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
34773551
34783552 double s = v.s;
34793553
....@@ -3774,7 +3848,7 @@
37743848 group.selection.RelinkToSupport(); // july 2014
37753849 System.out.println("DONE.");
37763850 refreshContents();
3777
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
3851
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
37783852 }
37793853
37803854 void ReduceMesh(boolean reduction34)
....@@ -4066,9 +4140,9 @@
40664140 // a camera
40674141 {
40684142 CameraPane.camerachangeframe = 0; // don't refuse it
4069
- CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4070
- // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera;
4071
- // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera;
4143
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4144
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4145
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
40724146 }
40734147
40744148 refreshContents();