Normand Briere
2019-05-01 20c1a07b76c39462594aedfedfe6e6adb17cd552
GroupEditor.java
....@@ -436,11 +436,15 @@
436436 */
437437 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
438438
439
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints);
439
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
440440 liveCB.setToolTipText("Enabled animation");
441441 liveCB.addItemListener(this);
442442
443
- oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK), oe.aConstraints);
443
+ oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
444
+ fastCB.setToolTipText("Fast mode");
445
+ fastCB.addItemListener(this);
446
+
447
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
444448 trackCB.setToolTipText("Enable tracking");
445449 trackCB.addItemListener(this);
446450
....@@ -485,47 +489,42 @@
485489 //
486490
487491 oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
488
- rootButton.setToolTipText("Edit object in new tab");
492
+ rootButton.setToolTipText("Edit selection in new tab");
489493 rootButton.addActionListener(this);
490
- oe.aConstraints.gridx += 1;
491
- oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
494
+
495
+ oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
492496 closeButton.setToolTipText("Close tab");
493497 closeButton.addActionListener(this);
494498 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
495499 //clearButton.addActionListener(this);
496
- oe.aConstraints.gridx += 1;
497500
498
- oe.aConstraints.gridx = 1; //
499
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
501
+ cGridBag commandsPanel = new cGridBag();
502
+
503
+ commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
504
+ editButton.setToolTipText("Edit selection");
500505 editButton.addActionListener(this);
501
- oe.aConstraints.gridx += 1;
502
- oe.aConstraints.weighty = 0;
503
- oe.aConstraints.gridwidth = 1;
504506
505
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
507
+ commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
508
+ uneditButton.setToolTipText("Unedit selection");
506509 uneditButton.addActionListener(this);
507510
508
- oe.aConstraints.gridx += 1;
509
- oe.aConstraints.weighty = 0;
510
- oe.aConstraints.gridwidth = 1;
511
-
512
- oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints);
511
+ commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
512
+ clearPanelButton.setToolTipText("Clear edit panel");
513513 clearPanelButton.addActionListener(this);
514514
515
- oe.aConstraints.gridx += 1;
516
- oe.aConstraints.weighty = 0;
517
- oe.aConstraints.gridwidth = 1;
518
-
519
- oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints);
515
+ commandsPanel.add(allParamsButton = new cButton("A", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
516
+ allParamsButton.setToolTipText("All params??");
520517 allParamsButton.addActionListener(this);
521518
522
- oe.aConstraints.gridx += 1;
523
- oe.aConstraints.weighty = 0;
524
- oe.aConstraints.gridwidth = 1;
525
-
526
- oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints);
519
+ commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
520
+ unselectButton.setToolTipText("Unselect");
527521 unselectButton.addActionListener(this);
528522
523
+ commandsPanel.preferredHeight = 1;
524
+
525
+ oe.treePanel.add(commandsPanel);
526
+ oe.treePanel.Return();
527
+
529528 // oe.aConstraints.gridx += 1;
530529 // oe.aConstraints.weighty = 0;
531530 // oe.aConstraints.gridwidth = 1;
....@@ -537,40 +536,37 @@
537536 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
538537 // gcButton.addActionListener(this);
539538
540
- oe.aConstraints.gridx = 0;
541
- oe.aConstraints.gridy += 1;
542
-
543
- //ctrlPanel.add(objList = new List(5, true));
544
- oe.aConstraints.gridwidth = 100;
545
- // oe.aConstraints.gridheight = 100;
546
- oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL;
547
- oe.aConstraints.gridheight = 1;
548
- oe.aConstraints.weighty = 0.5;
549
- oe.aConstraints.gridx = 0;
550
- JScrollPane jSP;
539
+ cGridBag jSPPanel = new cGridBag();
540
+
541
+ JScrollPane jSP;
551542 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
552
- oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints);
543
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
553544 ResetModel();
554
- oe.aConstraints.weighty = 0.5;
555
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
556
- oe.aConstraints.gridy += 1;
557
- oe.aConstraints.gridwidth = 1;
545
+
546
+ oe.treePanel.add(jSPPanel);
547
+ oe.treePanel.Return();
558548
559
- oe.aConstraints.weighty = 0;
560
- oe.aConstraints.gridwidth = 2;
561
-
562
- oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints);
549
+ cGridBag copyOptionsPanel = new cGridBag();
550
+
551
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
552
+ colorCB.setToolTipText("Copy color when dropped");
563553 colorCB.addItemListener(this);
564
- oe.aConstraints.gridx += 2;
565
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
554
+
555
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
556
+ materialCB.setToolTipText("Copy material when dropped");
566557 materialCB.addItemListener(this);
567
- oe.aConstraints.gridx += 2;
568
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
558
+
559
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
560
+ textureCB.setToolTipText("Copy texture when dropped");
569561 textureCB.addItemListener(this);
570562
571
- oe.aConstraints.gridx = 0;
572
- oe.aConstraints.gridy += 1;
563
+ copyOptionsPanel.preferredHeight = 1;
564
+ oe.treePanel.add(copyOptionsPanel);
565
+ oe.treePanel.Return();
573566
567
+// mainPanel.setDividerLocation(0.5); //1.0);
568
+// mainPanel.setResizeWeight(0.5);
569
+
574570 //jList.addListSelectionListener(this);
575571 oe.jTree.addTreeSelectionListener(this);
576572 //jTree.setRootVisible(false);
....@@ -595,39 +591,29 @@
595591
596592 void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
597593 {
598
- //constraints.gridx = 0;
599
- //constraints.gridy = 0;
600
- panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
601
- fastCB.setToolTipText("Fast mode");
602
- fastCB.addItemListener(this);
603
- //constraints.gridy += 1;
604594 panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
605595 supportCB.setToolTipText("Enabled rigging");
606596 supportCB.addItemListener(this);
607597
608
- // constraints.gridy += 1;
609598 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
610599 // localCB.addItemListener(this);
611600
612
- //constraints.gridy += 1;
613601 panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
614602 crowdCB.setToolTipText("Used for crowds");
615603 crowdCB.addItemListener(this);
616604
617
- //constraints.gridy += 1;
618605 panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
619606 smoothCB.setToolTipText("Snapping delay");
620607 smoothCB.addItemListener(this);
621608
622
- //constraints.gridy += 1;
623609 panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
624610 slowCB.setToolTipText("Smooth interpolation");
625611 slowCB.addItemListener(this);
626
- //constraints.gridy += 1;
612
+
627613 panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
628614 boxCB.setToolTipText("Display bounding boxes");
629615 boxCB.addItemListener(this);
630
- //constraints.gridy += 1;
616
+
631617 panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
632618 zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
633619 zoomBoxCB.addItemListener(this);
....@@ -656,14 +642,18 @@
656642 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
657643 // debugCB.addItemListener(this);
658644
659
- //constraints.gridy += 1;
660645 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
661646 oeilCB.addItemListener(this);
662647
663
- //constraints.gridy += 1;
664648 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
665649 lookAtCB.setToolTipText("Look-at target");
666650 lookAtCB.addItemListener(this);
651
+
652
+ cGridBag fill = new cGridBag();
653
+
654
+ fill.preferredHeight = 200;
655
+
656
+ panel.add(fill);
667657
668658 }
669659
....@@ -1112,7 +1102,7 @@
11121102 {
11131103 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
11141104 animationItem.addItemListener(this);
1115
- animationItem.setState(CameraPane.ANIMATION);
1105
+ animationItem.setState(Globals.ANIMATION);
11161106
11171107 menu.add("-");
11181108 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
....@@ -4113,12 +4103,12 @@
41134103 System.err.println("info : " + child.GetPath());
41144104 }
41154105 }
4116
- else
4117
- {
4118
- objEditor.SetMaterial(group); // .GetMaterial());
4119
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4120
- System.err.println("info : " + group.GetPath());
4121
- }
4106
+// else
4107
+// {
4108
+// objEditor.SetMaterial(group); // .GetMaterial());
4109
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4110
+// System.err.println("info : " + group.GetPath());
4111
+// }
41224112
41234113 objEditor.SetText(); // jan 2014
41244114