.. | .. |
---|
239 | 239 | ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
240 | 240 | ungroupItem.addActionListener(this); |
---|
241 | 241 | menu.add("-"); |
---|
242 | | - randomItem = menu.add(new MenuItem("Random")); |
---|
| 242 | + randomItem = menu.add(new MenuItem("Switch node")); |
---|
243 | 243 | randomItem.addActionListener(this); |
---|
244 | | - physicsItem = menu.add(new MenuItem("Physics")); |
---|
245 | | - physicsItem.addActionListener(this); |
---|
246 | | - frameselectorItem = menu.add(new MenuItem("Frame Selector")); |
---|
247 | | - frameselectorItem.addActionListener(this); |
---|
248 | 244 | switchGeoItem = menu.add(new MenuItem("Switch Geometry")); |
---|
249 | 245 | switchGeoItem.addActionListener(this); |
---|
250 | 246 | switchTransfoItem = menu.add(new MenuItem("Switch Transform")); |
---|
251 | 247 | switchTransfoItem.addActionListener(this); |
---|
| 248 | + physicsItem = menu.add(new MenuItem("Physics")); |
---|
| 249 | + physicsItem.addActionListener(this); |
---|
| 250 | + frameselectorItem = menu.add(new MenuItem("Frame Selector")); |
---|
| 251 | + frameselectorItem.addActionListener(this); |
---|
252 | 252 | morphItem = menu.add(new MenuItem("Morph")); |
---|
253 | 253 | morphItem.addActionListener(this); |
---|
254 | 254 | scriptNodeItem = menu.add(new MenuItem("Script Node")); |
---|
.. | .. |
---|
436 | 436 | */ |
---|
437 | 437 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
438 | 438 | |
---|
439 | | - oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints); |
---|
| 439 | + oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints); |
---|
440 | 440 | liveCB.setToolTipText("Enabled animation"); |
---|
441 | 441 | liveCB.addItemListener(this); |
---|
442 | 442 | |
---|
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); |
---|
444 | 448 | trackCB.setToolTipText("Enable tracking"); |
---|
445 | 449 | trackCB.addItemListener(this); |
---|
446 | 450 | |
---|
.. | .. |
---|
450 | 454 | |
---|
451 | 455 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
452 | 456 | // screenfitpointButton.addActionListener(this); |
---|
453 | | -// oe.aConstraints.gridx += 1; |
---|
454 | | - oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
455 | | - snapobjectButton.addActionListener(this); |
---|
456 | | - snapobjectButton.setToolTipText("Snap Object"); |
---|
457 | | - oe.aConstraints.gridx += 1; |
---|
458 | 457 | |
---|
459 | | - //aConstraints.gridx = 0; |
---|
460 | | - //aConstraints.gridy += 1; |
---|
461 | | - oe.aConstraints.weighty = 0; |
---|
462 | | - oe.aConstraints.gridwidth = 1; |
---|
463 | | - |
---|
| 458 | + if (Globals.ADVANCED) |
---|
| 459 | + { |
---|
| 460 | + oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 461 | + snapobjectButton.addActionListener(this); |
---|
| 462 | + snapobjectButton.setToolTipText("Snap Object"); |
---|
| 463 | + } |
---|
| 464 | + |
---|
464 | 465 | oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
465 | 466 | flashSelectionButton.setToolTipText("Show selection"); |
---|
466 | 467 | flashSelectionButton.addActionListener(this); |
---|
.. | .. |
---|
485 | 486 | // |
---|
486 | 487 | |
---|
487 | 488 | oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
488 | | - rootButton.setToolTipText("Edit object in new tab"); |
---|
| 489 | + rootButton.setToolTipText("Edit selection in new tab"); |
---|
489 | 490 | rootButton.addActionListener(this); |
---|
490 | | - oe.aConstraints.gridx += 1; |
---|
491 | | - oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 491 | + |
---|
| 492 | + oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
492 | 493 | closeButton.setToolTipText("Close tab"); |
---|
493 | 494 | closeButton.addActionListener(this); |
---|
494 | 495 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
495 | 496 | //clearButton.addActionListener(this); |
---|
496 | | - oe.aConstraints.gridx += 1; |
---|
497 | 497 | |
---|
498 | | - oe.aConstraints.gridx = 1; // |
---|
499 | | - oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints); |
---|
| 498 | + cGridBag commandsPanel = new cGridBag(); |
---|
| 499 | + |
---|
| 500 | + commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 501 | + editButton.setToolTipText("Edit selection"); |
---|
500 | 502 | editButton.addActionListener(this); |
---|
501 | | - oe.aConstraints.gridx += 1; |
---|
502 | | - oe.aConstraints.weighty = 0; |
---|
503 | | - oe.aConstraints.gridwidth = 1; |
---|
504 | 503 | |
---|
505 | | - oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints); |
---|
| 504 | + commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 505 | + uneditButton.setToolTipText("Unedit selection"); |
---|
506 | 506 | uneditButton.addActionListener(this); |
---|
507 | 507 | |
---|
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); |
---|
| 508 | + commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 509 | + clearPanelButton.setToolTipText("Clear edit panel"); |
---|
513 | 510 | clearPanelButton.addActionListener(this); |
---|
514 | 511 | |
---|
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); |
---|
| 512 | + commandsPanel.add(allParamsButton = new cButton("A", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 513 | + allParamsButton.setToolTipText("All params??"); |
---|
520 | 514 | allParamsButton.addActionListener(this); |
---|
521 | 515 | |
---|
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); |
---|
| 516 | + commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 517 | + unselectButton.setToolTipText("Unselect"); |
---|
527 | 518 | unselectButton.addActionListener(this); |
---|
528 | 519 | |
---|
| 520 | + commandsPanel.preferredHeight = 1; |
---|
| 521 | + |
---|
| 522 | + oe.treePanel.add(commandsPanel); |
---|
| 523 | + oe.treePanel.Return(); |
---|
| 524 | + |
---|
529 | 525 | // oe.aConstraints.gridx += 1; |
---|
530 | 526 | // oe.aConstraints.weighty = 0; |
---|
531 | 527 | // oe.aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
537 | 533 | // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints); |
---|
538 | 534 | // gcButton.addActionListener(this); |
---|
539 | 535 | |
---|
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; |
---|
| 536 | + cGridBag jSPPanel = new cGridBag(); |
---|
| 537 | + |
---|
| 538 | + JScrollPane jSP; |
---|
551 | 539 | //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); |
---|
| 540 | + jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints); |
---|
553 | 541 | ResetModel(); |
---|
554 | | - oe.aConstraints.weighty = 0.5; |
---|
555 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
556 | | - oe.aConstraints.gridy += 1; |
---|
557 | | - oe.aConstraints.gridwidth = 1; |
---|
| 542 | + |
---|
| 543 | + oe.treePanel.add(jSPPanel); |
---|
| 544 | + oe.treePanel.Return(); |
---|
558 | 545 | |
---|
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); |
---|
| 546 | + cGridBag copyOptionsPanel = new cGridBag(); |
---|
| 547 | + |
---|
| 548 | + copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints); |
---|
| 549 | + colorCB.setToolTipText("Copy color when dropped"); |
---|
563 | 550 | colorCB.addItemListener(this); |
---|
564 | | - oe.aConstraints.gridx += 2; |
---|
565 | | - oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints); |
---|
| 551 | + |
---|
| 552 | + copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints); |
---|
| 553 | + materialCB.setToolTipText("Copy material when dropped"); |
---|
566 | 554 | materialCB.addItemListener(this); |
---|
567 | | - oe.aConstraints.gridx += 2; |
---|
568 | | - oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints); |
---|
| 555 | + |
---|
| 556 | + copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints); |
---|
| 557 | + textureCB.setToolTipText("Copy texture when dropped"); |
---|
569 | 558 | textureCB.addItemListener(this); |
---|
570 | 559 | |
---|
571 | | - oe.aConstraints.gridx = 0; |
---|
572 | | - oe.aConstraints.gridy += 1; |
---|
| 560 | + copyOptionsPanel.preferredHeight = 1; |
---|
| 561 | + oe.treePanel.add(copyOptionsPanel); |
---|
| 562 | + oe.treePanel.Return(); |
---|
573 | 563 | |
---|
| 564 | +// mainPanel.setDividerLocation(0.5); //1.0); |
---|
| 565 | +// mainPanel.setResizeWeight(0.5); |
---|
| 566 | + |
---|
574 | 567 | //jList.addListSelectionListener(this); |
---|
575 | 568 | oe.jTree.addTreeSelectionListener(this); |
---|
576 | 569 | //jTree.setRootVisible(false); |
---|
.. | .. |
---|
595 | 588 | |
---|
596 | 589 | void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
597 | 590 | { |
---|
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; |
---|
604 | 591 | panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
605 | 592 | supportCB.setToolTipText("Enabled rigging"); |
---|
606 | 593 | supportCB.addItemListener(this); |
---|
607 | 594 | |
---|
608 | | - // constraints.gridy += 1; |
---|
609 | 595 | // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
610 | 596 | // localCB.addItemListener(this); |
---|
611 | 597 | |
---|
612 | | - //constraints.gridy += 1; |
---|
613 | 598 | panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
614 | 599 | crowdCB.setToolTipText("Used for crowds"); |
---|
615 | 600 | crowdCB.addItemListener(this); |
---|
616 | 601 | |
---|
617 | | - //constraints.gridy += 1; |
---|
618 | 602 | panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints); |
---|
619 | 603 | smoothCB.setToolTipText("Snapping delay"); |
---|
620 | 604 | smoothCB.addItemListener(this); |
---|
621 | 605 | |
---|
622 | | - //constraints.gridy += 1; |
---|
623 | 606 | panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
624 | 607 | slowCB.setToolTipText("Smooth interpolation"); |
---|
625 | 608 | slowCB.addItemListener(this); |
---|
626 | | - //constraints.gridy += 1; |
---|
| 609 | + |
---|
627 | 610 | panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
628 | 611 | boxCB.setToolTipText("Display bounding boxes"); |
---|
629 | 612 | boxCB.addItemListener(this); |
---|
630 | | - //constraints.gridy += 1; |
---|
| 613 | + |
---|
631 | 614 | panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
632 | 615 | zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
633 | 616 | zoomBoxCB.addItemListener(this); |
---|
.. | .. |
---|
656 | 639 | //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
657 | 640 | // debugCB.addItemListener(this); |
---|
658 | 641 | |
---|
659 | | - //constraints.gridy += 1; |
---|
660 | 642 | panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
661 | 643 | oeilCB.addItemListener(this); |
---|
662 | 644 | |
---|
663 | | - //constraints.gridy += 1; |
---|
664 | 645 | panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
665 | 646 | lookAtCB.setToolTipText("Look-at target"); |
---|
666 | 647 | lookAtCB.addItemListener(this); |
---|
| 648 | + |
---|
| 649 | + cGridBag fill = new cGridBag(); |
---|
| 650 | + |
---|
| 651 | + fill.preferredHeight = 200; |
---|
| 652 | + |
---|
| 653 | + panel.add(fill); |
---|
667 | 654 | |
---|
668 | 655 | } |
---|
669 | 656 | |
---|
.. | .. |
---|
1112 | 1099 | { |
---|
1113 | 1100 | menu.add(animationItem = new CheckboxMenuItem("Animation...")); |
---|
1114 | 1101 | animationItem.addItemListener(this); |
---|
1115 | | - animationItem.setState(CameraPane.ANIMATION); |
---|
| 1102 | + animationItem.setState(Globals.ANIMATION); |
---|
1116 | 1103 | |
---|
1117 | 1104 | menu.add("-"); |
---|
1118 | 1105 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
.. | .. |
---|
2248 | 2235 | RandomNode random = new RandomNode(); |
---|
2249 | 2236 | group(random); |
---|
2250 | 2237 | if (random.size() > 0) |
---|
2251 | | - random.name = random.get(0).name + "Rnd"; |
---|
| 2238 | + random.name = random.get(0).name + "Switch"; |
---|
2252 | 2239 | } else |
---|
2253 | 2240 | if (source == physicsItem) |
---|
2254 | 2241 | { |
---|
.. | .. |
---|
4113 | 4100 | System.err.println("info : " + child.GetPath()); |
---|
4114 | 4101 | } |
---|
4115 | 4102 | } |
---|
4116 | | - else |
---|
4117 | | - { |
---|
4118 | | - objEditor.SetMaterial(group); // .GetMaterial()); |
---|
4119 | | - objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
4120 | | - System.err.println("info : " + group.GetPath()); |
---|
4121 | | - } |
---|
| 4103 | +// else |
---|
| 4104 | +// { |
---|
| 4105 | +// objEditor.SetMaterial(group); // .GetMaterial()); |
---|
| 4106 | +// objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
| 4107 | +// System.err.println("info : " + group.GetPath()); |
---|
| 4108 | +// } |
---|
4122 | 4109 | |
---|
4123 | 4110 | objEditor.SetText(); // jan 2014 |
---|
4124 | 4111 | |
---|