.. | .. |
---|
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 | |
---|
.. | .. |
---|
1518 | 1507 | // |
---|
1519 | 1508 | public void actionPerformed(ActionEvent event) // , Object arg) |
---|
1520 | 1509 | { |
---|
| 1510 | + Object source = event.getSource(); |
---|
1521 | 1511 | /* |
---|
1522 | 1512 | if (event.getSource() == nameField) |
---|
1523 | 1513 | { |
---|
.. | .. |
---|
1529 | 1519 | } |
---|
1530 | 1520 | else |
---|
1531 | 1521 | */ |
---|
1532 | | - if (event.getSource() == lookAtItem || event.getSource() == lookFromItem) |
---|
| 1522 | + if (source == lookAtItem || source == lookFromItem) |
---|
1533 | 1523 | { |
---|
1534 | 1524 | ScreenFit(); |
---|
1535 | 1525 | } else |
---|
1536 | | - if (event.getSource() == switchItem) |
---|
| 1526 | + if (source == switchItem) |
---|
1537 | 1527 | { |
---|
1538 | 1528 | cVector v1 = new cVector(); |
---|
1539 | 1529 | cVector v2 = new cVector(); |
---|
.. | .. |
---|
1542 | 1532 | objEditor.cameraView.renderCamera.setAim(v2, v1); |
---|
1543 | 1533 | objEditor.cameraView.repaint(); |
---|
1544 | 1534 | } else |
---|
1545 | | - if (event.getSource() == rectoidItem) |
---|
| 1535 | + if (source == rectoidItem) |
---|
1546 | 1536 | { |
---|
1547 | 1537 | makeSomething(new Box()); |
---|
1548 | 1538 | } else |
---|
1549 | | - if (event.getSource() == particleItem) |
---|
| 1539 | + if (source == particleItem) |
---|
1550 | 1540 | { |
---|
1551 | 1541 | ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType); |
---|
1552 | 1542 | ParticleController particleController = new ParticleController(particleGeom); |
---|
.. | .. |
---|
1567 | 1557 | applyExample(particleGeom, "SMOKE"); |
---|
1568 | 1558 | makeSomething(particleGeom); |
---|
1569 | 1559 | } else |
---|
1570 | | - if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item) |
---|
| 1560 | + if (source == ragdollItem || source == ragdoll2Item) |
---|
1571 | 1561 | { |
---|
1572 | | - GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem); |
---|
| 1562 | + GenericJoint ragdoll = new GenericJoint(source == ragdollItem); |
---|
1573 | 1563 | |
---|
1574 | 1564 | ragdoll.toParent = LA.newMatrix(); |
---|
1575 | 1565 | ragdoll.fromParent = LA.newMatrix(); |
---|
.. | .. |
---|
1587 | 1577 | } else |
---|
1588 | 1578 | /* |
---|
1589 | 1579 | */ |
---|
1590 | | - if (event.getSource() == heightFieldItem) |
---|
| 1580 | + if (source == heightFieldItem) |
---|
1591 | 1581 | { |
---|
1592 | 1582 | Object3D obj = new Object3D(); |
---|
1593 | 1583 | |
---|
.. | .. |
---|
1625 | 1615 | |
---|
1626 | 1616 | makeSomething(obj); |
---|
1627 | 1617 | } else |
---|
1628 | | - if (event.getSource() == gridItem) |
---|
| 1618 | + if (source == gridItem) |
---|
1629 | 1619 | { |
---|
1630 | 1620 | makeSomething(new Grid()); |
---|
1631 | 1621 | } else |
---|
1632 | | - if (event.getSource() == ellipsoidItem) |
---|
| 1622 | + if (source == ellipsoidItem) |
---|
1633 | 1623 | { |
---|
1634 | 1624 | makeSomething(new Sphere()); |
---|
1635 | 1625 | } else |
---|
1636 | | - if (event.getSource() == coneItem) |
---|
| 1626 | + if (source == coneItem) |
---|
1637 | 1627 | { |
---|
1638 | 1628 | makeSomething(new Cone()); |
---|
1639 | 1629 | } else |
---|
1640 | | - if (event.getSource() == torusItem) |
---|
| 1630 | + if (source == torusItem) |
---|
1641 | 1631 | { |
---|
1642 | 1632 | makeSomething(new Torus()); |
---|
1643 | 1633 | } else |
---|
1644 | | - if (event.getSource() == superItem) |
---|
| 1634 | + if (source == superItem) |
---|
1645 | 1635 | { |
---|
1646 | 1636 | makeSomething(new Superellipsoid()); |
---|
1647 | 1637 | } else |
---|
1648 | | - if (event.getSource() == kleinItem) |
---|
| 1638 | + if (source == kleinItem) |
---|
1649 | 1639 | { |
---|
1650 | 1640 | makeSomething(new Klein()); |
---|
1651 | 1641 | } else |
---|
1652 | | - if (event.getSource() == blobItem) |
---|
| 1642 | + if (source == blobItem) |
---|
1653 | 1643 | { |
---|
1654 | 1644 | Blob blob = new Blob(); |
---|
1655 | 1645 | BlobComponent comp = new BlobComponent(); |
---|
.. | .. |
---|
1657 | 1647 | //blob.retile(); |
---|
1658 | 1648 | makeSomething(blob); |
---|
1659 | 1649 | } else |
---|
1660 | | - if (event.getSource() == latheItem) |
---|
| 1650 | + if (source == latheItem) |
---|
1661 | 1651 | { |
---|
1662 | 1652 | makeSomething(new Lathe()); |
---|
1663 | 1653 | } else |
---|
1664 | | - if (event.getSource() == bezierItem) |
---|
| 1654 | + if (source == bezierItem) |
---|
1665 | 1655 | { |
---|
1666 | 1656 | makeSomething(new BezierSurface()); |
---|
1667 | 1657 | } else |
---|
1668 | | - if (event.getSource() == checkerItem) |
---|
| 1658 | + if (source == checkerItem) |
---|
1669 | 1659 | { |
---|
1670 | 1660 | /* |
---|
1671 | 1661 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1680 | 1670 | */ |
---|
1681 | 1671 | makeSomething(new Checker()); |
---|
1682 | 1672 | } else |
---|
1683 | | - if (event.getSource() == meshItem) |
---|
| 1673 | + if (source == meshItem) |
---|
1684 | 1674 | { |
---|
1685 | 1675 | Object3D itemtomake = new Object3D(); |
---|
1686 | 1676 | Object3D child; |
---|
.. | .. |
---|
1701 | 1691 | makeSomething(child); |
---|
1702 | 1692 | } |
---|
1703 | 1693 | } else |
---|
1704 | | - if (event.getSource() == springItem) |
---|
| 1694 | + if (source == springItem) |
---|
1705 | 1695 | { |
---|
1706 | 1696 | cSpring s = new cSpring(); |
---|
1707 | 1697 | s.setup(); |
---|
1708 | 1698 | makeSomething(s); |
---|
1709 | 1699 | } else |
---|
1710 | | - if (event.getSource() == flagItem) |
---|
| 1700 | + if (source == flagItem) |
---|
1711 | 1701 | { |
---|
1712 | 1702 | cSpring s = new cFlag(); |
---|
1713 | 1703 | s.setup(); |
---|
1714 | 1704 | makeSomething(s); |
---|
1715 | 1705 | } else |
---|
1716 | | - if (event.getSource() == lightItem) |
---|
| 1706 | + if (source == lightItem) |
---|
1717 | 1707 | { |
---|
1718 | 1708 | makeSomething(new Light()); |
---|
1719 | 1709 | } else |
---|
1720 | | - if (event.getSource() == csgItem) |
---|
| 1710 | + if (source == csgItem) |
---|
1721 | 1711 | { |
---|
1722 | 1712 | group(new CSG()); |
---|
1723 | 1713 | } else |
---|
1724 | | - if (event.getSource() == templateItem) |
---|
| 1714 | + if (source == templateItem) |
---|
1725 | 1715 | { |
---|
1726 | 1716 | group(new cTemplate()); |
---|
1727 | 1717 | } else |
---|
1728 | | - if (event.getSource() == attributeItem) |
---|
| 1718 | + if (source == attributeItem) |
---|
1729 | 1719 | { |
---|
1730 | 1720 | makeSomething(new Attribute()); |
---|
1731 | 1721 | } else |
---|
1732 | | - if (event.getSource() == pointflowItem) |
---|
| 1722 | + if (source == pointflowItem) |
---|
1733 | 1723 | { |
---|
1734 | 1724 | makeSomething(new PointFlow()); |
---|
1735 | 1725 | } else |
---|
.. | .. |
---|
1741 | 1731 | } else |
---|
1742 | 1732 | */ |
---|
1743 | 1733 | |
---|
1744 | | - if (event.getSource() == superLoopItem) |
---|
| 1734 | + if (source == superLoopItem) |
---|
1745 | 1735 | { |
---|
1746 | 1736 | Composite g = new cGroup(); |
---|
1747 | 1737 | for (int i=0; i<15; i++) |
---|
.. | .. |
---|
1763 | 1753 | |
---|
1764 | 1754 | group(g); |
---|
1765 | 1755 | } else |
---|
1766 | | - if (event.getSource() == loopItem) |
---|
| 1756 | + if (source == loopItem) |
---|
1767 | 1757 | { |
---|
1768 | 1758 | Composite csg = new GroupLeaf(); |
---|
1769 | 1759 | csg.count = 5; |
---|
.. | .. |
---|
1772 | 1762 | csg.addChild(child); |
---|
1773 | 1763 | child.addChild(csg); |
---|
1774 | 1764 | } else |
---|
1775 | | - if (event.getSource() == doubleItem) |
---|
| 1765 | + if (source == doubleItem) |
---|
1776 | 1766 | { |
---|
1777 | 1767 | Composite csg = new GroupLeaf(); |
---|
1778 | 1768 | csg.count = 5; |
---|
.. | .. |
---|
1784 | 1774 | csg.addChild(child); |
---|
1785 | 1775 | child.addChild(csg); |
---|
1786 | 1776 | } else |
---|
1787 | | - if (event.getSource() == tripleItem) |
---|
| 1777 | + if (source == tripleItem) |
---|
1788 | 1778 | { |
---|
1789 | 1779 | Composite csg = new GroupLeaf(); |
---|
1790 | 1780 | csg.count = 4; |
---|
.. | .. |
---|
1800 | 1790 | child.addChild(csg); |
---|
1801 | 1791 | } else |
---|
1802 | 1792 | |
---|
1803 | | - if (event.getSource() == importGFDItem) |
---|
| 1793 | + if (source == importGFDItem) |
---|
1804 | 1794 | { |
---|
1805 | 1795 | ImportGFD(); |
---|
1806 | 1796 | } else |
---|
1807 | | - if (event.getSource() == importVRMLX3DItem) |
---|
| 1797 | + if (source == importVRMLX3DItem) |
---|
1808 | 1798 | { |
---|
1809 | 1799 | ImportVRMLX3D(); |
---|
1810 | 1800 | } else |
---|
1811 | | - if (event.getSource() == import3DSItem) |
---|
| 1801 | + if (source == import3DSItem) |
---|
1812 | 1802 | { |
---|
1813 | 1803 | objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS"); |
---|
1814 | 1804 | } else |
---|
1815 | | - if (event.getSource() == importOBJItem) |
---|
| 1805 | + if (source == importOBJItem) |
---|
1816 | 1806 | { |
---|
1817 | 1807 | objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
1818 | 1808 | } else |
---|
1819 | | - if (event.getSource() == computeAOItem) |
---|
| 1809 | + if (source == computeAOItem) |
---|
1820 | 1810 | { |
---|
1821 | 1811 | Globals.drawMode = CameraPane.OCCLUSION; |
---|
1822 | 1812 | Globals.theRenderer.repaint(); |
---|
1823 | 1813 | } else |
---|
1824 | | - if (event.getSource() == recompileItem) |
---|
| 1814 | + if (source == recompileItem) |
---|
1825 | 1815 | { |
---|
1826 | 1816 | Recompile(); |
---|
1827 | 1817 | refreshContents(); |
---|
1828 | 1818 | } else |
---|
1829 | | - if (event.getSource() == editScriptItem) |
---|
| 1819 | + if (source == editScriptItem) |
---|
1830 | 1820 | { |
---|
1831 | 1821 | OpenDialog(); |
---|
1832 | 1822 | refreshContents(); |
---|
1833 | 1823 | } else |
---|
1834 | | - if (event.getSource() == invariantsItem) |
---|
| 1824 | + if (source == invariantsItem) |
---|
1835 | 1825 | { |
---|
1836 | 1826 | System.out.println("Invariants:"); |
---|
1837 | 1827 | GrafreeD.grafreeD.universe.invariants(); |
---|
1838 | 1828 | } else |
---|
1839 | | - if (event.getSource() == memoryItem) |
---|
| 1829 | + if (source == memoryItem) |
---|
1840 | 1830 | { |
---|
1841 | 1831 | //System.out.println("Invariants:"); |
---|
1842 | 1832 | PrintMemory(); |
---|
1843 | 1833 | } else |
---|
1844 | | - if (event.getSource() == pathItem) |
---|
| 1834 | + if (source == pathItem) |
---|
1845 | 1835 | { |
---|
1846 | 1836 | PrintPath(); |
---|
1847 | 1837 | } else |
---|
1848 | | - if (event.getSource() == analyzeItem) |
---|
| 1838 | + if (source == analyzeItem) |
---|
1849 | 1839 | { |
---|
1850 | 1840 | AnalyzeObject(); |
---|
1851 | 1841 | } else |
---|
1852 | | - if (event.getSource() == dumpItem) |
---|
| 1842 | + if (source == dumpItem) |
---|
1853 | 1843 | { |
---|
1854 | 1844 | DumpObject(); |
---|
1855 | 1845 | } else |
---|
1856 | | - if (event.getSource() == screenfitButton) |
---|
| 1846 | + if (source == screenfitButton) |
---|
1857 | 1847 | { |
---|
1858 | 1848 | //Reload(lastConverter, lastFilename, true); |
---|
1859 | 1849 | ScreenFit(); |
---|
1860 | 1850 | } else |
---|
1861 | | - if (event.getSource() == screenfitpointButton) |
---|
| 1851 | + if (source == screenfitpointButton) |
---|
1862 | 1852 | { |
---|
1863 | 1853 | //Reload(lastConverter, lastFilename, true); |
---|
1864 | 1854 | ScreenFitPoint(); |
---|
1865 | 1855 | } else |
---|
1866 | | - if (event.getSource() == snapobjectButton) |
---|
| 1856 | + if (source == snapobjectButton) |
---|
1867 | 1857 | { |
---|
1868 | 1858 | //Reload(lastConverter, lastFilename, true); |
---|
1869 | 1859 | SnapObject(); |
---|
.. | .. |
---|
1874 | 1864 | // Recompile(); |
---|
1875 | 1865 | // refreshContents(); |
---|
1876 | 1866 | // } else |
---|
1877 | | - if (event.getSource() == gcButton) |
---|
| 1867 | + if (source == gcButton) |
---|
1878 | 1868 | { |
---|
1879 | 1869 | System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory()); |
---|
1880 | 1870 | System.gc(); |
---|
1881 | 1871 | System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory()); |
---|
1882 | 1872 | } else |
---|
1883 | | - if (event.getSource() == editLeafItem) |
---|
| 1873 | + if (source == editLeafItem) |
---|
1884 | 1874 | { |
---|
1885 | 1875 | Object3D obj; |
---|
1886 | 1876 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
1894 | 1884 | } |
---|
1895 | 1885 | refreshContents(true); |
---|
1896 | 1886 | } else |
---|
1897 | | - if (event.getSource() == openWindowItem) |
---|
| 1887 | + if (source == openWindowItem) |
---|
1898 | 1888 | { |
---|
1899 | 1889 | EditSelection(true); |
---|
1900 | 1890 | } else |
---|
1901 | | - if (event.getSource() == cutItem || event.getSource() == clearButton) |
---|
| 1891 | + if (source == cutItem || source == clearButton) |
---|
1902 | 1892 | { |
---|
1903 | 1893 | loadClipboard(true); |
---|
1904 | 1894 | } else |
---|
1905 | | - if (event.getSource() == duplicateItem) |
---|
| 1895 | + if (source == duplicateItem) |
---|
1906 | 1896 | { |
---|
1907 | 1897 | Object3D keep = GrafreeD.clipboard; |
---|
1908 | 1898 | loadClipboard(false); |
---|
1909 | 1899 | paste(false); |
---|
1910 | 1900 | GrafreeD.clipboard = keep; |
---|
1911 | 1901 | } else |
---|
1912 | | - if (event.getSource() == cloneItem) |
---|
| 1902 | + if (source == cloneItem) |
---|
1913 | 1903 | { |
---|
1914 | 1904 | CloneSelection(false); |
---|
1915 | 1905 | } else |
---|
1916 | | - if (event.getSource() == cloneSupportItem) |
---|
| 1906 | + if (source == cloneSupportItem) |
---|
1917 | 1907 | { |
---|
1918 | 1908 | CloneSelection(true); |
---|
1919 | 1909 | } else |
---|
1920 | | - if (event.getSource() == copyItem) |
---|
| 1910 | + if (source == copyItem) |
---|
1921 | 1911 | { |
---|
1922 | 1912 | loadClipboard(false); |
---|
1923 | 1913 | } else |
---|
1924 | | - if (event.getSource() == pasteItem) |
---|
| 1914 | + if (source == pasteItem) |
---|
1925 | 1915 | { |
---|
1926 | 1916 | paste(false); |
---|
1927 | 1917 | } else |
---|
1928 | | - if (event.getSource() == pasteLinkItem) |
---|
| 1918 | + if (source == pasteLinkItem) |
---|
1929 | 1919 | { |
---|
1930 | 1920 | pasteInto(false); |
---|
1931 | 1921 | } else |
---|
1932 | | - if (event.getSource() == pasteCloneItem) |
---|
| 1922 | + if (source == pasteCloneItem) |
---|
1933 | 1923 | { |
---|
1934 | 1924 | pasteInto(true); |
---|
1935 | 1925 | } else |
---|
1936 | | - if (event.getSource() == pasteExpandItem) |
---|
| 1926 | + if (source == pasteExpandItem) |
---|
1937 | 1927 | { |
---|
1938 | 1928 | paste(true); |
---|
1939 | 1929 | } else |
---|
1940 | | - if (event.getSource() == synchronizeItem) |
---|
| 1930 | + if (source == synchronizeItem) |
---|
1941 | 1931 | { |
---|
1942 | 1932 | Overwrite(Object3D.TRANSFORM); |
---|
1943 | 1933 | } else |
---|
1944 | | - if (event.getSource() == overwriteNameItem) |
---|
| 1934 | + if (source == overwriteNameItem) |
---|
1945 | 1935 | { |
---|
1946 | 1936 | Overwrite(Object3D.NAME); |
---|
1947 | 1937 | } else |
---|
1948 | | - if (event.getSource() == overwriteUVItem) |
---|
| 1938 | + if (source == overwriteUVItem) |
---|
1949 | 1939 | { |
---|
1950 | 1940 | Overwrite(Object3D.UV); |
---|
1951 | 1941 | } else |
---|
1952 | | - if (event.getSource() == overwriteMatItem) |
---|
| 1942 | + if (source == overwriteMatItem) |
---|
1953 | 1943 | { |
---|
1954 | 1944 | /* july 2015 |
---|
1955 | 1945 | if ((dropAttributes & Object3D.TEXTURE) == 0) |
---|
.. | .. |
---|
1969 | 1959 | |
---|
1970 | 1960 | Overwrite(dropAttributes); |
---|
1971 | 1961 | } |
---|
1972 | | - if (event.getSource() == overwriteGeoItem) |
---|
| 1962 | + if (source == overwriteGeoItem) |
---|
1973 | 1963 | { |
---|
1974 | 1964 | Overwrite(Object3D.GEOMETRY); |
---|
1975 | 1965 | // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
.. | .. |
---|
1986 | 1976 | // refreshContents(); |
---|
1987 | 1977 | // } |
---|
1988 | 1978 | } else |
---|
1989 | | - if (event.getSource() == generateMeshItem) |
---|
| 1979 | + if (source == generateMeshItem) |
---|
1990 | 1980 | { |
---|
1991 | 1981 | //if (group.selection.size() == 1) |
---|
1992 | 1982 | // for (int i=0; i<group.selection.size(); i++) |
---|
.. | .. |
---|
1997 | 1987 | ResetModel(); |
---|
1998 | 1988 | refreshContents(); |
---|
1999 | 1989 | } else |
---|
2000 | | - if (event.getSource() == extractGeometriesItem) |
---|
| 1990 | + if (source == extractGeometriesItem) |
---|
2001 | 1991 | { |
---|
2002 | 1992 | boolean one = false; |
---|
2003 | 1993 | |
---|
.. | .. |
---|
2024 | 2014 | ResetModel(); |
---|
2025 | 2015 | refreshContents(); |
---|
2026 | 2016 | } else |
---|
2027 | | - if (event.getSource() == cloneGeometriesItem) |
---|
| 2017 | + if (source == cloneGeometriesItem) |
---|
2028 | 2018 | { |
---|
2029 | 2019 | boolean one = false; |
---|
2030 | 2020 | |
---|
.. | .. |
---|
2050 | 2040 | ResetModel(); |
---|
2051 | 2041 | refreshContents(); |
---|
2052 | 2042 | } else |
---|
2053 | | - if (event.getSource() == shareGeometriesItem) |
---|
| 2043 | + if (source == shareGeometriesItem) |
---|
2054 | 2044 | { |
---|
2055 | 2045 | boolean one = false; |
---|
2056 | 2046 | |
---|
.. | .. |
---|
2080 | 2070 | refreshContents(); |
---|
2081 | 2071 | } |
---|
2082 | 2072 | } else |
---|
2083 | | - if (event.getSource() == mergeGeometriesItem) |
---|
| 2073 | + if (source == mergeGeometriesItem) |
---|
2084 | 2074 | { |
---|
2085 | 2075 | boolean one = false; |
---|
2086 | 2076 | |
---|
.. | .. |
---|
2110 | 2100 | ResetModel(); |
---|
2111 | 2101 | refreshContents(); |
---|
2112 | 2102 | } else |
---|
2113 | | - if (event.getSource() == linkverticesItem) |
---|
| 2103 | + if (source == linkverticesItem) |
---|
2114 | 2104 | { |
---|
2115 | 2105 | // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
2116 | 2106 | // { |
---|
.. | .. |
---|
2143 | 2133 | refreshContents(); |
---|
2144 | 2134 | } |
---|
2145 | 2135 | } else |
---|
2146 | | - if (event.getSource() == resetsupportItem) |
---|
| 2136 | + if (source == resetsupportItem) |
---|
2147 | 2137 | { |
---|
2148 | 2138 | for (int i=0; i<group.selection.size(); i++) |
---|
2149 | 2139 | { |
---|
.. | .. |
---|
2155 | 2145 | |
---|
2156 | 2146 | refreshContents(); |
---|
2157 | 2147 | } else |
---|
2158 | | - if (event.getSource() == relinkverticesItem) |
---|
| 2148 | + if (source == relinkverticesItem) |
---|
2159 | 2149 | { |
---|
2160 | 2150 | boolean random = CameraPane.RANDOM; |
---|
2161 | 2151 | CameraPane.RANDOM = false; // parse all random nodes |
---|
.. | .. |
---|
2164 | 2154 | |
---|
2165 | 2155 | refreshContents(); |
---|
2166 | 2156 | } else |
---|
2167 | | - if (event.getSource() == resetreferencesItem) |
---|
| 2157 | + if (source == resetreferencesItem) |
---|
2168 | 2158 | { |
---|
2169 | 2159 | for (int i=0; i<group.selection.size(); i++) |
---|
2170 | 2160 | { |
---|
.. | .. |
---|
2173 | 2163 | |
---|
2174 | 2164 | refreshContents(); |
---|
2175 | 2165 | } else |
---|
2176 | | - if (event.getSource() == setMasterItem) |
---|
| 2166 | + if (source == setMasterItem) |
---|
2177 | 2167 | { |
---|
2178 | 2168 | if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
2179 | 2169 | { |
---|
.. | .. |
---|
2186 | 2176 | refreshContents(); |
---|
2187 | 2177 | } |
---|
2188 | 2178 | } else |
---|
2189 | | - if (event.getSource() == poseMeshItem) |
---|
| 2179 | + if (source == poseMeshItem) |
---|
2190 | 2180 | { |
---|
2191 | 2181 | if (group.selection.size() == 1) |
---|
2192 | 2182 | { |
---|
.. | .. |
---|
2205 | 2195 | } |
---|
2206 | 2196 | |
---|
2207 | 2197 | } else |
---|
2208 | | - if (event.getSource() == revertMeshItem) |
---|
| 2198 | + if (source == revertMeshItem) |
---|
2209 | 2199 | { |
---|
2210 | 2200 | RevertMeshes(); |
---|
2211 | 2201 | } else |
---|
2212 | | - if (event.getSource() == resetMeshItem) |
---|
| 2202 | + if (source == resetMeshItem) |
---|
2213 | 2203 | { |
---|
2214 | 2204 | ResetAll(); |
---|
2215 | 2205 | } else |
---|
2216 | | - if (event.getSource() == stepAllItem) |
---|
| 2206 | + if (source == stepAllItem) |
---|
2217 | 2207 | { |
---|
2218 | 2208 | StepAll(); |
---|
2219 | 2209 | } else |
---|
2220 | | - if (event.getSource() == clearItem) // || event.getSource() == clearButton) |
---|
| 2210 | + if (source == clearItem) // || event.getSource() == clearButton) |
---|
2221 | 2211 | { |
---|
2222 | 2212 | //int indices[] = jList.getSelectedIndices(); |
---|
2223 | 2213 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
.. | .. |
---|
2225 | 2215 | |
---|
2226 | 2216 | ClearSelection(false); |
---|
2227 | 2217 | } else |
---|
2228 | | - if (event.getSource() == clearAllItem) |
---|
| 2218 | + if (source == clearAllItem) |
---|
2229 | 2219 | { |
---|
2230 | 2220 | ClearSelection(true); |
---|
2231 | 2221 | } else |
---|
2232 | | - if (event.getSource() == grabItem) |
---|
| 2222 | + if (source == grabItem) |
---|
2233 | 2223 | { |
---|
2234 | 2224 | group(new cGroup(), true); |
---|
2235 | 2225 | } else |
---|
2236 | | - if (event.getSource() == hideItem) |
---|
| 2226 | + if (source == hideItem) |
---|
2237 | 2227 | { |
---|
2238 | 2228 | group(new HiddenObject()); |
---|
2239 | 2229 | } else |
---|
2240 | | - if (event.getSource() == frontItem) |
---|
| 2230 | + if (source == frontItem) |
---|
2241 | 2231 | { |
---|
2242 | 2232 | front(); |
---|
2243 | 2233 | } else |
---|
2244 | | - if (event.getSource() == backItem) |
---|
| 2234 | + if (source == backItem) |
---|
2245 | 2235 | { |
---|
2246 | 2236 | back(); |
---|
2247 | 2237 | } else |
---|
2248 | | - if (event.getSource() == cameraItem) |
---|
| 2238 | + if (source == cameraItem) |
---|
2249 | 2239 | { |
---|
2250 | 2240 | makeSomething(new Camera()); |
---|
2251 | 2241 | } else |
---|
2252 | | - if (event.getSource() == compositeItem) |
---|
| 2242 | + if (source == compositeItem) |
---|
2253 | 2243 | { |
---|
2254 | 2244 | group(new Composite()); |
---|
2255 | 2245 | } else |
---|
2256 | | - if (event.getSource() == randomItem) |
---|
| 2246 | + if (source == randomItem) |
---|
2257 | 2247 | { |
---|
2258 | 2248 | RandomNode random = new RandomNode(); |
---|
2259 | 2249 | group(random); |
---|
2260 | 2250 | if (random.size() > 0) |
---|
2261 | 2251 | random.name = random.get(0).name + "Rnd"; |
---|
2262 | 2252 | } else |
---|
2263 | | - if (event.getSource() == physicsItem) |
---|
| 2253 | + if (source == physicsItem) |
---|
2264 | 2254 | { |
---|
2265 | 2255 | group(new PhysicsNode()); |
---|
2266 | 2256 | } else |
---|
2267 | | - if (event.getSource() == frameselectorItem) |
---|
| 2257 | + if (source == frameselectorItem) |
---|
2268 | 2258 | { |
---|
2269 | 2259 | for (int i=0; i<group.selection.size(); i++) |
---|
2270 | 2260 | { |
---|
.. | .. |
---|
2276 | 2266 | ResetModel(); |
---|
2277 | 2267 | refreshContents(); |
---|
2278 | 2268 | } else |
---|
2279 | | - if (event.getSource() == switchGeoItem) |
---|
| 2269 | + if (source == switchGeoItem) |
---|
2280 | 2270 | { |
---|
2281 | 2271 | for (int i=0; i<group.selection.size(); i++) |
---|
2282 | 2272 | { |
---|
.. | .. |
---|
2288 | 2278 | ResetModel(); |
---|
2289 | 2279 | refreshContents(); |
---|
2290 | 2280 | } else |
---|
2291 | | - if (event.getSource() == switchTransfoItem) |
---|
| 2281 | + if (source == switchTransfoItem) |
---|
2292 | 2282 | { |
---|
2293 | 2283 | for (int i=0; i<group.selection.size(); i++) |
---|
2294 | 2284 | { |
---|
.. | .. |
---|
2300 | 2290 | ResetModel(); |
---|
2301 | 2291 | refreshContents(); |
---|
2302 | 2292 | } else |
---|
2303 | | - if (event.getSource() == morphItem) |
---|
| 2293 | + if (source == morphItem) |
---|
2304 | 2294 | { |
---|
2305 | 2295 | for (int i=0; i<group.selection.size(); i++) |
---|
2306 | 2296 | { |
---|
.. | .. |
---|
2312 | 2302 | ResetModel(); |
---|
2313 | 2303 | refreshContents(); |
---|
2314 | 2304 | } else |
---|
2315 | | - if (event.getSource() == scriptNodeItem) |
---|
| 2305 | + if (source == scriptNodeItem) |
---|
2316 | 2306 | { |
---|
2317 | 2307 | boolean atleastone = false; |
---|
2318 | 2308 | |
---|
.. | .. |
---|
2351 | 2341 | } |
---|
2352 | 2342 | } |
---|
2353 | 2343 | } else |
---|
2354 | | - if (event.getSource() == linkerItem) |
---|
| 2344 | + if (source == linkerItem) |
---|
2355 | 2345 | { |
---|
2356 | 2346 | group(new cLinker()); |
---|
2357 | 2347 | } else |
---|
2358 | | - if (event.getSource() == textureItem) |
---|
| 2348 | + if (source == textureItem) |
---|
2359 | 2349 | { |
---|
2360 | 2350 | group(new TextureNode()); |
---|
2361 | 2351 | } else |
---|
2362 | | - if (event.getSource() == billboardItem) |
---|
| 2352 | + if (source == billboardItem) |
---|
2363 | 2353 | { |
---|
2364 | 2354 | group(new BillboardNode()); |
---|
2365 | 2355 | } else |
---|
2366 | | - if (event.getSource() == shadowXItem) |
---|
| 2356 | + if (source == shadowXItem) |
---|
2367 | 2357 | { |
---|
2368 | 2358 | CastShadow(0); |
---|
2369 | 2359 | } else |
---|
2370 | | - if (event.getSource() == shadowYItem) |
---|
| 2360 | + if (source == shadowYItem) |
---|
2371 | 2361 | { |
---|
2372 | 2362 | CastShadow(1); |
---|
2373 | 2363 | } else |
---|
2374 | | - if (event.getSource() == shadowZItem) |
---|
| 2364 | + if (source == shadowZItem) |
---|
2375 | 2365 | { |
---|
2376 | 2366 | CastShadow(2); |
---|
2377 | 2367 | } else |
---|
2378 | | - if (event.getSource() == ungroupItem) |
---|
| 2368 | + if (source == ungroupItem) |
---|
2379 | 2369 | { |
---|
2380 | 2370 | //ungroup(); |
---|
2381 | 2371 | for (int i=0; i<group.selection.size(); i++) |
---|
.. | .. |
---|
2387 | 2377 | |
---|
2388 | 2378 | refreshContents(); |
---|
2389 | 2379 | } else |
---|
2390 | | - if (event.getSource() == genUVItem) |
---|
| 2380 | + if (source == genUVItem) |
---|
2391 | 2381 | { |
---|
2392 | 2382 | GenUV(); |
---|
2393 | 2383 | } else |
---|
2394 | | - if (event.getSource() == genNormalsCADItem) |
---|
| 2384 | + if (source == genNormalsCADItem) |
---|
2395 | 2385 | { |
---|
2396 | 2386 | GenNormals(true); |
---|
2397 | 2387 | } else |
---|
2398 | | - if (event.getSource() == genNormalsMESHItem) |
---|
| 2388 | + if (source == genNormalsMESHItem) |
---|
2399 | 2389 | { |
---|
2400 | 2390 | GenNormals(true); // TODO |
---|
2401 | 2391 | } else |
---|
2402 | | - if (event.getSource() == genNormalsORGANItem) |
---|
| 2392 | + if (source == genNormalsORGANItem) |
---|
2403 | 2393 | { |
---|
2404 | 2394 | GenNormals(false); |
---|
2405 | 2395 | } else |
---|
2406 | | - if (event.getSource() == genNormalsMINEItem) |
---|
| 2396 | + if (source == genNormalsMINEItem) |
---|
2407 | 2397 | { |
---|
2408 | 2398 | GenNormalsMINE(); |
---|
2409 | 2399 | } else |
---|
2410 | | - if (event.getSource() == stripifyItem) |
---|
| 2400 | + if (source == stripifyItem) |
---|
2411 | 2401 | { |
---|
2412 | 2402 | Stripify(); |
---|
2413 | 2403 | } else |
---|
2414 | | - if (event.getSource() == unstripifyItem) |
---|
| 2404 | + if (source == unstripifyItem) |
---|
2415 | 2405 | { |
---|
2416 | 2406 | Unstripify(); |
---|
2417 | 2407 | } else |
---|
2418 | | - if (event.getSource() == trimItem) |
---|
| 2408 | + if (source == trimItem) |
---|
2419 | 2409 | { |
---|
2420 | 2410 | Trim(); |
---|
2421 | 2411 | } else |
---|
2422 | | - if (event.getSource() == untrimItem) |
---|
| 2412 | + if (source == untrimItem) |
---|
2423 | 2413 | { |
---|
2424 | 2414 | Untrim(); |
---|
2425 | 2415 | } else |
---|
2426 | | - if (event.getSource() == clearColorsItem) |
---|
| 2416 | + if (source == clearColorsItem) |
---|
2427 | 2417 | { |
---|
2428 | 2418 | ClearColors(); |
---|
2429 | 2419 | } else |
---|
2430 | | - if (event.getSource() == clearMaterialsItem) |
---|
| 2420 | + if (source == clearMaterialsItem) |
---|
2431 | 2421 | { |
---|
2432 | 2422 | ClearMaterials(); |
---|
2433 | 2423 | } else |
---|
2434 | | - if (event.getSource() == liveleavesItem) |
---|
| 2424 | + if (source == liveleavesItem) |
---|
2435 | 2425 | { |
---|
2436 | 2426 | LiveLeaves(true); |
---|
2437 | 2427 | } else |
---|
2438 | | - if (event.getSource() == unliveleavesItem) |
---|
| 2428 | + if (source == unliveleavesItem) |
---|
2439 | 2429 | { |
---|
2440 | 2430 | LiveLeaves(false); |
---|
2441 | 2431 | } else |
---|
2442 | | - if (event.getSource() == supportleavesItem) |
---|
| 2432 | + if (source == supportleavesItem) |
---|
2443 | 2433 | { |
---|
2444 | 2434 | SupportLeaves(true); |
---|
2445 | 2435 | } else |
---|
2446 | | - if (event.getSource() == unsupportleavesItem) |
---|
| 2436 | + if (source == unsupportleavesItem) |
---|
2447 | 2437 | { |
---|
2448 | 2438 | SupportLeaves(false); |
---|
2449 | 2439 | } else |
---|
2450 | | - if (event.getSource() == hideleavesItem) |
---|
| 2440 | + if (source == hideleavesItem) |
---|
2451 | 2441 | { |
---|
2452 | 2442 | HideLeaves(true); |
---|
2453 | 2443 | } else |
---|
2454 | | - if (event.getSource() == showleavesItem) |
---|
| 2444 | + if (source == showleavesItem) |
---|
2455 | 2445 | { |
---|
2456 | 2446 | HideLeaves(false); |
---|
2457 | 2447 | } else |
---|
2458 | | - if (event.getSource() == markleavesItem) |
---|
| 2448 | + if (source == markleavesItem) |
---|
2459 | 2449 | { |
---|
2460 | 2450 | MarkLeaves(true); |
---|
2461 | 2451 | } else |
---|
2462 | | - if (event.getSource() == unmarkleavesItem) |
---|
| 2452 | + if (source == unmarkleavesItem) |
---|
2463 | 2453 | { |
---|
2464 | 2454 | MarkLeaves(false); |
---|
2465 | 2455 | } else |
---|
2466 | | - if (event.getSource() == flipVItem) |
---|
| 2456 | + if (source == flipVItem) |
---|
2467 | 2457 | { |
---|
2468 | 2458 | FlipV(true); |
---|
2469 | 2459 | } else |
---|
2470 | | - if (event.getSource() == unflipVItem) |
---|
| 2460 | + if (source == unflipVItem) |
---|
2471 | 2461 | { |
---|
2472 | 2462 | FlipV(false); |
---|
2473 | 2463 | } else |
---|
2474 | | - if (event.getSource() == lowTexturesItem) |
---|
| 2464 | + if (source == lowTexturesItem) |
---|
2475 | 2465 | { |
---|
2476 | 2466 | SetTexRes(0); |
---|
2477 | 2467 | } else |
---|
2478 | | - if (event.getSource() == normalTexturesItem) |
---|
| 2468 | + if (source == normalTexturesItem) |
---|
2479 | 2469 | { |
---|
2480 | 2470 | SetTexRes(1); |
---|
2481 | 2471 | } else |
---|
2482 | | - if (event.getSource() == highTexturesItem) |
---|
| 2472 | + if (source == highTexturesItem) |
---|
2483 | 2473 | { |
---|
2484 | 2474 | SetTexRes(2); |
---|
2485 | 2475 | } else |
---|
2486 | | - if (event.getSource() == veryhighTexturesItem) |
---|
| 2476 | + if (source == veryhighTexturesItem) |
---|
2487 | 2477 | { |
---|
2488 | 2478 | SetTexRes(3); |
---|
2489 | 2479 | } else |
---|
2490 | | - if (event.getSource() == maxTexturesItem) |
---|
| 2480 | + if (source == maxTexturesItem) |
---|
2491 | 2481 | { |
---|
2492 | 2482 | SetTexRes(4); |
---|
2493 | 2483 | } else |
---|
2494 | | - if (event.getSource() == panoTexturesItem) |
---|
| 2484 | + if (source == panoTexturesItem) |
---|
2495 | 2485 | { |
---|
2496 | 2486 | SetTexRes(5); |
---|
2497 | 2487 | } else |
---|
2498 | | - if (event.getSource() == reverseNormalsItem) |
---|
| 2488 | + if (source == reverseNormalsItem) |
---|
2499 | 2489 | { |
---|
2500 | 2490 | ReverseNormals(); |
---|
2501 | 2491 | } else |
---|
2502 | | - if (event.getSource() == parseverticesItem) |
---|
| 2492 | + if (source == parseverticesItem) |
---|
2503 | 2493 | { |
---|
2504 | 2494 | ParseVertices(); |
---|
2505 | 2495 | } else |
---|
2506 | | - if (event.getSource() == textureFieldItem) |
---|
| 2496 | + if (source == textureFieldItem) |
---|
2507 | 2497 | { |
---|
2508 | 2498 | TextureVertices(); |
---|
2509 | 2499 | } else |
---|
2510 | | - if (event.getSource() == alignItem) |
---|
| 2500 | + if (source == alignItem) |
---|
2511 | 2501 | { |
---|
2512 | 2502 | Align(); |
---|
2513 | 2503 | } else |
---|
2514 | | - if (event.getSource() == mirrorItem) |
---|
| 2504 | + if (source == mirrorItem) |
---|
2515 | 2505 | { |
---|
2516 | 2506 | MirrorPoses(); |
---|
2517 | 2507 | } else |
---|
2518 | | - if (event.getSource() == reduceMorphItem) |
---|
| 2508 | + if (source == reduceMorphItem) |
---|
2519 | 2509 | { |
---|
2520 | 2510 | MeshReduction(false); |
---|
2521 | 2511 | } else |
---|
2522 | | - if (event.getSource() == reduce34MorphItem) |
---|
| 2512 | + if (source == reduce34MorphItem) |
---|
2523 | 2513 | { |
---|
2524 | 2514 | MeshReduction(true); |
---|
2525 | 2515 | } else |
---|
2526 | | - if (event.getSource() == reverseTrianglesItem) |
---|
| 2516 | + if (source == reverseTrianglesItem) |
---|
2527 | 2517 | { |
---|
2528 | 2518 | ReverseTriangles(); |
---|
2529 | 2519 | } else |
---|
2530 | | - if (event.getSource() == reduceMeshItem) |
---|
| 2520 | + if (source == reduceMeshItem) |
---|
2531 | 2521 | { |
---|
2532 | 2522 | ReduceMesh(false); |
---|
2533 | 2523 | } else |
---|
2534 | | - if (event.getSource() == reduce34MeshItem) |
---|
| 2524 | + if (source == reduce34MeshItem) |
---|
2535 | 2525 | { |
---|
2536 | 2526 | ReduceMesh(true); |
---|
2537 | 2527 | } else |
---|
2538 | | - if (event.getSource() == increaseMeshItem) |
---|
| 2528 | + if (source == increaseMeshItem) |
---|
2539 | 2529 | { |
---|
2540 | 2530 | IncreaseMesh(); |
---|
2541 | 2531 | } else |
---|
2542 | | - if (event.getSource() == clipMeshItem) |
---|
| 2532 | + if (source == clipMeshItem) |
---|
2543 | 2533 | { |
---|
2544 | 2534 | ClipMesh(); |
---|
2545 | 2535 | } else |
---|
2546 | | - if (event.getSource() == smoothMeshItem) |
---|
| 2536 | + if (source == smoothMeshItem) |
---|
2547 | 2537 | { |
---|
2548 | 2538 | SmoothMesh(); |
---|
2549 | 2539 | } else |
---|
2550 | | - if (event.getSource() == transformgeometryItem) |
---|
| 2540 | + if (source == transformgeometryItem) |
---|
2551 | 2541 | { |
---|
2552 | 2542 | TransformGeometry(); |
---|
2553 | 2543 | } else |
---|
2554 | | - if (event.getSource() == resetTransformItem) |
---|
| 2544 | + if (source == resetTransformItem) |
---|
2555 | 2545 | { |
---|
2556 | 2546 | ResetTransform(); |
---|
2557 | 2547 | } else |
---|
2558 | | - if (event.getSource() == resetCentroidItem) |
---|
| 2548 | + if (source == resetCentroidItem) |
---|
2559 | 2549 | { |
---|
2560 | 2550 | ResetCentroid(); |
---|
2561 | 2551 | } else |
---|
2562 | | - if (event.getSource() == resetParentItem) |
---|
| 2552 | + if (source == resetParentItem) |
---|
2563 | 2553 | { |
---|
2564 | 2554 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2565 | 2555 | { |
---|
.. | .. |
---|
2569 | 2559 | |
---|
2570 | 2560 | refreshContents(); |
---|
2571 | 2561 | } else |
---|
2572 | | - if (event.getSource() == repairParentItem) |
---|
| 2562 | + if (source == repairParentItem) |
---|
2573 | 2563 | { |
---|
2574 | 2564 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2575 | 2565 | { |
---|
.. | .. |
---|
2583 | 2573 | |
---|
2584 | 2574 | refreshContents(); |
---|
2585 | 2575 | } else |
---|
2586 | | - if (event.getSource() == repairShadowItem) |
---|
| 2576 | + if (source == repairShadowItem) |
---|
2587 | 2577 | { |
---|
2588 | 2578 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2589 | 2579 | { |
---|
.. | .. |
---|
2597 | 2587 | |
---|
2598 | 2588 | refreshContents(); |
---|
2599 | 2589 | } else |
---|
2600 | | - if (event.getSource() == sortbysizeItem) |
---|
| 2590 | + if (source == sortbysizeItem) |
---|
2601 | 2591 | { |
---|
2602 | 2592 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2603 | 2593 | { |
---|
.. | .. |
---|
2609 | 2599 | ResetModel(); |
---|
2610 | 2600 | refreshContents(); |
---|
2611 | 2601 | } else |
---|
2612 | | - if (event.getSource() == sortbynameItem) |
---|
| 2602 | + if (source == sortbynameItem) |
---|
2613 | 2603 | { |
---|
2614 | 2604 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2615 | 2605 | { |
---|
.. | .. |
---|
2621 | 2611 | ResetModel(); |
---|
2622 | 2612 | refreshContents(); |
---|
2623 | 2613 | } else |
---|
2624 | | - if (event.getSource() == attachPigmentItem) |
---|
| 2614 | + if (source == attachPigmentItem) |
---|
2625 | 2615 | { |
---|
2626 | 2616 | String texture = GetFile("Attach pigment"); |
---|
2627 | 2617 | Object3D obj; |
---|
.. | .. |
---|
2633 | 2623 | |
---|
2634 | 2624 | refreshContents(); |
---|
2635 | 2625 | } else |
---|
2636 | | - if (event.getSource() == detachPigmentItem) |
---|
| 2626 | + if (source == detachPigmentItem) |
---|
2637 | 2627 | { |
---|
2638 | 2628 | Object3D obj; |
---|
2639 | 2629 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2644 | 2634 | |
---|
2645 | 2635 | refreshContents(); |
---|
2646 | 2636 | } else |
---|
2647 | | - if (event.getSource() == attachBumpItem) |
---|
| 2637 | + if (source == attachBumpItem) |
---|
2648 | 2638 | { |
---|
2649 | 2639 | String texture = GetFile("Attach bump"); |
---|
2650 | 2640 | Object3D obj; |
---|
.. | .. |
---|
2656 | 2646 | |
---|
2657 | 2647 | refreshContents(); |
---|
2658 | 2648 | } else |
---|
2659 | | - if (event.getSource() == detachBumpItem) |
---|
| 2649 | + if (source == detachBumpItem) |
---|
2660 | 2650 | { |
---|
2661 | 2651 | Object3D obj; |
---|
2662 | 2652 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2667 | 2657 | |
---|
2668 | 2658 | refreshContents(); |
---|
2669 | 2659 | } else |
---|
2670 | | - if (event.getSource() == pigmentBumpItem) |
---|
| 2660 | + if (source == pigmentBumpItem) |
---|
2671 | 2661 | { |
---|
2672 | 2662 | Object3D obj; |
---|
2673 | 2663 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2678 | 2668 | |
---|
2679 | 2669 | refreshContents(); |
---|
2680 | 2670 | } else |
---|
2681 | | - if (event.getSource() == flashSelectionButton) |
---|
| 2671 | + if (source == flashSelectionButton) |
---|
2682 | 2672 | { |
---|
2683 | 2673 | CameraPane.flash = true; |
---|
2684 | 2674 | refreshContents(); |
---|
2685 | 2675 | } else |
---|
2686 | | - if (event.getSource() == oneButton) |
---|
| 2676 | + if (source == oneButton) |
---|
2687 | 2677 | { |
---|
2688 | 2678 | } else |
---|
2689 | | - if (event.getSource() == twoButton) |
---|
| 2679 | + if (source == twoButton) |
---|
2690 | 2680 | { |
---|
2691 | 2681 | radio.layout = twoButton; |
---|
2692 | 2682 | // bug |
---|
2693 | 2683 | //gridPanel.setDividerLocation(1.0); |
---|
2694 | 2684 | //bigPanel.setDividerLocation(0.0); |
---|
2695 | | - bigThree.remove(scenePanel); |
---|
2696 | | - bigThree.remove(centralPanel); |
---|
2697 | | - bigThree.remove(XYZPanel); |
---|
2698 | | - aWindowConstraints.gridx = 0; |
---|
2699 | | - aWindowConstraints.gridy = 0; |
---|
2700 | | - aWindowConstraints.gridwidth = 1; |
---|
2701 | | - // aConstraints.gridheight = 3; |
---|
2702 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2703 | | - aWindowConstraints.weightx = 0; |
---|
2704 | | - aWindowConstraints.weighty = 1; |
---|
2705 | | - //bigThree.add(jtp, aWindowConstraints); |
---|
2706 | | - aWindowConstraints.weightx = 1; |
---|
2707 | | - aWindowConstraints.gridwidth = 3; |
---|
2708 | | - // aConstraints.gridheight = 3; |
---|
2709 | | - aWindowConstraints.gridx = 1; |
---|
2710 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2711 | | - bigThree.add(centralPanel, aWindowConstraints); |
---|
2712 | | - aWindowConstraints.weightx = 0; |
---|
2713 | | - aWindowConstraints.gridx = 4; |
---|
2714 | | - aWindowConstraints.gridwidth = 1; |
---|
2715 | | - // aConstraints.gridheight = 3; |
---|
2716 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2717 | | - //bigThree.add(XYZPanel, aWindowConstraints); |
---|
2718 | | - bigThree.revalidate(); |
---|
| 2685 | +// bigThree.remove(scenePanel); |
---|
| 2686 | +// bigThree.remove(centralPanel); |
---|
| 2687 | +// bigThree.remove(XYZPanel); |
---|
| 2688 | +// aWindowConstraints.gridx = 0; |
---|
| 2689 | +// aWindowConstraints.gridy = 0; |
---|
| 2690 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2691 | +// // aConstraints.gridheight = 3; |
---|
| 2692 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2693 | +// aWindowConstraints.weightx = 0; |
---|
| 2694 | +// aWindowConstraints.weighty = 1; |
---|
| 2695 | +// //bigThree.add(jtp, aWindowConstraints); |
---|
| 2696 | +// aWindowConstraints.weightx = 1; |
---|
| 2697 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2698 | +// // aConstraints.gridheight = 3; |
---|
| 2699 | +// aWindowConstraints.gridx = 1; |
---|
| 2700 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2701 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2702 | +// aWindowConstraints.weightx = 0; |
---|
| 2703 | +// aWindowConstraints.gridx = 4; |
---|
| 2704 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2705 | +// // aConstraints.gridheight = 3; |
---|
| 2706 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2707 | +// //bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2708 | +// scenePanel.setVisible(false); |
---|
| 2709 | +// centralPanel.setVisible(true); |
---|
| 2710 | +// XYZPanel.setVisible(false); |
---|
| 2711 | + bigThree.ClearUI(); |
---|
| 2712 | + bigThree.add(centralPanel); |
---|
| 2713 | + bigThree.FlushUI(); |
---|
2719 | 2714 | } else |
---|
2720 | | - if (event.getSource() == threeButton) |
---|
| 2715 | + if (source == threeButton) |
---|
2721 | 2716 | { |
---|
2722 | 2717 | radio.layout = threeButton; |
---|
2723 | | - bigThree.remove(scenePanel); |
---|
2724 | | - bigThree.remove(centralPanel); |
---|
2725 | | - bigThree.remove(XYZPanel); |
---|
2726 | | - aWindowConstraints.gridx = 0; |
---|
2727 | | - aWindowConstraints.gridy = 0; |
---|
2728 | | - aWindowConstraints.gridwidth = 1; |
---|
2729 | | - // aConstraints.gridheight = 3; |
---|
2730 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2731 | | - aWindowConstraints.weightx = 0; |
---|
2732 | | - aWindowConstraints.weighty = 1; |
---|
2733 | | - //bigThree.add(jtp, aWindowConstraints); |
---|
2734 | | - aWindowConstraints.weightx = 1; |
---|
2735 | | - aWindowConstraints.gridwidth = 3; |
---|
2736 | | - // aConstraints.gridheight = 3; |
---|
2737 | | - aWindowConstraints.gridx = 1; |
---|
2738 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2739 | | - bigThree.add(centralPanel, aWindowConstraints); |
---|
2740 | | - aWindowConstraints.weightx = 0; |
---|
2741 | | - aWindowConstraints.gridx = 4; |
---|
2742 | | - aWindowConstraints.gridwidth = 1; |
---|
2743 | | - // aConstraints.gridheight = 3; |
---|
2744 | | - aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2745 | | - bigThree.add(XYZPanel, aWindowConstraints); |
---|
2746 | | - bigThree.revalidate(); |
---|
| 2718 | + |
---|
| 2719 | +// bigThree.remove(scenePanel); |
---|
| 2720 | +// bigThree.remove(centralPanel); |
---|
| 2721 | +// bigThree.remove(XYZPanel); |
---|
| 2722 | +// aWindowConstraints.gridx = 0; |
---|
| 2723 | +// aWindowConstraints.gridy = 0; |
---|
| 2724 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2725 | +// // aConstraints.gridheight = 3; |
---|
| 2726 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2727 | +// aWindowConstraints.weightx = 0; |
---|
| 2728 | +// aWindowConstraints.weighty = 1; |
---|
| 2729 | +// //bigThree.add(jtp, aWindowConstraints); |
---|
| 2730 | +// aWindowConstraints.weightx = 1; |
---|
| 2731 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2732 | +// // aConstraints.gridheight = 3; |
---|
| 2733 | +// aWindowConstraints.gridx = 1; |
---|
| 2734 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2735 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2736 | +// aWindowConstraints.weightx = 0; |
---|
| 2737 | +// aWindowConstraints.gridx = 4; |
---|
| 2738 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2739 | +// // aConstraints.gridheight = 3; |
---|
| 2740 | +// aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2741 | +// bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2742 | +// bigThree.validate(); |
---|
| 2743 | +// scenePanel.setVisible(false); |
---|
| 2744 | +// centralPanel.setVisible(true); |
---|
| 2745 | +// XYZPanel.setVisible(true); |
---|
| 2746 | + bigThree.ClearUI(); |
---|
| 2747 | + bigThree.add(centralPanel); |
---|
| 2748 | + bigThree.add(XYZPanel); |
---|
| 2749 | + bigThree.FlushUI(); |
---|
2747 | 2750 | } else |
---|
2748 | | - if (event.getSource() == fourButton) |
---|
| 2751 | + if (source == fourButton) |
---|
2749 | 2752 | { |
---|
2750 | 2753 | radio.layout = fourButton; |
---|
2751 | | - bigThree.remove(scenePanel); |
---|
2752 | | - bigThree.remove(centralPanel); |
---|
2753 | | - bigThree.remove(XYZPanel); |
---|
2754 | | - aWindowConstraints.gridx = 0; |
---|
2755 | | - aWindowConstraints.gridy = 0; |
---|
2756 | | - aWindowConstraints.gridwidth = 1; |
---|
2757 | | - // aWindowConstraints.gridheight = 3; |
---|
2758 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2759 | | - aWindowConstraints.weightx = 1; |
---|
2760 | | - aWindowConstraints.weighty = 1; |
---|
2761 | | - bigThree.add(scenePanel, aWindowConstraints); |
---|
2762 | | - aWindowConstraints.weightx = 1; |
---|
2763 | | - aWindowConstraints.gridwidth = 3; |
---|
2764 | | - // aConstraints.gridheight = 3; |
---|
2765 | | - aWindowConstraints.gridx = 1; |
---|
2766 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2767 | | - //bigThree.add(cameraPanel, aWindowConstraints); |
---|
2768 | | - aWindowConstraints.weightx = 0; |
---|
2769 | | - aWindowConstraints.gridx = 4; |
---|
2770 | | - aWindowConstraints.gridwidth = 1; |
---|
2771 | | - // aWindowConstraints.gridheight = 3; |
---|
2772 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2773 | | - //bigThree.add(XYZPanel, aWindowConstraints); |
---|
2774 | | - bigThree.revalidate(); |
---|
| 2754 | + |
---|
| 2755 | +// bigThree.remove(scenePanel); |
---|
| 2756 | +// bigThree.remove(centralPanel); |
---|
| 2757 | +// bigThree.remove(XYZPanel); |
---|
| 2758 | +// aWindowConstraints.gridx = 0; |
---|
| 2759 | +// aWindowConstraints.gridy = 0; |
---|
| 2760 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2761 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2762 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2763 | +// aWindowConstraints.weightx = 1; |
---|
| 2764 | +// aWindowConstraints.weighty = 1; |
---|
| 2765 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2766 | +// aWindowConstraints.weightx = 1; |
---|
| 2767 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2768 | +// // aConstraints.gridheight = 3; |
---|
| 2769 | +// aWindowConstraints.gridx = 1; |
---|
| 2770 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2771 | +// //bigThree.add(cameraPanel, aWindowConstraints); |
---|
| 2772 | +// aWindowConstraints.weightx = 0; |
---|
| 2773 | +// aWindowConstraints.gridx = 4; |
---|
| 2774 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2775 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2776 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2777 | +// //bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2778 | +// bigThree.validate(); |
---|
| 2779 | +// scenePanel.setVisible(true); |
---|
| 2780 | +// centralPanel.setVisible(false); |
---|
| 2781 | +// XYZPanel.setVisible(false); |
---|
| 2782 | + bigThree.ClearUI(); |
---|
| 2783 | + bigThree.add(scenePanel); |
---|
| 2784 | + bigThree.FlushUI(); |
---|
2775 | 2785 | } else |
---|
2776 | | - if (event.getSource() == sixButton) |
---|
| 2786 | + if (source == sixButton) |
---|
2777 | 2787 | { |
---|
2778 | 2788 | radio.layout = sixButton; |
---|
2779 | | - bigThree.remove(scenePanel); |
---|
2780 | | - bigThree.remove(centralPanel); |
---|
2781 | | - bigThree.remove(XYZPanel); |
---|
2782 | | - aWindowConstraints.gridx = 0; |
---|
2783 | | - aWindowConstraints.gridy = 0; |
---|
2784 | | - aWindowConstraints.gridwidth = 1; |
---|
2785 | | - // aConstraints.gridheight = 3; |
---|
2786 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2787 | | - aWindowConstraints.weightx = 0; |
---|
2788 | | - aWindowConstraints.weighty = 1; |
---|
2789 | | - bigThree.add(scenePanel, aWindowConstraints); |
---|
2790 | | - aWindowConstraints.weightx = 1; |
---|
2791 | | - aWindowConstraints.gridwidth = 3; |
---|
2792 | | - // aWindowConstraints.gridheight = 3; |
---|
2793 | | - aWindowConstraints.gridx = 1; |
---|
2794 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2795 | | - bigThree.add(centralPanel, aWindowConstraints); |
---|
2796 | | - aWindowConstraints.weightx = 0; |
---|
2797 | | - aWindowConstraints.gridx = 4; |
---|
2798 | | - aWindowConstraints.gridwidth = 1; |
---|
2799 | | - // aWindowConstraints.gridheight = 3; |
---|
2800 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2801 | | - //bigThree.add(XYZPanel, aConstraints); |
---|
2802 | | - bigThree.revalidate(); |
---|
| 2789 | + |
---|
| 2790 | +// bigThree.remove(scenePanel); |
---|
| 2791 | +// bigThree.remove(centralPanel); |
---|
| 2792 | +// bigThree.remove(XYZPanel); |
---|
| 2793 | +// aWindowConstraints.gridx = 0; |
---|
| 2794 | +// aWindowConstraints.gridy = 0; |
---|
| 2795 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2796 | +// // aConstraints.gridheight = 3; |
---|
| 2797 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2798 | +// aWindowConstraints.weightx = 0; |
---|
| 2799 | +// aWindowConstraints.weighty = 1; |
---|
| 2800 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2801 | +// aWindowConstraints.weightx = 1; |
---|
| 2802 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2803 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2804 | +// aWindowConstraints.gridx = 1; |
---|
| 2805 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2806 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2807 | +// aWindowConstraints.weightx = 0; |
---|
| 2808 | +// aWindowConstraints.gridx = 4; |
---|
| 2809 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2810 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2811 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2812 | +// //bigThree.add(XYZPanel, aConstraints); |
---|
| 2813 | +// bigThree.validate(); |
---|
| 2814 | +// scenePanel.setVisible(true); |
---|
| 2815 | +// centralPanel.setVisible(true); |
---|
| 2816 | +// XYZPanel.setVisible(false); |
---|
| 2817 | + bigThree.ClearUI(); |
---|
| 2818 | + bigThree.add(scenePanel); |
---|
| 2819 | + bigThree.add(centralPanel); |
---|
| 2820 | + bigThree.FlushUI(); |
---|
2803 | 2821 | } else |
---|
2804 | | - if (event.getSource() == sevenButton) |
---|
| 2822 | + if (source == sevenButton) |
---|
2805 | 2823 | { |
---|
2806 | 2824 | radio.layout = sevenButton; |
---|
2807 | | - bigThree.remove(scenePanel); |
---|
2808 | | - bigThree.remove(centralPanel); |
---|
2809 | | - bigThree.remove(XYZPanel); |
---|
2810 | | - aWindowConstraints.gridx = 0; |
---|
2811 | | - aWindowConstraints.gridy = 0; |
---|
2812 | | - aWindowConstraints.gridwidth = 1; |
---|
2813 | | - // aWindowConstraints.gridheight = 3; |
---|
2814 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2815 | | - aWindowConstraints.weightx = 0; |
---|
2816 | | - aWindowConstraints.weighty = 1; |
---|
2817 | | - bigThree.add(scenePanel, aWindowConstraints); |
---|
2818 | | - aWindowConstraints.weightx = 1; |
---|
2819 | | - aWindowConstraints.gridwidth = 3; |
---|
2820 | | - // aWindowConstraints.gridheight = 3; |
---|
2821 | | - aWindowConstraints.gridx = 1; |
---|
2822 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2823 | | - bigThree.add(centralPanel, aWindowConstraints); |
---|
2824 | | - aWindowConstraints.weightx = 0; |
---|
2825 | | - aWindowConstraints.gridx = 4; |
---|
2826 | | - aWindowConstraints.gridwidth = 1; |
---|
2827 | | - // aConstraints.gridheight = 3; |
---|
2828 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2829 | | - bigThree.add(XYZPanel, aWindowConstraints); |
---|
2830 | | - bigThree.revalidate(); |
---|
| 2825 | + |
---|
| 2826 | +// bigThree.remove(scenePanel); |
---|
| 2827 | +// bigThree.remove(centralPanel); |
---|
| 2828 | +// bigThree.remove(XYZPanel); |
---|
| 2829 | +// aWindowConstraints.gridx = 0; |
---|
| 2830 | +// aWindowConstraints.gridy = 0; |
---|
| 2831 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2832 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2833 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2834 | +// aWindowConstraints.weightx = 0; |
---|
| 2835 | +// aWindowConstraints.weighty = 1; |
---|
| 2836 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2837 | +// aWindowConstraints.weightx = 1; |
---|
| 2838 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2839 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2840 | +// aWindowConstraints.gridx = 1; |
---|
| 2841 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2842 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2843 | +// aWindowConstraints.weightx = 0; |
---|
| 2844 | +// aWindowConstraints.gridx = 4; |
---|
| 2845 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2846 | +// // aConstraints.gridheight = 3; |
---|
| 2847 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2848 | +// bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2849 | +// bigThree.validate(); |
---|
| 2850 | +// scenePanel.setVisible(true); |
---|
| 2851 | +// centralPanel.setVisible(true); |
---|
| 2852 | +// XYZPanel.setVisible(true); |
---|
| 2853 | + bigThree.ClearUI(); |
---|
| 2854 | + bigThree.add(scenePanel); |
---|
| 2855 | + bigThree.add(centralPanel); |
---|
| 2856 | + bigThree.add(XYZPanel); |
---|
| 2857 | + bigThree.FlushUI(); |
---|
2831 | 2858 | } else |
---|
2832 | | - if (event.getSource() == rootButton) |
---|
| 2859 | + if (source == rootButton) |
---|
2833 | 2860 | { |
---|
2834 | 2861 | Object3D obj; |
---|
2835 | 2862 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2841 | 2868 | |
---|
2842 | 2869 | refreshContents(true); |
---|
2843 | 2870 | } else |
---|
2844 | | - if (event.getSource() == closeButton) |
---|
| 2871 | + if (source == closeButton) |
---|
2845 | 2872 | { |
---|
2846 | 2873 | //System.out.println("CLOSE: " + buttonGroup.getSelection()); |
---|
2847 | 2874 | cRadio ab; |
---|
.. | .. |
---|
2862 | 2889 | } |
---|
2863 | 2890 | refreshContents(true); |
---|
2864 | 2891 | } else |
---|
2865 | | - if (event.getSource() == editItem || event.getSource() == editButton) |
---|
| 2892 | + if (source == editItem || source == editButton) |
---|
2866 | 2893 | { |
---|
2867 | 2894 | EditSelection(false); |
---|
2868 | 2895 | } else |
---|
2869 | | - if (event.getSource() == uneditButton) |
---|
| 2896 | + if (source == uneditButton) |
---|
2870 | 2897 | { |
---|
2871 | 2898 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2872 | 2899 | { |
---|
.. | .. |
---|
2878 | 2905 | |
---|
2879 | 2906 | child.editWindow = null; // ??????????? |
---|
2880 | 2907 | } |
---|
2881 | | - objEditor.ctrlPanel.revalidate(); |
---|
| 2908 | + objEditor.ctrlPanel.validate(); |
---|
2882 | 2909 | //objEditor.jTree.clearSelection(); |
---|
2883 | 2910 | //objEditor.ResetSliders(); |
---|
2884 | 2911 | refreshContents(true); |
---|
2885 | 2912 | } else |
---|
2886 | | - if (event.getSource() == clearPanelButton) |
---|
| 2913 | + if (source == clearPanelButton) |
---|
2887 | 2914 | { |
---|
2888 | 2915 | assert(copy == group); |
---|
2889 | 2916 | //copy.ClearUI(); |
---|
.. | .. |
---|
2894 | 2921 | listUI.clear(); |
---|
2895 | 2922 | refreshContents(true); |
---|
2896 | 2923 | } else |
---|
2897 | | - if (event.getSource() == allParamsButton) |
---|
| 2924 | + if (source == allParamsButton) |
---|
2898 | 2925 | { |
---|
2899 | 2926 | assert(copy == group); |
---|
2900 | 2927 | |
---|
.. | .. |
---|
2915 | 2942 | |
---|
2916 | 2943 | refreshContents(true); |
---|
2917 | 2944 | } else |
---|
2918 | | - if (event.getSource() == unselectButton) |
---|
| 2945 | + if (source == unselectButton) |
---|
2919 | 2946 | { |
---|
2920 | 2947 | objEditor.jTree.clearSelection(); |
---|
2921 | 2948 | // ?? oct 2012 GrafreeD.clipboard.clear(); |
---|
2922 | 2949 | objEditor.ResetSliders(); |
---|
2923 | 2950 | refreshContents(true); |
---|
2924 | 2951 | } else |
---|
2925 | | - if(event.getSource() instanceof cRadio) |
---|
| 2952 | + if(source instanceof cRadio) |
---|
2926 | 2953 | { |
---|
2927 | 2954 | group.parent = keepparent; |
---|
2928 | 2955 | group.attributes = 0; |
---|
2929 | 2956 | //group.editWindow = null; |
---|
2930 | | - /*cRadio*/ radio = (cRadio)event.getSource(); |
---|
| 2957 | + /*cRadio*/ radio = (cRadio)source; |
---|
2931 | 2958 | Object3D obj = radio.GetObject(); |
---|
2932 | 2959 | System.out.println("Edit " + obj); |
---|
2933 | 2960 | if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite) |
---|