Normand Briere
2019-06-30 cfd7a643cb5a445016ddb15595158ecc59b184fd
ObjEditor.java
....@@ -309,7 +309,7 @@
309309 //localCopy.parent = null;
310310
311311 frame = new JFrame();
312
- frame.setUndecorated(true);
312
+ frame.setUndecorated(false);
313313 objEditor = this;
314314 this.callee = callee;
315315
....@@ -449,7 +449,7 @@
449449 // TEXTAREA infoarea.setLineWrap(true);
450450 // TEXTAREA infoarea.setWrapStyleWord(true);
451451 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));
453453 infoPanel.setName("Info");
454454 //infoPanel.setLayout(new BorderLayout());
455455 //infoPanel.add(createTextPane());
....@@ -699,8 +699,8 @@
699699 }
700700 }
701701
702
-static GraphicsDevice device = GraphicsEnvironment
703
- .getLocalGraphicsEnvironment().getScreenDevices()[0];
702
+//static GraphicsDevice device = GraphicsEnvironment
703
+// .getLocalGraphicsEnvironment().getScreenDevices()[0];
704704
705705 Rectangle keeprect;
706706 cRadio radio;
....@@ -721,10 +721,19 @@
721721 void Minimize()
722722 {
723723 frame.setState(Frame.ICONIFIED);
724
+ frame.validate();
724725 }
725726
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={}
726730 void Maximize()
727731 {
732
+ if (CameraPane.FULLSCREEN)
733
+ {
734
+ ToggleFullScreen();
735
+ }
736
+
728737 if (maximized)
729738 {
730739 frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height);
....@@ -732,22 +741,36 @@
732741 else
733742 {
734743 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);
738747 // frame.setState(Frame.MAXIMIZED_BOTH);
748
+ frame.setBounds(frame.getGraphicsConfiguration().getBounds());
739749 }
740750
741751 maximized ^= true;
752
+
753
+ frame.validate();
742754 }
755
+
756
+ cButton minButton;
757
+ cButton maxButton;
758
+ cButton fullButton;
743759
744760 void ToggleFullScreen()
745761 {
762
+GraphicsDevice device = frame.getGraphicsConfiguration().getDevice();
763
+
746764 cameraView.ToggleFullScreen();
747765
748766 if (!CameraPane.FULLSCREEN)
749767 {
750768 device.setFullScreenWindow(null);
769
+ frame.dispose();
770
+ frame.setUndecorated(false);
771
+ frame.validate();
772
+ frame.setVisible(true);
773
+
751774 //frame.setVisible(false);
752775 // frame.removeNotify();
753776 // frame.setUndecorated(false);
....@@ -772,7 +795,12 @@
772795 // frame.setBounds(0, 0, frame.getToolkit().getScreenSize().width,
773796 // frame.getToolkit().getScreenSize().height);
774797 //frame.setVisible(false);
798
+
799
+ frame.dispose();
800
+ frame.setUndecorated(true);
775801 device.setFullScreenWindow(frame);
802
+ frame.validate();
803
+ frame.setVisible(true);
776804 // frame.removeNotify();
777805 // frame.setUndecorated(true);
778806 // frame.addNotify();
....@@ -785,6 +813,7 @@
785813 radio.layout.doClick();
786814 //frame.setVisible(true);
787815 }
816
+ frame.validate();
788817 }
789818
790819 private JTextPane createTextPane()
....@@ -1117,7 +1146,7 @@
11171146 namePanel = new cGridBag();
11181147
11191148 nameField = AddText(namePanel, copy.GetName());
1120
- namePanel.add(nameField);
1149
+ namePanel.add(new JScrollPane(nameField, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER));
11211150 oe.ctrlPanel.add(namePanel);
11221151
11231152 oe.ctrlPanel.Return();
....@@ -1142,7 +1171,7 @@
11421171 rewindCB = AddCheckBox(setupPanel2, "Rewind", copy.rewind);
11431172 rewindCB.setToolTipText("Rewind animation");
11441173
1145
- randomCB = AddCheckBox(setupPanel2, "Rand", copy.random);
1174
+ randomCB = AddCheckBox(setupPanel2, "Random", copy.random);
11461175 randomCB.setToolTipText("Randomly Rewind (or Go back and forth)");
11471176
11481177 if (Globals.ADVANCED)
....@@ -1594,12 +1623,13 @@
15941623
15951624 frame.setSize(1280, 860);
15961625
1597
- frame.validate();
1598
- frame.setVisible(true);
1599
-
16001626 cameraView.requestFocusInWindow();
16011627
16021628 gridPanel.setDividerLocation(1.0);
1629
+
1630
+ frame.validate();
1631
+
1632
+ frame.setVisible(true);
16031633
16041634 frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
16051635 frame.addWindowListener(new WindowAdapter()
....@@ -1686,24 +1716,6 @@
16861716 texture.add(textureField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
16871717 colorSection.add(texture);
16881718
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
-
17071719 panel.add(new JSeparator());
17081720
17091721 panel.add(colorSection);
....@@ -1753,6 +1765,12 @@
17531765 fakedepthLabel.setHorizontalAlignment(SwingConstants.TRAILING);
17541766 fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
17551767 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);
17561774
17571775 panel.add(new JSeparator());
17581776
....@@ -1804,6 +1822,18 @@
18041822 // aConstraints.gridy += 1;
18051823 // aConstraints.gridwidth = 1;
18061824
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
+
18071837
18081838 panel.add(new JSeparator());
18091839
....@@ -1811,35 +1841,35 @@
18111841
18121842 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
18131843
1814
- cGridBag globalSection = new cGridBag().setVertical(true);
1844
+ //cGridBag globalSection = new cGridBag().setVertical(true);
18151845
18161846 cGridBag camera = new cGridBag();
18171847 camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints);
18181848 cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING);
18191849 camera.add(cameraField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1820
- globalSection.add(camera);
1850
+ colorSection.add(camera);
18211851
18221852 cGridBag ambient = new cGridBag();
18231853 ambient.add(ambientLabel = new JLabel("Ambient")); // , aConstraints);
18241854 ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING);
18251855 ambient.add(ambientField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1826
- globalSection.add(ambient);
1856
+ colorSection.add(ambient);
18271857
18281858 cGridBag backlit = new cGridBag();
18291859 backlit.add(backlitLabel = new JLabel("Backlit")); // , aConstraints);
18301860 backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING);
18311861 backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1832
- globalSection.add(backlit);
1862
+ colorSection.add(backlit);
18331863
18341864 cGridBag opacity = new cGridBag();
18351865 opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints);
18361866 opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING);
18371867 opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1838
- globalSection.add(opacity);
1868
+ colorSection.add(opacity);
18391869
1840
- panel.add(new JSeparator());
1870
+ //panel.add(new JSeparator());
18411871
1842
- panel.add(globalSection);
1872
+ //panel.add(globalSection);
18431873
18441874 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
18451875
....@@ -3538,8 +3568,10 @@
35383568
35393569 copy.ExtractBigData(hashtable);
35403570
3571
+ byte[] compress = Compress(copy);
3572
+
35413573 //EditorFrame.m_MainFrame.requestFocusInWindow();
3542
- tab.graphs[tab.undoindex++] = Compress(copy);
3574
+ tab.graphs[tab.undoindex++] = compress;
35433575
35443576 copy.RestoreBigData(hashtable);
35453577