.. | .. |
---|
12 | 12 | import com.jme.math.Vector3f; |
---|
13 | 13 | import com.jme.renderer.ColorRGBA; |
---|
14 | 14 | |
---|
| 15 | +import grafeme.ui.*; |
---|
15 | 16 | //import buoy.widget.BFileChooser; |
---|
16 | 17 | |
---|
17 | 18 | class GroupEditor extends ObjEditor implements //iParse, //iCallBack, |
---|
.. | .. |
---|
433 | 434 | oe.radioPanel.add(dummyButton); |
---|
434 | 435 | oe.buttonGroup.add(dummyButton); |
---|
435 | 436 | */ |
---|
436 | | - aConstraints.gridy += 1; |
---|
437 | | - |
---|
438 | 437 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
439 | | - |
---|
440 | | - oe.aConstraints.gridwidth = 1; |
---|
441 | | - oe.aConstraints.gridx = 0; |
---|
442 | 438 | |
---|
443 | 439 | oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints); |
---|
444 | 440 | liveCB.setToolTipText("Enabled animation"); |
---|
445 | 441 | liveCB.addItemListener(this); |
---|
446 | 442 | |
---|
447 | | - oe.aConstraints.gridx += 1; |
---|
448 | 443 | oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK), oe.aConstraints); |
---|
449 | 444 | trackCB.setToolTipText("Enable tracking"); |
---|
450 | 445 | trackCB.addItemListener(this); |
---|
451 | 446 | |
---|
452 | | - oe.aConstraints.gridx += 1; |
---|
453 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints); |
---|
| 447 | + oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
454 | 448 | screenfitButton.setToolTipText("Screen fit"); |
---|
455 | 449 | screenfitButton.addActionListener(this); |
---|
456 | | - oe.aConstraints.gridx += 1; |
---|
| 450 | + |
---|
457 | 451 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
458 | 452 | // screenfitpointButton.addActionListener(this); |
---|
459 | 453 | // oe.aConstraints.gridx += 1; |
---|
460 | | - oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints); |
---|
| 454 | + oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
461 | 455 | snapobjectButton.addActionListener(this); |
---|
462 | 456 | snapobjectButton.setToolTipText("Snap Object"); |
---|
463 | 457 | oe.aConstraints.gridx += 1; |
---|
.. | .. |
---|
467 | 461 | oe.aConstraints.weighty = 0; |
---|
468 | 462 | oe.aConstraints.gridwidth = 1; |
---|
469 | 463 | |
---|
470 | | - oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints); |
---|
| 464 | + oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
471 | 465 | flashSelectionButton.setToolTipText("Show selection"); |
---|
472 | 466 | flashSelectionButton.addActionListener(this); |
---|
473 | 467 | |
---|
474 | | - oe.toolbarPanel.add(new cButton(" ", false)); |
---|
| 468 | + oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
475 | 469 | |
---|
476 | | - oe.aConstraints.gridx += 1; |
---|
477 | | - oe.aConstraints.weighty = 0; |
---|
478 | | - oe.aConstraints.gridwidth = 1; |
---|
479 | | - |
---|
480 | | - // |
---|
481 | | - oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints); |
---|
| 470 | + oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
482 | 471 | twoButton.setToolTipText("Show center view only"); |
---|
483 | 472 | twoButton.addActionListener(this); |
---|
484 | | - oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints); |
---|
| 473 | + oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
485 | 474 | fourButton.addActionListener(this); |
---|
486 | 475 | fourButton.setToolTipText("Show left panel only"); |
---|
487 | | - oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints); |
---|
| 476 | + oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
488 | 477 | sixButton.setToolTipText("2-column layout left"); |
---|
489 | 478 | sixButton.addActionListener(this); |
---|
490 | | - oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints); |
---|
| 479 | + oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
491 | 480 | threeButton.setToolTipText("2-column layout right"); |
---|
492 | 481 | threeButton.addActionListener(this); |
---|
493 | | - oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints); |
---|
| 482 | + oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
494 | 483 | sevenButton.setToolTipText("3-column layout"); |
---|
495 | 484 | sevenButton.addActionListener(this); |
---|
496 | 485 | // |
---|
497 | 486 | |
---|
498 | | - oe.toolbarPanel.add(rootButton = new cButton(" o o o ")); //, oe.aConstraints); |
---|
| 487 | + oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
499 | 488 | rootButton.setToolTipText("Edit object in new tab"); |
---|
500 | 489 | rootButton.addActionListener(this); |
---|
501 | 490 | oe.aConstraints.gridx += 1; |
---|
502 | | - oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints); |
---|
| 491 | + oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints); |
---|
503 | 492 | closeButton.setToolTipText("Close tab"); |
---|
504 | 493 | closeButton.addActionListener(this); |
---|
505 | 494 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
.. | .. |
---|
604 | 593 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
605 | 594 | } |
---|
606 | 595 | |
---|
607 | | - void AddOptions(JPanel panel, GridBagConstraints constraints) |
---|
| 596 | + void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
608 | 597 | { |
---|
609 | | - constraints.gridx = 0; |
---|
610 | | - constraints.gridy = 0; |
---|
611 | | - panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), constraints); |
---|
| 598 | + //constraints.gridx = 0; |
---|
| 599 | + //constraints.gridy = 0; |
---|
| 600 | + panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints); |
---|
612 | 601 | fastCB.setToolTipText("Fast mode"); |
---|
613 | 602 | fastCB.addItemListener(this); |
---|
614 | | - constraints.gridy += 1; |
---|
615 | | - panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), constraints); |
---|
| 603 | + //constraints.gridy += 1; |
---|
| 604 | + panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
616 | 605 | supportCB.setToolTipText("Enabled rigging"); |
---|
617 | 606 | supportCB.addItemListener(this); |
---|
618 | 607 | |
---|
.. | .. |
---|
620 | 609 | // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
621 | 610 | // localCB.addItemListener(this); |
---|
622 | 611 | |
---|
623 | | - constraints.gridy += 1; |
---|
624 | | - panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD), constraints); |
---|
| 612 | + //constraints.gridy += 1; |
---|
| 613 | + panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
625 | 614 | crowdCB.setToolTipText("Used for crowds"); |
---|
626 | 615 | crowdCB.addItemListener(this); |
---|
627 | 616 | |
---|
628 | | - constraints.gridy += 1; |
---|
629 | | - panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), constraints); |
---|
| 617 | + //constraints.gridy += 1; |
---|
| 618 | + panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints); |
---|
630 | 619 | smoothCB.setToolTipText("Snapping delay"); |
---|
631 | 620 | smoothCB.addItemListener(this); |
---|
632 | 621 | |
---|
633 | | - constraints.gridy += 1; |
---|
634 | | - panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), constraints); |
---|
| 622 | + //constraints.gridy += 1; |
---|
| 623 | + panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
635 | 624 | slowCB.setToolTipText("Smooth interpolation"); |
---|
636 | 625 | slowCB.addItemListener(this); |
---|
637 | | - constraints.gridy += 1; |
---|
638 | | - panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE), constraints); |
---|
| 626 | + //constraints.gridy += 1; |
---|
| 627 | + panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
639 | 628 | boxCB.setToolTipText("Display bounding boxes"); |
---|
640 | 629 | boxCB.addItemListener(this); |
---|
641 | | - constraints.gridy += 1; |
---|
642 | | - panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE), constraints); |
---|
| 630 | + //constraints.gridy += 1; |
---|
| 631 | + panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
643 | 632 | zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
644 | 633 | zoomBoxCB.addItemListener(this); |
---|
645 | 634 | |
---|
.. | .. |
---|
650 | 639 | if (false) |
---|
651 | 640 | { |
---|
652 | 641 | // handled in scripts |
---|
653 | | - constraints.gridy += 1; |
---|
654 | | - panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), constraints); |
---|
| 642 | + //constraints.gridy += 1; |
---|
| 643 | + panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints); |
---|
655 | 644 | speakerCameraCB.addItemListener(this); |
---|
656 | 645 | |
---|
657 | | - constraints.gridy += 1; |
---|
658 | | - panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), constraints); |
---|
| 646 | + //constraints.gridy += 1; |
---|
| 647 | + panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints); |
---|
659 | 648 | speakerFocusCB.addItemListener(this); |
---|
660 | 649 | |
---|
661 | | - constraints.gridy += 1; |
---|
662 | | - panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), constraints); |
---|
| 650 | + //constraints.gridy += 1; |
---|
| 651 | + panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
663 | 652 | smoothfocusCB.addItemListener(this); |
---|
664 | 653 | } |
---|
665 | 654 | |
---|
.. | .. |
---|
667 | 656 | //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
668 | 657 | // debugCB.addItemListener(this); |
---|
669 | 658 | |
---|
670 | | - constraints.gridy += 1; |
---|
671 | | - panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL), constraints); |
---|
| 659 | + //constraints.gridy += 1; |
---|
| 660 | + panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
672 | 661 | oeilCB.addItemListener(this); |
---|
673 | 662 | |
---|
674 | | - constraints.gridy += 1; |
---|
675 | | - panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT), constraints); |
---|
| 663 | + //constraints.gridy += 1; |
---|
| 664 | + panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
676 | 665 | lookAtCB.setToolTipText("Look-at target"); |
---|
677 | 666 | lookAtCB.addItemListener(this); |
---|
678 | 667 | |
---|
.. | .. |
---|
2916 | 2905 | |
---|
2917 | 2906 | child.editWindow = null; // ??????????? |
---|
2918 | 2907 | } |
---|
2919 | | - objEditor.ctrlPanel.revalidate(); |
---|
| 2908 | + objEditor.ctrlPanel.validate(); |
---|
2920 | 2909 | //objEditor.jTree.clearSelection(); |
---|
2921 | 2910 | //objEditor.ResetSliders(); |
---|
2922 | 2911 | refreshContents(true); |
---|