.. | .. |
---|
309 | 309 | //localCopy.parent = null; |
---|
310 | 310 | |
---|
311 | 311 | frame = new JFrame(); |
---|
312 | | - frame.setUndecorated(true); |
---|
| 312 | + frame.setUndecorated(false); |
---|
313 | 313 | objEditor = this; |
---|
314 | 314 | this.callee = callee; |
---|
315 | 315 | |
---|
.. | .. |
---|
350 | 350 | frame.setMenuBar(menuBar = new MenuBar()); |
---|
351 | 351 | menuBar.add(fileMenu = new Menu("File")); |
---|
352 | 352 | fileMenu.add(newItem = new MenuItem("New")); |
---|
353 | | - fileMenu.add(loadItem = new MenuItem("Open...")); |
---|
| 353 | + fileMenu.add(openItem = new MenuItem("Open...")); |
---|
354 | 354 | |
---|
355 | 355 | //oe.menuBar.add(menu = new Menu("Include")); |
---|
356 | 356 | Menu menu = new Menu("Import"); |
---|
.. | .. |
---|
382 | 382 | } |
---|
383 | 383 | |
---|
384 | 384 | newItem.addActionListener(this); |
---|
385 | | - loadItem.addActionListener(this); |
---|
| 385 | + openItem.addActionListener(this); |
---|
386 | 386 | saveItem.addActionListener(this); |
---|
387 | 387 | saveAsItem.addActionListener(this); |
---|
388 | 388 | exportAsItem.addActionListener(this); |
---|
.. | .. |
---|
449 | 449 | // TEXTAREA infoarea.setLineWrap(true); |
---|
450 | 450 | // TEXTAREA infoarea.setWrapStyleWord(true); |
---|
451 | 451 | infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED); |
---|
452 | | - infoPanel.setPreferredSize(new Dimension(50, 200)); |
---|
| 452 | + //infoPanel.setPreferredSize(new Dimension(50, 200)); |
---|
453 | 453 | infoPanel.setName("Info"); |
---|
454 | 454 | //infoPanel.setLayout(new BorderLayout()); |
---|
455 | 455 | //infoPanel.add(createTextPane()); |
---|
.. | .. |
---|
699 | 699 | } |
---|
700 | 700 | } |
---|
701 | 701 | |
---|
702 | | -static GraphicsDevice device = GraphicsEnvironment |
---|
703 | | - .getLocalGraphicsEnvironment().getScreenDevices()[0]; |
---|
| 702 | +//static GraphicsDevice device = GraphicsEnvironment |
---|
| 703 | +// .getLocalGraphicsEnvironment().getScreenDevices()[0]; |
---|
704 | 704 | |
---|
705 | 705 | Rectangle keeprect; |
---|
706 | 706 | cRadio radio; |
---|
.. | .. |
---|
721 | 721 | void Minimize() |
---|
722 | 722 | { |
---|
723 | 723 | frame.setState(Frame.ICONIFIED); |
---|
| 724 | + frame.validate(); |
---|
724 | 725 | } |
---|
725 | 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={} |
---|
726 | 730 | void Maximize() |
---|
727 | 731 | { |
---|
| 732 | + if (CameraPane.FULLSCREEN) |
---|
| 733 | + { |
---|
| 734 | + ToggleFullScreen(); |
---|
| 735 | + } |
---|
| 736 | + |
---|
728 | 737 | if (maximized) |
---|
729 | 738 | { |
---|
730 | 739 | frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height); |
---|
.. | .. |
---|
732 | 741 | else |
---|
733 | 742 | { |
---|
734 | 743 | keeprect = frame.getBounds(); |
---|
735 | | - Rectangle rect = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds(); |
---|
736 | | - Dimension rect2 = frame.getToolkit().getScreenSize(); |
---|
737 | | - 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); |
---|
738 | 747 | // frame.setState(Frame.MAXIMIZED_BOTH); |
---|
| 748 | + frame.setBounds(frame.getGraphicsConfiguration().getBounds()); |
---|
739 | 749 | } |
---|
740 | 750 | |
---|
741 | 751 | maximized ^= true; |
---|
| 752 | + |
---|
| 753 | + frame.validate(); |
---|
742 | 754 | } |
---|
| 755 | + |
---|
| 756 | + cButton minButton; |
---|
| 757 | + cButton maxButton; |
---|
| 758 | + cButton fullButton; |
---|
743 | 759 | |
---|
744 | 760 | void ToggleFullScreen() |
---|
745 | 761 | { |
---|
| 762 | +GraphicsDevice device = frame.getGraphicsConfiguration().getDevice(); |
---|
| 763 | + |
---|
746 | 764 | cameraView.ToggleFullScreen(); |
---|
747 | 765 | |
---|
748 | 766 | if (!CameraPane.FULLSCREEN) |
---|
749 | 767 | { |
---|
750 | 768 | device.setFullScreenWindow(null); |
---|
| 769 | + frame.dispose(); |
---|
| 770 | + frame.setUndecorated(false); |
---|
| 771 | + frame.validate(); |
---|
| 772 | + frame.setVisible(true); |
---|
| 773 | + |
---|
751 | 774 | //frame.setVisible(false); |
---|
752 | 775 | // frame.removeNotify(); |
---|
753 | 776 | // frame.setUndecorated(false); |
---|
.. | .. |
---|
757 | 780 | // X frame.getContentPane().remove(/*"Center",*/bigThree); |
---|
758 | 781 | // X framePanel.add(bigThree); |
---|
759 | 782 | // X frame.getContentPane().add(/*"Center",*/framePanel); |
---|
760 | | - framePanel.setDividerLocation(1); |
---|
| 783 | + framePanel.setDividerLocation(46); |
---|
761 | 784 | |
---|
762 | 785 | //frame.setVisible(true); |
---|
763 | 786 | radio.layout = keepButton; |
---|
.. | .. |
---|
772 | 795 | // frame.setBounds(0, 0, frame.getToolkit().getScreenSize().width, |
---|
773 | 796 | // frame.getToolkit().getScreenSize().height); |
---|
774 | 797 | //frame.setVisible(false); |
---|
| 798 | + |
---|
| 799 | + frame.dispose(); |
---|
| 800 | + frame.setUndecorated(true); |
---|
775 | 801 | device.setFullScreenWindow(frame); |
---|
| 802 | + frame.validate(); |
---|
| 803 | + frame.setVisible(true); |
---|
776 | 804 | // frame.removeNotify(); |
---|
777 | 805 | // frame.setUndecorated(true); |
---|
778 | 806 | // frame.addNotify(); |
---|
.. | .. |
---|
785 | 813 | radio.layout.doClick(); |
---|
786 | 814 | //frame.setVisible(true); |
---|
787 | 815 | } |
---|
| 816 | + frame.validate(); |
---|
788 | 817 | } |
---|
789 | 818 | |
---|
790 | 819 | private JTextPane createTextPane() |
---|
.. | .. |
---|
1117 | 1146 | namePanel = new cGridBag(); |
---|
1118 | 1147 | |
---|
1119 | 1148 | nameField = AddText(namePanel, copy.GetName()); |
---|
1120 | | - namePanel.add(nameField); |
---|
| 1149 | + namePanel.add(new JScrollPane(nameField, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER)); |
---|
1121 | 1150 | oe.ctrlPanel.add(namePanel); |
---|
1122 | 1151 | |
---|
1123 | 1152 | oe.ctrlPanel.Return(); |
---|
.. | .. |
---|
1142 | 1171 | rewindCB = AddCheckBox(setupPanel2, "Rewind", copy.rewind); |
---|
1143 | 1172 | rewindCB.setToolTipText("Rewind animation"); |
---|
1144 | 1173 | |
---|
1145 | | - randomCB = AddCheckBox(setupPanel2, "Rand", copy.random); |
---|
| 1174 | + randomCB = AddCheckBox(setupPanel2, "Random", copy.random); |
---|
1146 | 1175 | randomCB.setToolTipText("Randomly Rewind (or Go back and forth)"); |
---|
1147 | 1176 | |
---|
1148 | 1177 | if (Globals.ADVANCED) |
---|
.. | .. |
---|
1464 | 1493 | // north.add(ctrlPanel, BorderLayout.NORTH); |
---|
1465 | 1494 | // objectPanel.add(north); |
---|
1466 | 1495 | objectPanel.add(editPanel); |
---|
1467 | | - objectPanel.add(infoPanel); |
---|
| 1496 | + |
---|
| 1497 | + if (Globals.ADVANCED) |
---|
| 1498 | + objectPanel.add(infoPanel); |
---|
| 1499 | + |
---|
1468 | 1500 | objectPanel.add(toolboxPanel); |
---|
1469 | 1501 | |
---|
1470 | 1502 | /* |
---|
.. | .. |
---|
1573 | 1605 | // aConstraints.gridheight = 1; |
---|
1574 | 1606 | |
---|
1575 | 1607 | framePanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, toolbarPanel, bigThree); |
---|
1576 | | - framePanel.setContinuousLayout(true); |
---|
1577 | | - framePanel.setOneTouchExpandable(true); |
---|
1578 | | - framePanel.setDividerLocation(0.8); |
---|
| 1608 | + framePanel.setContinuousLayout(false); |
---|
| 1609 | + framePanel.setOneTouchExpandable(false); |
---|
| 1610 | + //.setDividerLocation(0.8); |
---|
1579 | 1611 | //framePanel.setDividerSize(15); |
---|
1580 | 1612 | //framePanel.setResizeWeight(0.15); |
---|
1581 | 1613 | framePanel.setName("Frame"); |
---|
.. | .. |
---|
1594 | 1626 | |
---|
1595 | 1627 | frame.setSize(1280, 860); |
---|
1596 | 1628 | |
---|
1597 | | - frame.validate(); |
---|
1598 | | - frame.setVisible(true); |
---|
1599 | | - |
---|
1600 | 1629 | cameraView.requestFocusInWindow(); |
---|
1601 | 1630 | |
---|
1602 | 1631 | gridPanel.setDividerLocation(1.0); |
---|
| 1632 | + |
---|
| 1633 | + frame.validate(); |
---|
| 1634 | + |
---|
| 1635 | + frame.setVisible(true); |
---|
1603 | 1636 | |
---|
1604 | 1637 | frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); |
---|
1605 | 1638 | frame.addWindowListener(new WindowAdapter() |
---|
.. | .. |
---|
1686 | 1719 | texture.add(textureField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1687 | 1720 | colorSection.add(texture); |
---|
1688 | 1721 | |
---|
1689 | | - cGridBag anisoU = new cGridBag(); |
---|
1690 | | - anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints); |
---|
1691 | | - anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1692 | | - anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1693 | | - colorSection.add(anisoU); |
---|
1694 | | - |
---|
1695 | | - cGridBag anisoV = new cGridBag(); |
---|
1696 | | - anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints); |
---|
1697 | | - anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1698 | | - anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1699 | | - colorSection.add(anisoV); |
---|
1700 | | - |
---|
1701 | | - cGridBag shadowbias = new cGridBag(); |
---|
1702 | | - shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints); |
---|
1703 | | - shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1704 | | - shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1705 | | - colorSection.add(shadowbias); |
---|
1706 | | - |
---|
1707 | 1722 | panel.add(new JSeparator()); |
---|
1708 | 1723 | |
---|
1709 | 1724 | panel.add(colorSection); |
---|
.. | .. |
---|
1753 | 1768 | fakedepthLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1754 | 1769 | fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1755 | 1770 | diffuseSection.add(fakedepth); |
---|
| 1771 | + |
---|
| 1772 | + cGridBag shadowbias = new cGridBag(); |
---|
| 1773 | + shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints); |
---|
| 1774 | + shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1775 | + shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1776 | + diffuseSection.add(shadowbias); |
---|
1756 | 1777 | |
---|
1757 | 1778 | panel.add(new JSeparator()); |
---|
1758 | 1779 | |
---|
.. | .. |
---|
1804 | 1825 | // aConstraints.gridy += 1; |
---|
1805 | 1826 | // aConstraints.gridwidth = 1; |
---|
1806 | 1827 | |
---|
| 1828 | + cGridBag anisoU = new cGridBag(); |
---|
| 1829 | + anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints); |
---|
| 1830 | + anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1831 | + anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1832 | + specularSection.add(anisoU); |
---|
| 1833 | + |
---|
| 1834 | + cGridBag anisoV = new cGridBag(); |
---|
| 1835 | + anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints); |
---|
| 1836 | + anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1837 | + anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1838 | + specularSection.add(anisoV); |
---|
| 1839 | + |
---|
1807 | 1840 | |
---|
1808 | 1841 | panel.add(new JSeparator()); |
---|
1809 | 1842 | |
---|
.. | .. |
---|
1811 | 1844 | |
---|
1812 | 1845 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1813 | 1846 | |
---|
1814 | | - cGridBag globalSection = new cGridBag().setVertical(true); |
---|
| 1847 | + //cGridBag globalSection = new cGridBag().setVertical(true); |
---|
1815 | 1848 | |
---|
1816 | 1849 | cGridBag camera = new cGridBag(); |
---|
1817 | 1850 | camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints); |
---|
1818 | 1851 | cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1819 | 1852 | camera.add(cameraField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1820 | | - globalSection.add(camera); |
---|
| 1853 | + colorSection.add(camera); |
---|
1821 | 1854 | |
---|
1822 | 1855 | cGridBag ambient = new cGridBag(); |
---|
1823 | 1856 | ambient.add(ambientLabel = new JLabel("Ambient")); // , aConstraints); |
---|
1824 | 1857 | ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1825 | 1858 | ambient.add(ambientField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1826 | | - globalSection.add(ambient); |
---|
| 1859 | + colorSection.add(ambient); |
---|
1827 | 1860 | |
---|
1828 | 1861 | cGridBag backlit = new cGridBag(); |
---|
1829 | 1862 | backlit.add(backlitLabel = new JLabel("Backlit")); // , aConstraints); |
---|
1830 | 1863 | backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1831 | 1864 | backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1832 | | - globalSection.add(backlit); |
---|
| 1865 | + colorSection.add(backlit); |
---|
1833 | 1866 | |
---|
1834 | 1867 | cGridBag opacity = new cGridBag(); |
---|
1835 | 1868 | opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints); |
---|
1836 | 1869 | opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1837 | 1870 | opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1838 | | - globalSection.add(opacity); |
---|
| 1871 | + colorSection.add(opacity); |
---|
1839 | 1872 | |
---|
1840 | | - panel.add(new JSeparator()); |
---|
| 1873 | + //panel.add(new JSeparator()); |
---|
1841 | 1874 | |
---|
1842 | | - panel.add(globalSection); |
---|
| 1875 | + //panel.add(globalSection); |
---|
1843 | 1876 | |
---|
1844 | 1877 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1845 | 1878 | |
---|
.. | .. |
---|
3168 | 3201 | { |
---|
3169 | 3202 | ToggleAnimation(); |
---|
3170 | 3203 | return; |
---|
| 3204 | + } else if (event.getSource() == archiveItem) |
---|
| 3205 | + { |
---|
| 3206 | + cTools.Archive(frame); |
---|
| 3207 | + return; |
---|
3171 | 3208 | } else if (event.getSource() == flipVCB) |
---|
3172 | 3209 | { |
---|
3173 | 3210 | copy.flipV ^= true; |
---|
.. | .. |
---|
3361 | 3398 | { |
---|
3362 | 3399 | Close(); |
---|
3363 | 3400 | //return true; |
---|
3364 | | - } else if (source == loadItem) |
---|
| 3401 | + } else if (source == openItem) |
---|
3365 | 3402 | { |
---|
3366 | | - load(); |
---|
| 3403 | + Open(); |
---|
3367 | 3404 | //return true; |
---|
3368 | 3405 | } else if (source == newItem) |
---|
3369 | 3406 | { |
---|
.. | .. |
---|
3538 | 3575 | |
---|
3539 | 3576 | copy.ExtractBigData(hashtable); |
---|
3540 | 3577 | |
---|
| 3578 | + byte[] compress = Compress(copy); |
---|
| 3579 | + |
---|
3541 | 3580 | //EditorFrame.m_MainFrame.requestFocusInWindow(); |
---|
3542 | | - tab.graphs[tab.undoindex++] = Compress(copy); |
---|
| 3581 | + tab.graphs[tab.undoindex++] = compress; |
---|
3543 | 3582 | |
---|
3544 | 3583 | copy.RestoreBigData(hashtable); |
---|
3545 | 3584 | |
---|
.. | .. |
---|
4688 | 4727 | } |
---|
4689 | 4728 | } |
---|
4690 | 4729 | |
---|
4691 | | - void load() // throws ClassNotFoundException |
---|
| 4730 | + void Open() // throws ClassNotFoundException |
---|
4692 | 4731 | { |
---|
4693 | 4732 | if (Grafreed.standAlone) |
---|
4694 | 4733 | { |
---|
.. | .. |
---|
4973 | 5012 | MenuBar menuBar; |
---|
4974 | 5013 | Menu fileMenu; |
---|
4975 | 5014 | MenuItem newItem; |
---|
4976 | | - MenuItem loadItem; |
---|
| 5015 | + MenuItem openItem; |
---|
4977 | 5016 | MenuItem saveItem; |
---|
4978 | 5017 | MenuItem saveAsItem; |
---|
4979 | 5018 | MenuItem exportAsItem; |
---|
.. | .. |
---|
4996 | 5035 | CheckboxMenuItem toggleSwitchItem; |
---|
4997 | 5036 | CheckboxMenuItem toggleRootItem; |
---|
4998 | 5037 | CheckboxMenuItem animationItem; |
---|
| 5038 | + CheckboxMenuItem archiveItem; |
---|
4999 | 5039 | CheckboxMenuItem toggleHandleItem; |
---|
5000 | 5040 | CheckboxMenuItem togglePaintItem; |
---|
5001 | 5041 | JSplitPane mainPanel; |
---|