.. | .. |
---|
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")); |
---|
.. | .. |
---|
434 | 434 | oe.radioPanel.add(dummyButton); |
---|
435 | 435 | oe.buttonGroup.add(dummyButton); |
---|
436 | 436 | */ |
---|
437 | | - aConstraints.gridy += 1; |
---|
438 | | - |
---|
439 | 437 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
440 | 438 | |
---|
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); |
---|
445 | 440 | liveCB.setToolTipText("Enabled animation"); |
---|
446 | 441 | liveCB.addItemListener(this); |
---|
447 | 442 | |
---|
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); |
---|
450 | 448 | trackCB.setToolTipText("Enable tracking"); |
---|
451 | 449 | trackCB.addItemListener(this); |
---|
452 | 450 | |
---|
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); |
---|
455 | 452 | screenfitButton.setToolTipText("Screen fit"); |
---|
456 | 453 | screenfitButton.addActionListener(this); |
---|
457 | | - oe.aConstraints.gridx += 1; |
---|
| 454 | + |
---|
458 | 455 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
459 | 456 | // screenfitpointButton.addActionListener(this); |
---|
460 | | -// oe.aConstraints.gridx += 1; |
---|
461 | | - oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints); |
---|
462 | | - snapobjectButton.addActionListener(this); |
---|
463 | | - snapobjectButton.setToolTipText("Snap Object"); |
---|
464 | | - oe.aConstraints.gridx += 1; |
---|
465 | 457 | |
---|
466 | | - //aConstraints.gridx = 0; |
---|
467 | | - //aConstraints.gridy += 1; |
---|
468 | | - oe.aConstraints.weighty = 0; |
---|
469 | | - oe.aConstraints.gridwidth = 1; |
---|
470 | | - |
---|
471 | | - oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints); |
---|
| 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 | + |
---|
| 465 | + oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
472 | 466 | flashSelectionButton.setToolTipText("Show selection"); |
---|
473 | 467 | flashSelectionButton.addActionListener(this); |
---|
474 | 468 | |
---|
475 | | - oe.toolbarPanel.add(new cButton(" ", false)); |
---|
| 469 | + oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
476 | 470 | |
---|
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); |
---|
| 471 | + oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
483 | 472 | twoButton.setToolTipText("Show center view only"); |
---|
484 | 473 | twoButton.addActionListener(this); |
---|
485 | | - oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints); |
---|
| 474 | + oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
486 | 475 | fourButton.addActionListener(this); |
---|
487 | 476 | fourButton.setToolTipText("Show left panel only"); |
---|
488 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints); |
---|
| 477 | + oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
489 | 478 | sixButton.setToolTipText("2-column layout left"); |
---|
490 | 479 | sixButton.addActionListener(this); |
---|
491 | | - oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints); |
---|
| 480 | + oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
492 | 481 | threeButton.setToolTipText("2-column layout right"); |
---|
493 | 482 | threeButton.addActionListener(this); |
---|
494 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints); |
---|
| 483 | + oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
495 | 484 | sevenButton.setToolTipText("3-column layout"); |
---|
496 | 485 | sevenButton.addActionListener(this); |
---|
497 | 486 | // |
---|
498 | 487 | |
---|
499 | | - oe.toolbarPanel.add(rootButton = new cButton(" o o o ")); //, oe.aConstraints); |
---|
500 | | - rootButton.setToolTipText("Edit object in new tab"); |
---|
| 488 | + oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 489 | + rootButton.setToolTipText("Edit selection in new tab"); |
---|
501 | 490 | rootButton.addActionListener(this); |
---|
502 | | - oe.aConstraints.gridx += 1; |
---|
503 | | - oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints); |
---|
| 491 | + |
---|
| 492 | + oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
504 | 493 | closeButton.setToolTipText("Close tab"); |
---|
505 | 494 | closeButton.addActionListener(this); |
---|
506 | 495 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
507 | 496 | //clearButton.addActionListener(this); |
---|
508 | | - oe.aConstraints.gridx += 1; |
---|
509 | 497 | |
---|
510 | | - oe.aConstraints.gridx = 1; // |
---|
511 | | - 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"); |
---|
512 | 502 | editButton.addActionListener(this); |
---|
513 | | - oe.aConstraints.gridx += 1; |
---|
514 | | - oe.aConstraints.weighty = 0; |
---|
515 | | - oe.aConstraints.gridwidth = 1; |
---|
516 | 503 | |
---|
517 | | - oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints); |
---|
| 504 | + commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 505 | + uneditButton.setToolTipText("Unedit selection"); |
---|
518 | 506 | uneditButton.addActionListener(this); |
---|
519 | 507 | |
---|
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); |
---|
| 508 | + commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 509 | + clearPanelButton.setToolTipText("Clear edit panel"); |
---|
525 | 510 | clearPanelButton.addActionListener(this); |
---|
526 | 511 | |
---|
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); |
---|
| 512 | + commandsPanel.add(allParamsButton = new cButton("A", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 513 | + allParamsButton.setToolTipText("All params??"); |
---|
532 | 514 | allParamsButton.addActionListener(this); |
---|
533 | 515 | |
---|
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); |
---|
| 516 | + commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 517 | + unselectButton.setToolTipText("Unselect"); |
---|
539 | 518 | unselectButton.addActionListener(this); |
---|
540 | 519 | |
---|
| 520 | + commandsPanel.preferredHeight = 1; |
---|
| 521 | + |
---|
| 522 | + oe.treePanel.add(commandsPanel); |
---|
| 523 | + oe.treePanel.Return(); |
---|
| 524 | + |
---|
541 | 525 | // oe.aConstraints.gridx += 1; |
---|
542 | 526 | // oe.aConstraints.weighty = 0; |
---|
543 | 527 | // oe.aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
549 | 533 | // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints); |
---|
550 | 534 | // gcButton.addActionListener(this); |
---|
551 | 535 | |
---|
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; |
---|
| 536 | + cGridBag jSPPanel = new cGridBag(); |
---|
| 537 | + |
---|
| 538 | + JScrollPane jSP; |
---|
563 | 539 | //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); |
---|
| 540 | + jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints); |
---|
565 | 541 | ResetModel(); |
---|
566 | | - oe.aConstraints.weighty = 0.5; |
---|
567 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
568 | | - oe.aConstraints.gridy += 1; |
---|
569 | | - oe.aConstraints.gridwidth = 1; |
---|
| 542 | + |
---|
| 543 | + oe.treePanel.add(jSPPanel); |
---|
| 544 | + oe.treePanel.Return(); |
---|
570 | 545 | |
---|
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); |
---|
| 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"); |
---|
575 | 550 | colorCB.addItemListener(this); |
---|
576 | | - oe.aConstraints.gridx += 2; |
---|
577 | | - 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"); |
---|
578 | 554 | materialCB.addItemListener(this); |
---|
579 | | - oe.aConstraints.gridx += 2; |
---|
580 | | - 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"); |
---|
581 | 558 | textureCB.addItemListener(this); |
---|
582 | 559 | |
---|
583 | | - oe.aConstraints.gridx = 0; |
---|
584 | | - oe.aConstraints.gridy += 1; |
---|
| 560 | + copyOptionsPanel.preferredHeight = 1; |
---|
| 561 | + oe.treePanel.add(copyOptionsPanel); |
---|
| 562 | + oe.treePanel.Return(); |
---|
585 | 563 | |
---|
| 564 | +// mainPanel.setDividerLocation(0.5); //1.0); |
---|
| 565 | +// mainPanel.setResizeWeight(0.5); |
---|
| 566 | + |
---|
586 | 567 | //jList.addListSelectionListener(this); |
---|
587 | 568 | oe.jTree.addTreeSelectionListener(this); |
---|
588 | 569 | //jTree.setRootVisible(false); |
---|
.. | .. |
---|
607 | 588 | |
---|
608 | 589 | void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
609 | 590 | { |
---|
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; |
---|
616 | 591 | panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
617 | 592 | supportCB.setToolTipText("Enabled rigging"); |
---|
618 | 593 | supportCB.addItemListener(this); |
---|
619 | 594 | |
---|
620 | | - // constraints.gridy += 1; |
---|
621 | 595 | // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
622 | 596 | // localCB.addItemListener(this); |
---|
623 | 597 | |
---|
624 | | - //constraints.gridy += 1; |
---|
625 | 598 | panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
626 | 599 | crowdCB.setToolTipText("Used for crowds"); |
---|
627 | 600 | crowdCB.addItemListener(this); |
---|
628 | 601 | |
---|
629 | | - //constraints.gridy += 1; |
---|
630 | 602 | panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints); |
---|
631 | 603 | smoothCB.setToolTipText("Snapping delay"); |
---|
632 | 604 | smoothCB.addItemListener(this); |
---|
633 | 605 | |
---|
634 | | - //constraints.gridy += 1; |
---|
635 | 606 | panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
636 | 607 | slowCB.setToolTipText("Smooth interpolation"); |
---|
637 | 608 | slowCB.addItemListener(this); |
---|
638 | | - //constraints.gridy += 1; |
---|
| 609 | + |
---|
639 | 610 | panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
640 | 611 | boxCB.setToolTipText("Display bounding boxes"); |
---|
641 | 612 | boxCB.addItemListener(this); |
---|
642 | | - //constraints.gridy += 1; |
---|
| 613 | + |
---|
643 | 614 | panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
644 | 615 | zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
645 | 616 | zoomBoxCB.addItemListener(this); |
---|
.. | .. |
---|
668 | 639 | //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
669 | 640 | // debugCB.addItemListener(this); |
---|
670 | 641 | |
---|
671 | | - //constraints.gridy += 1; |
---|
672 | 642 | panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
673 | 643 | oeilCB.addItemListener(this); |
---|
674 | 644 | |
---|
675 | | - //constraints.gridy += 1; |
---|
676 | 645 | panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
677 | 646 | lookAtCB.setToolTipText("Look-at target"); |
---|
678 | 647 | lookAtCB.addItemListener(this); |
---|
| 648 | + |
---|
| 649 | + cGridBag fill = new cGridBag(); |
---|
| 650 | + |
---|
| 651 | + fill.preferredHeight = 200; |
---|
| 652 | + |
---|
| 653 | + panel.add(fill); |
---|
679 | 654 | |
---|
680 | 655 | } |
---|
681 | 656 | |
---|
.. | .. |
---|
1124 | 1099 | { |
---|
1125 | 1100 | menu.add(animationItem = new CheckboxMenuItem("Animation...")); |
---|
1126 | 1101 | animationItem.addItemListener(this); |
---|
1127 | | - animationItem.setState(CameraPane.ANIMATION); |
---|
| 1102 | + animationItem.setState(Globals.ANIMATION); |
---|
1128 | 1103 | |
---|
1129 | 1104 | menu.add("-"); |
---|
1130 | 1105 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
.. | .. |
---|
2260 | 2235 | RandomNode random = new RandomNode(); |
---|
2261 | 2236 | group(random); |
---|
2262 | 2237 | if (random.size() > 0) |
---|
2263 | | - random.name = random.get(0).name + "Rnd"; |
---|
| 2238 | + random.name = random.get(0).name + "Switch"; |
---|
2264 | 2239 | } else |
---|
2265 | 2240 | if (source == physicsItem) |
---|
2266 | 2241 | { |
---|
.. | .. |
---|
4125 | 4100 | System.err.println("info : " + child.GetPath()); |
---|
4126 | 4101 | } |
---|
4127 | 4102 | } |
---|
4128 | | - else |
---|
4129 | | - { |
---|
4130 | | - objEditor.SetMaterial(group); // .GetMaterial()); |
---|
4131 | | - objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
4132 | | - System.err.println("info : " + group.GetPath()); |
---|
4133 | | - } |
---|
| 4103 | +// else |
---|
| 4104 | +// { |
---|
| 4105 | +// objEditor.SetMaterial(group); // .GetMaterial()); |
---|
| 4106 | +// objEditor.AddInfo(group, this, true); // .GetMaterial()); |
---|
| 4107 | +// System.err.println("info : " + group.GetPath()); |
---|
| 4108 | +// } |
---|
4134 | 4109 | |
---|
4135 | 4110 | objEditor.SetText(); // jan 2014 |
---|
4136 | 4111 | |
---|