.. | .. |
---|
504 | 504 | //povItem.addActionListener(this); |
---|
505 | 505 | closeItem.addActionListener(this); |
---|
506 | 506 | |
---|
507 | | - objectPanel = new JTabbedPane(); |
---|
| 507 | + objectTabbedPane = new JTabbedPane(); |
---|
508 | 508 | |
---|
509 | 509 | ChangeListener changeListener = new ChangeListener() |
---|
510 | 510 | { |
---|
.. | .. |
---|
555 | 555 | // } |
---|
556 | 556 | // } |
---|
557 | 557 | // } |
---|
558 | | - cameraView.transformMode = objectPanel.getSelectedIndex() == 4; |
---|
| 558 | + cameraView.transformMode = objectTabbedPane.getSelectedIndex() == 4; |
---|
559 | 559 | |
---|
560 | 560 | // refreshContents(false); // To refresh Info tab |
---|
561 | 561 | cameraView.repaint(); |
---|
562 | 562 | } |
---|
563 | 563 | }; |
---|
564 | | - objectPanel.addChangeListener(changeListener); |
---|
| 564 | + objectTabbedPane.addChangeListener(changeListener); |
---|
565 | 565 | |
---|
566 | 566 | toolbarPanel = new JPanel(); |
---|
567 | 567 | toolbarPanel.setName("Toolbar"); |
---|
.. | .. |
---|
604 | 604 | //infoPanel.setLayout(new BorderLayout()); |
---|
605 | 605 | //infoPanel.add(createTextPane()); |
---|
606 | 606 | |
---|
607 | | - mainPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, treePanel, objectPanel); |
---|
| 607 | + mainPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, treePanel, objectTabbedPane); |
---|
608 | 608 | mainPanel.setName("Main"); |
---|
609 | 609 | mainPanel.setContinuousLayout(true); |
---|
610 | 610 | mainPanel.setOneTouchExpandable(true); |
---|
.. | .. |
---|
1589 | 1589 | |
---|
1590 | 1590 | return null; |
---|
1591 | 1591 | } |
---|
| 1592 | + |
---|
| 1593 | + int objectTabCount; |
---|
1592 | 1594 | |
---|
1593 | 1595 | void SetupViews() |
---|
1594 | 1596 | { |
---|
.. | .. |
---|
1761 | 1763 | |
---|
1762 | 1764 | //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); |
---|
1763 | 1765 | //tmp.setName("Edit"); |
---|
1764 | | - objectPanel.add(skyboxPanel); |
---|
1765 | | - objectPanel.setIconAt(0, GetIcon("icons/skybox.jpg")); |
---|
1766 | | - objectPanel.setToolTipTextAt(0, "Backgrounds"); |
---|
1767 | 1766 | |
---|
1768 | | - objectPanel.add(toolboxPanel); |
---|
1769 | | - objectPanel.setIconAt(1, GetIcon("icons/primitives.png")); |
---|
1770 | | - objectPanel.setToolTipTextAt(1, "Objects & textures"); |
---|
| 1767 | + objectTabCount = 0; |
---|
| 1768 | + |
---|
| 1769 | + objectTabbedPane.add(skyboxPanel); |
---|
| 1770 | + objectTabbedPane.setIconAt(objectTabCount, GetIcon("icons/skybox.jpg")); |
---|
| 1771 | + objectTabbedPane.setToolTipTextAt(objectTabCount++, "Backgrounds"); |
---|
| 1772 | + |
---|
| 1773 | + objectTabbedPane.add(toolboxPanel); |
---|
| 1774 | + objectTabbedPane.setIconAt(objectTabCount, GetIcon("icons/primitives.png")); |
---|
| 1775 | + objectTabbedPane.setToolTipTextAt(objectTabCount++, "Objects & textures"); |
---|
1771 | 1776 | |
---|
1772 | | - objectPanel.add(materialPanel); |
---|
1773 | | - objectPanel.setIconAt(2, GetIcon("icons/material.png")); |
---|
1774 | | - objectPanel.setToolTipTextAt(2, "Material"); |
---|
| 1777 | + objectTabbedPane.add(materialPanel); |
---|
| 1778 | + objectTabbedPane.setIconAt(objectTabCount, GetIcon("icons/material.png")); |
---|
| 1779 | + objectTabbedPane.setToolTipTextAt(objectTabCount++, "Material"); |
---|
1775 | 1780 | |
---|
| 1781 | + figurePanel = new cGridBag(); |
---|
| 1782 | + figurePanel.add(new cButton("FIGURES amd POSES coming soon!")); |
---|
| 1783 | + objectTabbedPane.add(figurePanel); |
---|
| 1784 | + objectTabbedPane.setIconAt(objectTabCount, GetIcon("icons/run.png")); |
---|
| 1785 | + objectTabbedPane.setToolTipTextAt(objectTabCount++, "Figures and poses"); |
---|
| 1786 | + |
---|
1776 | 1787 | // JPanel north = new JPanel(new BorderLayout()); |
---|
1777 | 1788 | // north.setName("Edit"); |
---|
1778 | 1789 | // north.add(ctrlPanel, BorderLayout.NORTH); |
---|
1779 | 1790 | // objectPanel.add(north); |
---|
1780 | | - objectPanel.add(editPanel); |
---|
1781 | | - objectPanel.setIconAt(3, GetIcon("icons/writewhite.png")); |
---|
1782 | | - objectPanel.setToolTipTextAt(3, "Edit controls"); |
---|
| 1791 | + objectTabbedPane.add(editPanel); |
---|
| 1792 | + objectTabbedPane.setIconAt(objectTabCount, GetIcon("icons/writewhite.png")); |
---|
| 1793 | + objectTabbedPane.setToolTipTextAt(objectTabCount++, "Edit controls"); |
---|
1783 | 1794 | |
---|
1784 | | - objectPanel.add(transformPanel); |
---|
1785 | | - objectPanel.setIconAt(4, GetIcon("icons/XYZ.png")); |
---|
1786 | | - objectPanel.setToolTipTextAt(4, "TRS transform"); |
---|
| 1795 | + objectTabbedPane.add(transformPanel); |
---|
| 1796 | + objectTabbedPane.setIconAt(objectTabCount, GetIcon("icons/XYZ.png")); |
---|
| 1797 | + objectTabbedPane.setToolTipTextAt(objectTabCount++, "TRS transform"); |
---|
1787 | 1798 | |
---|
1788 | 1799 | patchMaterial = true; |
---|
1789 | 1800 | cameraView.patchMaterial = this; |
---|
1790 | | - objectPanel.setSelectedIndex(2); |
---|
| 1801 | + objectTabbedPane.setSelectedIndex(2); |
---|
1791 | 1802 | |
---|
1792 | 1803 | /* |
---|
1793 | 1804 | aConstraints.gridx = 0; |
---|
.. | .. |
---|
1808 | 1819 | scrollpane.addMouseWheelListener(this); // Default not fast enough |
---|
1809 | 1820 | |
---|
1810 | 1821 | /*JTabbedPane*/ scenePanel = new cGridBag(); |
---|
1811 | | - scenePanel.preferredWidth = 5; |
---|
| 1822 | + scenePanel.preferredWidth = 6; |
---|
1812 | 1823 | |
---|
1813 | 1824 | JTabbedPane tabbedPane = new JTabbedPane(); |
---|
1814 | 1825 | tabbedPane.add(scrollpane); |
---|
.. | .. |
---|
1917 | 1928 | |
---|
1918 | 1929 | if (Globals.SHOWINFO) |
---|
1919 | 1930 | { |
---|
1920 | | - objectPanel.add(infoPanel); |
---|
1921 | | - objectPanel.setIconAt(5, GetIcon("icons/info.png")); |
---|
1922 | | - objectPanel.setToolTipTextAt(4, "Information"); |
---|
| 1931 | + objectTabbedPane.add(infoPanel); |
---|
| 1932 | + objectTabbedPane.setIconAt(objectTabCount, GetIcon("icons/info.png")); |
---|
| 1933 | + objectTabbedPane.setToolTipTextAt(objectTabCount++, "Information"); |
---|
1923 | 1934 | } |
---|
1924 | 1935 | |
---|
1925 | 1936 | /* |
---|
.. | .. |
---|
6299 | 6310 | cGridBag skyboxPanel; |
---|
6300 | 6311 | cGridBag materialPanel; |
---|
6301 | 6312 | cGridBag ctrlPanel; |
---|
| 6313 | + cGridBag figurePanel; |
---|
6302 | 6314 | |
---|
6303 | 6315 | JScrollPane infoPanel; |
---|
6304 | 6316 | |
---|
6305 | 6317 | cGridBag optionsPanel; |
---|
6306 | 6318 | |
---|
6307 | | - JTabbedPane objectPanel; |
---|
| 6319 | + JTabbedPane objectTabbedPane; |
---|
6308 | 6320 | boolean materialFlushed; |
---|
6309 | 6321 | Object3D latestObject; |
---|
6310 | 6322 | |
---|