.. | .. |
---|
15 | 15 | //import javax.swing.plaf.ColorUIResource; |
---|
16 | 16 | //import javax.swing.plaf.metal.DefaultMetalTheme; |
---|
17 | 17 | |
---|
| 18 | +import javax.swing.plaf.basic.BasicSplitPaneDivider; |
---|
| 19 | +import javax.swing.plaf.basic.BasicSplitPaneUI; |
---|
| 20 | + |
---|
18 | 21 | //import javax.media.opengl.GLCanvas; |
---|
19 | 22 | |
---|
20 | 23 | import //weka.core. |
---|
.. | .. |
---|
306 | 309 | //localCopy.parent = null; |
---|
307 | 310 | |
---|
308 | 311 | frame = new JFrame(); |
---|
309 | | - frame.setUndecorated(true); |
---|
| 312 | + frame.setUndecorated(false); |
---|
310 | 313 | objEditor = this; |
---|
311 | 314 | this.callee = callee; |
---|
312 | 315 | |
---|
.. | .. |
---|
446 | 449 | // TEXTAREA infoarea.setLineWrap(true); |
---|
447 | 450 | // TEXTAREA infoarea.setWrapStyleWord(true); |
---|
448 | 451 | infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED); |
---|
449 | | - infoPanel.setPreferredSize(new Dimension(50, 200)); |
---|
| 452 | + //infoPanel.setPreferredSize(new Dimension(50, 200)); |
---|
450 | 453 | infoPanel.setName("Info"); |
---|
451 | 454 | //infoPanel.setLayout(new BorderLayout()); |
---|
452 | 455 | //infoPanel.add(createTextPane()); |
---|
.. | .. |
---|
458 | 461 | mainPanel.setDividerSize(9); |
---|
459 | 462 | mainPanel.setDividerLocation(0.5); //1.0); |
---|
460 | 463 | mainPanel.setResizeWeight(0.5); |
---|
461 | | - |
---|
| 464 | + |
---|
| 465 | +//mainPanel.setDividerSize((int) (mainPanel.getDividerSize() * 1.5)); |
---|
| 466 | + BasicSplitPaneDivider divider = ( (BasicSplitPaneUI) mainPanel.getUI()).getDivider(); |
---|
| 467 | + divider.setDividerSize(15); |
---|
| 468 | + divider.setBorder(BorderFactory.createTitledBorder(divider.getBorder(), "Custom border title -- gets rid of the one-touch arrows!")); |
---|
| 469 | + |
---|
| 470 | + mainPanel.setUI(new BasicSplitPaneUI()); |
---|
| 471 | + |
---|
462 | 472 | //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5)); |
---|
463 | 473 | //mainPanel.setLayout(new GridBagLayout()); |
---|
464 | 474 | toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
.. | .. |
---|
689 | 699 | } |
---|
690 | 700 | } |
---|
691 | 701 | |
---|
692 | | -static GraphicsDevice device = GraphicsEnvironment |
---|
693 | | - .getLocalGraphicsEnvironment().getScreenDevices()[0]; |
---|
| 702 | +//static GraphicsDevice device = GraphicsEnvironment |
---|
| 703 | +// .getLocalGraphicsEnvironment().getScreenDevices()[0]; |
---|
694 | 704 | |
---|
695 | 705 | Rectangle keeprect; |
---|
696 | 706 | cRadio radio; |
---|
.. | .. |
---|
711 | 721 | void Minimize() |
---|
712 | 722 | { |
---|
713 | 723 | frame.setState(Frame.ICONIFIED); |
---|
| 724 | + frame.validate(); |
---|
714 | 725 | } |
---|
715 | 726 | |
---|
| 727 | +// artifactURI=null, type=0, property=${file.reference.jfxrt.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@6767876f, broken=false, additional={} |
---|
| 728 | +// artifactURI=null, type=0, property=${file.reference.mac-ui.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@16bdc817, broken=false, additional={} |
---|
| 729 | +// artifactURI=null, type=0, property=${file.reference.classes.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@9daa9c17, broken=false, additional={} |
---|
716 | 730 | void Maximize() |
---|
717 | 731 | { |
---|
| 732 | + if (CameraPane.FULLSCREEN) |
---|
| 733 | + { |
---|
| 734 | + ToggleFullScreen(); |
---|
| 735 | + } |
---|
| 736 | + |
---|
718 | 737 | if (maximized) |
---|
719 | 738 | { |
---|
720 | 739 | frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height); |
---|
.. | .. |
---|
722 | 741 | else |
---|
723 | 742 | { |
---|
724 | 743 | keeprect = frame.getBounds(); |
---|
725 | | - Rectangle rect = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds(); |
---|
726 | | - Dimension rect2 = frame.getToolkit().getScreenSize(); |
---|
727 | | - frame.setBounds(0, rect2.height - rect.height, rect.width, rect.height); |
---|
| 744 | +// Rectangle rect = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds(); |
---|
| 745 | +// Dimension rect2 = frame.getToolkit().getScreenSize(); |
---|
| 746 | +// frame.setBounds(0, rect2.height - rect.height, rect.width, rect.height); |
---|
728 | 747 | // frame.setState(Frame.MAXIMIZED_BOTH); |
---|
| 748 | + frame.setBounds(frame.getGraphicsConfiguration().getBounds()); |
---|
729 | 749 | } |
---|
730 | 750 | |
---|
731 | 751 | maximized ^= true; |
---|
| 752 | + |
---|
| 753 | + frame.validate(); |
---|
732 | 754 | } |
---|
| 755 | + |
---|
| 756 | + cButton minButton; |
---|
| 757 | + cButton maxButton; |
---|
| 758 | + cButton fullButton; |
---|
733 | 759 | |
---|
734 | 760 | void ToggleFullScreen() |
---|
735 | 761 | { |
---|
| 762 | +GraphicsDevice device = frame.getGraphicsConfiguration().getDevice(); |
---|
| 763 | + |
---|
736 | 764 | cameraView.ToggleFullScreen(); |
---|
737 | 765 | |
---|
738 | 766 | if (!CameraPane.FULLSCREEN) |
---|
739 | 767 | { |
---|
740 | 768 | device.setFullScreenWindow(null); |
---|
| 769 | + frame.dispose(); |
---|
| 770 | + frame.setUndecorated(false); |
---|
| 771 | + frame.validate(); |
---|
| 772 | + frame.setVisible(true); |
---|
| 773 | + |
---|
741 | 774 | //frame.setVisible(false); |
---|
742 | 775 | // frame.removeNotify(); |
---|
743 | 776 | // frame.setUndecorated(false); |
---|
.. | .. |
---|
762 | 795 | // frame.setBounds(0, 0, frame.getToolkit().getScreenSize().width, |
---|
763 | 796 | // frame.getToolkit().getScreenSize().height); |
---|
764 | 797 | //frame.setVisible(false); |
---|
| 798 | + |
---|
| 799 | + frame.dispose(); |
---|
| 800 | + frame.setUndecorated(true); |
---|
765 | 801 | device.setFullScreenWindow(frame); |
---|
| 802 | + frame.validate(); |
---|
| 803 | + frame.setVisible(true); |
---|
766 | 804 | // frame.removeNotify(); |
---|
767 | 805 | // frame.setUndecorated(true); |
---|
768 | 806 | // frame.addNotify(); |
---|
.. | .. |
---|
775 | 813 | radio.layout.doClick(); |
---|
776 | 814 | //frame.setVisible(true); |
---|
777 | 815 | } |
---|
| 816 | + frame.validate(); |
---|
778 | 817 | } |
---|
779 | 818 | |
---|
780 | 819 | private JTextPane createTextPane() |
---|
.. | .. |
---|
1107 | 1146 | namePanel = new cGridBag(); |
---|
1108 | 1147 | |
---|
1109 | 1148 | nameField = AddText(namePanel, copy.GetName()); |
---|
1110 | | - namePanel.add(nameField); |
---|
| 1149 | + namePanel.add(new JScrollPane(nameField, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER)); |
---|
1111 | 1150 | oe.ctrlPanel.add(namePanel); |
---|
1112 | 1151 | |
---|
1113 | 1152 | oe.ctrlPanel.Return(); |
---|
.. | .. |
---|
1125 | 1164 | hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); |
---|
1126 | 1165 | hideCB.setToolTipText("Hide object"); |
---|
1127 | 1166 | markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
---|
1128 | | - markCB.setToolTipText("Set the animation target transform"); |
---|
| 1167 | + markCB.setToolTipText("As animation target transform"); |
---|
1129 | 1168 | |
---|
1130 | 1169 | setupPanel2 = new cGridBag().setVertical(false); |
---|
1131 | 1170 | |
---|
1132 | 1171 | rewindCB = AddCheckBox(setupPanel2, "Rewind", copy.rewind); |
---|
1133 | 1172 | rewindCB.setToolTipText("Rewind animation"); |
---|
1134 | 1173 | |
---|
1135 | | - randomCB = AddCheckBox(setupPanel2, "Rand", copy.random); |
---|
1136 | | - randomCB.setToolTipText("Randomly Rewind or Go back and forth"); |
---|
| 1174 | + randomCB = AddCheckBox(setupPanel2, "Random", copy.random); |
---|
| 1175 | + randomCB.setToolTipText("Randomly Rewind (or Go back and forth)"); |
---|
1137 | 1176 | |
---|
1138 | 1177 | if (Globals.ADVANCED) |
---|
1139 | 1178 | { |
---|
.. | .. |
---|
1584 | 1623 | |
---|
1585 | 1624 | frame.setSize(1280, 860); |
---|
1586 | 1625 | |
---|
1587 | | - frame.validate(); |
---|
1588 | | - frame.setVisible(true); |
---|
1589 | | - |
---|
1590 | 1626 | cameraView.requestFocusInWindow(); |
---|
1591 | 1627 | |
---|
1592 | 1628 | gridPanel.setDividerLocation(1.0); |
---|
| 1629 | + |
---|
| 1630 | + frame.validate(); |
---|
| 1631 | + |
---|
| 1632 | + frame.setVisible(true); |
---|
1593 | 1633 | |
---|
1594 | 1634 | frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); |
---|
1595 | 1635 | frame.addWindowListener(new WindowAdapter() |
---|
.. | .. |
---|
1676 | 1716 | texture.add(textureField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1677 | 1717 | colorSection.add(texture); |
---|
1678 | 1718 | |
---|
1679 | | - cGridBag anisoU = new cGridBag(); |
---|
1680 | | - anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints); |
---|
1681 | | - anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1682 | | - anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1683 | | - colorSection.add(anisoU); |
---|
1684 | | - |
---|
1685 | | - cGridBag anisoV = new cGridBag(); |
---|
1686 | | - anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints); |
---|
1687 | | - anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1688 | | - anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1689 | | - colorSection.add(anisoV); |
---|
1690 | | - |
---|
1691 | | - cGridBag shadowbias = new cGridBag(); |
---|
1692 | | - shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints); |
---|
1693 | | - shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1694 | | - shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1695 | | - colorSection.add(shadowbias); |
---|
1696 | | - |
---|
1697 | 1719 | panel.add(new JSeparator()); |
---|
1698 | 1720 | |
---|
1699 | 1721 | panel.add(colorSection); |
---|
.. | .. |
---|
1743 | 1765 | fakedepthLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1744 | 1766 | fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1745 | 1767 | diffuseSection.add(fakedepth); |
---|
| 1768 | + |
---|
| 1769 | + cGridBag shadowbias = new cGridBag(); |
---|
| 1770 | + shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints); |
---|
| 1771 | + shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1772 | + shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1773 | + diffuseSection.add(shadowbias); |
---|
1746 | 1774 | |
---|
1747 | 1775 | panel.add(new JSeparator()); |
---|
1748 | 1776 | |
---|
.. | .. |
---|
1794 | 1822 | // aConstraints.gridy += 1; |
---|
1795 | 1823 | // aConstraints.gridwidth = 1; |
---|
1796 | 1824 | |
---|
| 1825 | + cGridBag anisoU = new cGridBag(); |
---|
| 1826 | + anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints); |
---|
| 1827 | + anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1828 | + anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1829 | + specularSection.add(anisoU); |
---|
| 1830 | + |
---|
| 1831 | + cGridBag anisoV = new cGridBag(); |
---|
| 1832 | + anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints); |
---|
| 1833 | + anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1834 | + anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1835 | + specularSection.add(anisoV); |
---|
| 1836 | + |
---|
1797 | 1837 | |
---|
1798 | 1838 | panel.add(new JSeparator()); |
---|
1799 | 1839 | |
---|
.. | .. |
---|
1801 | 1841 | |
---|
1802 | 1842 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1803 | 1843 | |
---|
1804 | | - cGridBag globalSection = new cGridBag().setVertical(true); |
---|
| 1844 | + //cGridBag globalSection = new cGridBag().setVertical(true); |
---|
1805 | 1845 | |
---|
1806 | 1846 | cGridBag camera = new cGridBag(); |
---|
1807 | 1847 | camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints); |
---|
1808 | 1848 | cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1809 | 1849 | camera.add(cameraField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1810 | | - globalSection.add(camera); |
---|
| 1850 | + colorSection.add(camera); |
---|
1811 | 1851 | |
---|
1812 | 1852 | cGridBag ambient = new cGridBag(); |
---|
1813 | 1853 | ambient.add(ambientLabel = new JLabel("Ambient")); // , aConstraints); |
---|
1814 | 1854 | ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1815 | 1855 | ambient.add(ambientField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1816 | | - globalSection.add(ambient); |
---|
| 1856 | + colorSection.add(ambient); |
---|
1817 | 1857 | |
---|
1818 | 1858 | cGridBag backlit = new cGridBag(); |
---|
1819 | 1859 | backlit.add(backlitLabel = new JLabel("Backlit")); // , aConstraints); |
---|
1820 | 1860 | backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1821 | 1861 | backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1822 | | - globalSection.add(backlit); |
---|
| 1862 | + colorSection.add(backlit); |
---|
1823 | 1863 | |
---|
1824 | 1864 | cGridBag opacity = new cGridBag(); |
---|
1825 | 1865 | opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints); |
---|
1826 | 1866 | opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1827 | 1867 | opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1828 | | - globalSection.add(opacity); |
---|
| 1868 | + colorSection.add(opacity); |
---|
1829 | 1869 | |
---|
1830 | | - panel.add(new JSeparator()); |
---|
| 1870 | + //panel.add(new JSeparator()); |
---|
1831 | 1871 | |
---|
1832 | | - panel.add(globalSection); |
---|
| 1872 | + //panel.add(globalSection); |
---|
1833 | 1873 | |
---|
1834 | 1874 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1835 | 1875 | |
---|
.. | .. |
---|
3017 | 3057 | // } |
---|
3018 | 3058 | |
---|
3019 | 3059 | /**/ |
---|
3020 | | - if (deselect) |
---|
| 3060 | + if (deselect || child == null) |
---|
3021 | 3061 | { |
---|
3022 | 3062 | //group.deselectAll(); |
---|
3023 | 3063 | //freeze = true; |
---|
3024 | 3064 | GetTree().clearSelection(); |
---|
3025 | 3065 | //freeze = false; |
---|
| 3066 | + |
---|
| 3067 | + if (child == null) |
---|
| 3068 | + { |
---|
| 3069 | + return; |
---|
| 3070 | + } |
---|
3026 | 3071 | } |
---|
3027 | 3072 | |
---|
3028 | 3073 | //group.addSelectee(child); |
---|
.. | .. |
---|
3523 | 3568 | |
---|
3524 | 3569 | copy.ExtractBigData(hashtable); |
---|
3525 | 3570 | |
---|
| 3571 | + byte[] compress = Compress(copy); |
---|
| 3572 | + |
---|
3526 | 3573 | //EditorFrame.m_MainFrame.requestFocusInWindow(); |
---|
3527 | | - tab.graphs[tab.undoindex++] = Compress(copy); |
---|
| 3574 | + tab.graphs[tab.undoindex++] = compress; |
---|
3528 | 3575 | |
---|
3529 | 3576 | copy.RestoreBigData(hashtable); |
---|
3530 | 3577 | |
---|