Normand Briere
2019-05-01 b1585b5b2b60c4165be400636c787fae24428c6a
GroupEditor.java
....@@ -436,11 +436,11 @@
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(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
444444 trackCB.setToolTipText("Enable tracking");
445445 trackCB.addItemListener(this);
446446
....@@ -485,47 +485,42 @@
485485 //
486486
487487 oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
488
- rootButton.setToolTipText("Edit object in new tab");
488
+ rootButton.setToolTipText("Edit selection in new tab");
489489 rootButton.addActionListener(this);
490
- oe.aConstraints.gridx += 1;
491
- oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
490
+
491
+ oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
492492 closeButton.setToolTipText("Close tab");
493493 closeButton.addActionListener(this);
494494 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
495495 //clearButton.addActionListener(this);
496
- oe.aConstraints.gridx += 1;
497496
498
- oe.aConstraints.gridx = 1; //
499
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
497
+ cGridBag commandsPanel = new cGridBag();
498
+
499
+ commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
500
+ editButton.setToolTipText("Edit selection");
500501 editButton.addActionListener(this);
501
- oe.aConstraints.gridx += 1;
502
- oe.aConstraints.weighty = 0;
503
- oe.aConstraints.gridwidth = 1;
504502
505
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
503
+ commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
504
+ uneditButton.setToolTipText("Unedit selection");
506505 uneditButton.addActionListener(this);
507506
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);
507
+ commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
508
+ clearPanelButton.setToolTipText("Clear edit panel");
513509 clearPanelButton.addActionListener(this);
514510
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);
511
+ commandsPanel.add(allParamsButton = new cButton("A", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
512
+ allParamsButton.setToolTipText("All params??");
520513 allParamsButton.addActionListener(this);
521514
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);
515
+ commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
516
+ unselectButton.setToolTipText("Unselect");
527517 unselectButton.addActionListener(this);
528518
519
+ commandsPanel.preferredHeight = 1;
520
+
521
+ oe.treePanel.add(commandsPanel);
522
+ oe.treePanel.Return();
523
+
529524 // oe.aConstraints.gridx += 1;
530525 // oe.aConstraints.weighty = 0;
531526 // oe.aConstraints.gridwidth = 1;
....@@ -537,40 +532,37 @@
537532 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
538533 // gcButton.addActionListener(this);
539534
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;
535
+ cGridBag jSPPanel = new cGridBag();
536
+
537
+ JScrollPane jSP;
551538 //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);
539
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
553540 ResetModel();
554
- oe.aConstraints.weighty = 0.5;
555
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
556
- oe.aConstraints.gridy += 1;
557
- oe.aConstraints.gridwidth = 1;
541
+
542
+ oe.treePanel.add(jSPPanel);
543
+ oe.treePanel.Return();
558544
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);
545
+ cGridBag copyOptionsPanel = new cGridBag();
546
+
547
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
548
+ colorCB.setToolTipText("Copy color when dropped");
563549 colorCB.addItemListener(this);
564
- oe.aConstraints.gridx += 2;
565
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
550
+
551
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
552
+ materialCB.setToolTipText("Copy material when dropped");
566553 materialCB.addItemListener(this);
567
- oe.aConstraints.gridx += 2;
568
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
554
+
555
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
556
+ textureCB.setToolTipText("Copy texture when dropped");
569557 textureCB.addItemListener(this);
570558
571
- oe.aConstraints.gridx = 0;
572
- oe.aConstraints.gridy += 1;
559
+ copyOptionsPanel.preferredHeight = 1;
560
+ oe.treePanel.add(copyOptionsPanel);
561
+ oe.treePanel.Return();
573562
563
+// mainPanel.setDividerLocation(0.5); //1.0);
564
+// mainPanel.setResizeWeight(0.5);
565
+
574566 //jList.addListSelectionListener(this);
575567 oe.jTree.addTreeSelectionListener(this);
576568 //jTree.setRootVisible(false);
....@@ -664,6 +656,12 @@
664656 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
665657 lookAtCB.setToolTipText("Look-at target");
666658 lookAtCB.addItemListener(this);
659
+
660
+ cGridBag fill = new cGridBag();
661
+
662
+ fill.preferredHeight = 200;
663
+
664
+ panel.add(fill);
667665
668666 }
669667
....@@ -4113,12 +4111,12 @@
41134111 System.err.println("info : " + child.GetPath());
41144112 }
41154113 }
4116
- else
4117
- {
4118
- objEditor.SetMaterial(group); // .GetMaterial());
4119
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4120
- System.err.println("info : " + group.GetPath());
4121
- }
4114
+// else
4115
+// {
4116
+// objEditor.SetMaterial(group); // .GetMaterial());
4117
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4118
+// System.err.println("info : " + group.GetPath());
4119
+// }
41224120
41234121 objEditor.SetText(); // jan 2014
41244122