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());
....@@ -463,10 +463,11 @@
463463 mainPanel.setResizeWeight(0.5);
464464
465465 //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!"));
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!"));
469469
470
+ mainPanel.setUI(new BasicSplitPaneUI());
470471
471472 //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5));
472473 //mainPanel.setLayout(new GridBagLayout());
....@@ -698,8 +699,8 @@
698699 }
699700 }
700701
701
-static GraphicsDevice device = GraphicsEnvironment
702
- .getLocalGraphicsEnvironment().getScreenDevices()[0];
702
+//static GraphicsDevice device = GraphicsEnvironment
703
+// .getLocalGraphicsEnvironment().getScreenDevices()[0];
703704
704705 Rectangle keeprect;
705706 cRadio radio;
....@@ -720,10 +721,19 @@
720721 void Minimize()
721722 {
722723 frame.setState(Frame.ICONIFIED);
724
+ frame.validate();
723725 }
724726
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={}
725730 void Maximize()
726731 {
732
+ if (CameraPane.FULLSCREEN)
733
+ {
734
+ ToggleFullScreen();
735
+ }
736
+
727737 if (maximized)
728738 {
729739 frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height);
....@@ -731,22 +741,36 @@
731741 else
732742 {
733743 keeprect = frame.getBounds();
734
- Rectangle rect = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds();
735
- Dimension rect2 = frame.getToolkit().getScreenSize();
736
- 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);
737747 // frame.setState(Frame.MAXIMIZED_BOTH);
748
+ frame.setBounds(frame.getGraphicsConfiguration().getBounds());
738749 }
739750
740751 maximized ^= true;
752
+
753
+ frame.validate();
741754 }
755
+
756
+ cButton minButton;
757
+ cButton maxButton;
758
+ cButton fullButton;
742759
743760 void ToggleFullScreen()
744761 {
762
+GraphicsDevice device = frame.getGraphicsConfiguration().getDevice();
763
+
745764 cameraView.ToggleFullScreen();
746765
747766 if (!CameraPane.FULLSCREEN)
748767 {
749768 device.setFullScreenWindow(null);
769
+ frame.dispose();
770
+ frame.setUndecorated(false);
771
+ frame.validate();
772
+ frame.setVisible(true);
773
+
750774 //frame.setVisible(false);
751775 // frame.removeNotify();
752776 // frame.setUndecorated(false);
....@@ -771,7 +795,12 @@
771795 // frame.setBounds(0, 0, frame.getToolkit().getScreenSize().width,
772796 // frame.getToolkit().getScreenSize().height);
773797 //frame.setVisible(false);
798
+
799
+ frame.dispose();
800
+ frame.setUndecorated(true);
774801 device.setFullScreenWindow(frame);
802
+ frame.validate();
803
+ frame.setVisible(true);
775804 // frame.removeNotify();
776805 // frame.setUndecorated(true);
777806 // frame.addNotify();
....@@ -784,6 +813,7 @@
784813 radio.layout.doClick();
785814 //frame.setVisible(true);
786815 }
816
+ frame.validate();
787817 }
788818
789819 private JTextPane createTextPane()
....@@ -1116,7 +1146,7 @@
11161146 namePanel = new cGridBag();
11171147
11181148 nameField = AddText(namePanel, copy.GetName());
1119
- namePanel.add(nameField);
1149
+ namePanel.add(new JScrollPane(nameField, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER));
11201150 oe.ctrlPanel.add(namePanel);
11211151
11221152 oe.ctrlPanel.Return();
....@@ -1141,7 +1171,7 @@
11411171 rewindCB = AddCheckBox(setupPanel2, "Rewind", copy.rewind);
11421172 rewindCB.setToolTipText("Rewind animation");
11431173
1144
- randomCB = AddCheckBox(setupPanel2, "Rand", copy.random);
1174
+ randomCB = AddCheckBox(setupPanel2, "Random", copy.random);
11451175 randomCB.setToolTipText("Randomly Rewind (or Go back and forth)");
11461176
11471177 if (Globals.ADVANCED)
....@@ -1593,12 +1623,13 @@
15931623
15941624 frame.setSize(1280, 860);
15951625
1596
- frame.validate();
1597
- frame.setVisible(true);
1598
-
15991626 cameraView.requestFocusInWindow();
16001627
16011628 gridPanel.setDividerLocation(1.0);
1629
+
1630
+ frame.validate();
1631
+
1632
+ frame.setVisible(true);
16021633
16031634 frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
16041635 frame.addWindowListener(new WindowAdapter()
....@@ -1685,24 +1716,6 @@
16851716 texture.add(textureField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
16861717 colorSection.add(texture);
16871718
1688
- cGridBag anisoU = new cGridBag();
1689
- anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints);
1690
- anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1691
- anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1692
- colorSection.add(anisoU);
1693
-
1694
- cGridBag anisoV = new cGridBag();
1695
- anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints);
1696
- anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1697
- anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1698
- colorSection.add(anisoV);
1699
-
1700
- cGridBag shadowbias = new cGridBag();
1701
- shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints);
1702
- shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1703
- shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1704
- colorSection.add(shadowbias);
1705
-
17061719 panel.add(new JSeparator());
17071720
17081721 panel.add(colorSection);
....@@ -1752,6 +1765,12 @@
17521765 fakedepthLabel.setHorizontalAlignment(SwingConstants.TRAILING);
17531766 fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
17541767 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);
17551774
17561775 panel.add(new JSeparator());
17571776
....@@ -1803,6 +1822,18 @@
18031822 // aConstraints.gridy += 1;
18041823 // aConstraints.gridwidth = 1;
18051824
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
+
18061837
18071838 panel.add(new JSeparator());
18081839
....@@ -1810,35 +1841,35 @@
18101841
18111842 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
18121843
1813
- cGridBag globalSection = new cGridBag().setVertical(true);
1844
+ //cGridBag globalSection = new cGridBag().setVertical(true);
18141845
18151846 cGridBag camera = new cGridBag();
18161847 camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints);
18171848 cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING);
18181849 camera.add(cameraField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1819
- globalSection.add(camera);
1850
+ colorSection.add(camera);
18201851
18211852 cGridBag ambient = new cGridBag();
18221853 ambient.add(ambientLabel = new JLabel("Ambient")); // , aConstraints);
18231854 ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING);
18241855 ambient.add(ambientField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1825
- globalSection.add(ambient);
1856
+ colorSection.add(ambient);
18261857
18271858 cGridBag backlit = new cGridBag();
18281859 backlit.add(backlitLabel = new JLabel("Backlit")); // , aConstraints);
18291860 backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING);
18301861 backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1831
- globalSection.add(backlit);
1862
+ colorSection.add(backlit);
18321863
18331864 cGridBag opacity = new cGridBag();
18341865 opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints);
18351866 opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING);
18361867 opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1837
- globalSection.add(opacity);
1868
+ colorSection.add(opacity);
18381869
1839
- panel.add(new JSeparator());
1870
+ //panel.add(new JSeparator());
18401871
1841
- panel.add(globalSection);
1872
+ //panel.add(globalSection);
18421873
18431874 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
18441875
....@@ -3537,8 +3568,10 @@
35373568
35383569 copy.ExtractBigData(hashtable);
35393570
3571
+ byte[] compress = Compress(copy);
3572
+
35403573 //EditorFrame.m_MainFrame.requestFocusInWindow();
3541
- tab.graphs[tab.undoindex++] = Compress(copy);
3574
+ tab.graphs[tab.undoindex++] = compress;
35423575
35433576 copy.RestoreBigData(hashtable);
35443577