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