Normand Briere
2019-05-01 20c1a07b76c39462594aedfedfe6e6adb17cd552
GroupEditor.java
....@@ -434,31 +434,28 @@
434434 oe.radioPanel.add(dummyButton);
435435 oe.buttonGroup.add(dummyButton);
436436 */
437
- aConstraints.gridy += 1;
438
-
439437 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
440438
441
- oe.aConstraints.gridwidth = 1;
442
- oe.aConstraints.gridx = 0;
443
-
444
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints);
439
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
445440 liveCB.setToolTipText("Enabled animation");
446441 liveCB.addItemListener(this);
447442
448
- oe.aConstraints.gridx += 1;
449
- 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);
450448 trackCB.setToolTipText("Enable tracking");
451449 trackCB.addItemListener(this);
452450
453
- oe.aConstraints.gridx += 1;
454
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
451
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
455452 screenfitButton.setToolTipText("Screen fit");
456453 screenfitButton.addActionListener(this);
457
- oe.aConstraints.gridx += 1;
454
+
458455 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
459456 // screenfitpointButton.addActionListener(this);
460457 // oe.aConstraints.gridx += 1;
461
- oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
458
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
462459 snapobjectButton.addActionListener(this);
463460 snapobjectButton.setToolTipText("Snap Object");
464461 oe.aConstraints.gridx += 1;
....@@ -468,76 +465,66 @@
468465 oe.aConstraints.weighty = 0;
469466 oe.aConstraints.gridwidth = 1;
470467
471
- oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
468
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
472469 flashSelectionButton.setToolTipText("Show selection");
473470 flashSelectionButton.addActionListener(this);
474471
475
- oe.toolbarPanel.add(new cButton(" ", false));
472
+ oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
476473
477
- oe.aConstraints.gridx += 1;
478
- oe.aConstraints.weighty = 0;
479
- oe.aConstraints.gridwidth = 1;
480
-
481
- //
482
- oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
474
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
483475 twoButton.setToolTipText("Show center view only");
484476 twoButton.addActionListener(this);
485
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
477
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
486478 fourButton.addActionListener(this);
487479 fourButton.setToolTipText("Show left panel only");
488
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
480
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
489481 sixButton.setToolTipText("2-column layout left");
490482 sixButton.addActionListener(this);
491
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
483
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
492484 threeButton.setToolTipText("2-column layout right");
493485 threeButton.addActionListener(this);
494
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
486
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
495487 sevenButton.setToolTipText("3-column layout");
496488 sevenButton.addActionListener(this);
497489 //
498490
499
- oe.toolbarPanel.add(rootButton = new cButton(" o o o ")); //, oe.aConstraints);
500
- rootButton.setToolTipText("Edit object in new tab");
491
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
492
+ rootButton.setToolTipText("Edit selection in new tab");
501493 rootButton.addActionListener(this);
502
- oe.aConstraints.gridx += 1;
503
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
494
+
495
+ oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
504496 closeButton.setToolTipText("Close tab");
505497 closeButton.addActionListener(this);
506498 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
507499 //clearButton.addActionListener(this);
508
- oe.aConstraints.gridx += 1;
509500
510
- oe.aConstraints.gridx = 1; //
511
- 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");
512505 editButton.addActionListener(this);
513
- oe.aConstraints.gridx += 1;
514
- oe.aConstraints.weighty = 0;
515
- oe.aConstraints.gridwidth = 1;
516506
517
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
507
+ commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
508
+ uneditButton.setToolTipText("Unedit selection");
518509 uneditButton.addActionListener(this);
519510
520
- oe.aConstraints.gridx += 1;
521
- oe.aConstraints.weighty = 0;
522
- oe.aConstraints.gridwidth = 1;
523
-
524
- 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");
525513 clearPanelButton.addActionListener(this);
526514
527
- oe.aConstraints.gridx += 1;
528
- oe.aConstraints.weighty = 0;
529
- oe.aConstraints.gridwidth = 1;
530
-
531
- 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??");
532517 allParamsButton.addActionListener(this);
533518
534
- oe.aConstraints.gridx += 1;
535
- oe.aConstraints.weighty = 0;
536
- oe.aConstraints.gridwidth = 1;
537
-
538
- oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints);
519
+ commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
520
+ unselectButton.setToolTipText("Unselect");
539521 unselectButton.addActionListener(this);
540522
523
+ commandsPanel.preferredHeight = 1;
524
+
525
+ oe.treePanel.add(commandsPanel);
526
+ oe.treePanel.Return();
527
+
541528 // oe.aConstraints.gridx += 1;
542529 // oe.aConstraints.weighty = 0;
543530 // oe.aConstraints.gridwidth = 1;
....@@ -549,40 +536,37 @@
549536 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
550537 // gcButton.addActionListener(this);
551538
552
- oe.aConstraints.gridx = 0;
553
- oe.aConstraints.gridy += 1;
554
-
555
- //ctrlPanel.add(objList = new List(5, true));
556
- oe.aConstraints.gridwidth = 100;
557
- // oe.aConstraints.gridheight = 100;
558
- oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL;
559
- oe.aConstraints.gridheight = 1;
560
- oe.aConstraints.weighty = 0.5;
561
- oe.aConstraints.gridx = 0;
562
- JScrollPane jSP;
539
+ cGridBag jSPPanel = new cGridBag();
540
+
541
+ JScrollPane jSP;
563542 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
564
- 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);
565544 ResetModel();
566
- oe.aConstraints.weighty = 0.5;
567
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
568
- oe.aConstraints.gridy += 1;
569
- oe.aConstraints.gridwidth = 1;
545
+
546
+ oe.treePanel.add(jSPPanel);
547
+ oe.treePanel.Return();
570548
571
- oe.aConstraints.weighty = 0;
572
- oe.aConstraints.gridwidth = 2;
573
-
574
- 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");
575553 colorCB.addItemListener(this);
576
- oe.aConstraints.gridx += 2;
577
- 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");
578557 materialCB.addItemListener(this);
579
- oe.aConstraints.gridx += 2;
580
- 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");
581561 textureCB.addItemListener(this);
582562
583
- oe.aConstraints.gridx = 0;
584
- oe.aConstraints.gridy += 1;
563
+ copyOptionsPanel.preferredHeight = 1;
564
+ oe.treePanel.add(copyOptionsPanel);
565
+ oe.treePanel.Return();
585566
567
+// mainPanel.setDividerLocation(0.5); //1.0);
568
+// mainPanel.setResizeWeight(0.5);
569
+
586570 //jList.addListSelectionListener(this);
587571 oe.jTree.addTreeSelectionListener(this);
588572 //jTree.setRootVisible(false);
....@@ -607,39 +591,29 @@
607591
608592 void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
609593 {
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;
616594 panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
617595 supportCB.setToolTipText("Enabled rigging");
618596 supportCB.addItemListener(this);
619597
620
- // constraints.gridy += 1;
621598 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
622599 // localCB.addItemListener(this);
623600
624
- //constraints.gridy += 1;
625601 panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
626602 crowdCB.setToolTipText("Used for crowds");
627603 crowdCB.addItemListener(this);
628604
629
- //constraints.gridy += 1;
630605 panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
631606 smoothCB.setToolTipText("Snapping delay");
632607 smoothCB.addItemListener(this);
633608
634
- //constraints.gridy += 1;
635609 panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
636610 slowCB.setToolTipText("Smooth interpolation");
637611 slowCB.addItemListener(this);
638
- //constraints.gridy += 1;
612
+
639613 panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
640614 boxCB.setToolTipText("Display bounding boxes");
641615 boxCB.addItemListener(this);
642
- //constraints.gridy += 1;
616
+
643617 panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
644618 zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
645619 zoomBoxCB.addItemListener(this);
....@@ -668,14 +642,18 @@
668642 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
669643 // debugCB.addItemListener(this);
670644
671
- //constraints.gridy += 1;
672645 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
673646 oeilCB.addItemListener(this);
674647
675
- //constraints.gridy += 1;
676648 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
677649 lookAtCB.setToolTipText("Look-at target");
678650 lookAtCB.addItemListener(this);
651
+
652
+ cGridBag fill = new cGridBag();
653
+
654
+ fill.preferredHeight = 200;
655
+
656
+ panel.add(fill);
679657
680658 }
681659
....@@ -1124,7 +1102,7 @@
11241102 {
11251103 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
11261104 animationItem.addItemListener(this);
1127
- animationItem.setState(CameraPane.ANIMATION);
1105
+ animationItem.setState(Globals.ANIMATION);
11281106
11291107 menu.add("-");
11301108 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
....@@ -4125,12 +4103,12 @@
41254103 System.err.println("info : " + child.GetPath());
41264104 }
41274105 }
4128
- else
4129
- {
4130
- objEditor.SetMaterial(group); // .GetMaterial());
4131
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4132
- System.err.println("info : " + group.GetPath());
4133
- }
4106
+// else
4107
+// {
4108
+// objEditor.SetMaterial(group); // .GetMaterial());
4109
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4110
+// System.err.println("info : " + group.GetPath());
4111
+// }
41344112
41354113 objEditor.SetText(); // jan 2014
41364114