From a69bb4474a3264a9a7a7f8b8d8154ea771f167c8 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Fri, 28 Jun 2019 23:44:22 -0400 Subject: [PATCH] Fix ungroup. --- ObjEditor.java | 86 +++++++++++++++++++++++++++---------------- 1 files changed, 54 insertions(+), 32 deletions(-) diff --git a/ObjEditor.java b/ObjEditor.java index ef7c93d..b7cf47d 100644 --- a/ObjEditor.java +++ b/ObjEditor.java @@ -449,7 +449,7 @@ // TEXTAREA infoarea.setLineWrap(true); // TEXTAREA infoarea.setWrapStyleWord(true); infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED); - infoPanel.setPreferredSize(new Dimension(50, 200)); + //infoPanel.setPreferredSize(new Dimension(50, 200)); infoPanel.setName("Info"); //infoPanel.setLayout(new BorderLayout()); //infoPanel.add(createTextPane()); @@ -463,10 +463,11 @@ mainPanel.setResizeWeight(0.5); //mainPanel.setDividerSize((int) (mainPanel.getDividerSize() * 1.5)); -// BasicSplitPaneDivider divider = ( (BasicSplitPaneUI) mainPanel.getUI()).getDivider(); -// divider.setDividerSize(15); -// divider.setBorder(BorderFactory.createTitledBorder(divider.getBorder(), "Custom border title -- gets rid of the one-touch arrows!")); + BasicSplitPaneDivider divider = ( (BasicSplitPaneUI) mainPanel.getUI()).getDivider(); + divider.setDividerSize(15); + divider.setBorder(BorderFactory.createTitledBorder(divider.getBorder(), "Custom border title -- gets rid of the one-touch arrows!")); + mainPanel.setUI(new BasicSplitPaneUI()); //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5)); //mainPanel.setLayout(new GridBagLayout()); @@ -720,10 +721,19 @@ void Minimize() { frame.setState(Frame.ICONIFIED); + frame.validate(); } +// artifactURI=null, type=0, property=${file.reference.jfxrt.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@6767876f, broken=false, additional={} +// artifactURI=null, type=0, property=${file.reference.mac-ui.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@16bdc817, broken=false, additional={} +// artifactURI=null, type=0, property=${file.reference.classes.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@9daa9c17, broken=false, additional={} void Maximize() { + if (CameraPane.FULLSCREEN) + { + ToggleFullScreen(); + } + if (maximized) { frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height); @@ -738,7 +748,13 @@ } maximized ^= true; + + frame.validate(); } + + cButton minButton; + cButton maxButton; + cButton fullButton; void ToggleFullScreen() { @@ -747,6 +763,8 @@ if (!CameraPane.FULLSCREEN) { device.setFullScreenWindow(null); + frame.validate(); + //frame.setVisible(false); // frame.removeNotify(); // frame.setUndecorated(false); @@ -772,6 +790,7 @@ // frame.getToolkit().getScreenSize().height); //frame.setVisible(false); device.setFullScreenWindow(frame); + frame.validate(); // frame.removeNotify(); // frame.setUndecorated(true); // frame.addNotify(); @@ -784,6 +803,7 @@ radio.layout.doClick(); //frame.setVisible(true); } + frame.validate(); } private JTextPane createTextPane() @@ -1116,7 +1136,7 @@ namePanel = new cGridBag(); nameField = AddText(namePanel, copy.GetName()); - namePanel.add(nameField); + namePanel.add(new JScrollPane(nameField, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER)); oe.ctrlPanel.add(namePanel); oe.ctrlPanel.Return(); @@ -1141,7 +1161,7 @@ rewindCB = AddCheckBox(setupPanel2, "Rewind", copy.rewind); rewindCB.setToolTipText("Rewind animation"); - randomCB = AddCheckBox(setupPanel2, "Rand", copy.random); + randomCB = AddCheckBox(setupPanel2, "Random", copy.random); randomCB.setToolTipText("Randomly Rewind (or Go back and forth)"); if (Globals.ADVANCED) @@ -1685,24 +1705,6 @@ texture.add(textureField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); colorSection.add(texture); - cGridBag anisoU = new cGridBag(); - anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints); - anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); - anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); - colorSection.add(anisoU); - - cGridBag anisoV = new cGridBag(); - anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints); - anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); - anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); - colorSection.add(anisoV); - - cGridBag shadowbias = new cGridBag(); - shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints); - shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); - shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); - colorSection.add(shadowbias); - panel.add(new JSeparator()); panel.add(colorSection); @@ -1752,6 +1754,12 @@ fakedepthLabel.setHorizontalAlignment(SwingConstants.TRAILING); fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); diffuseSection.add(fakedepth); + + cGridBag shadowbias = new cGridBag(); + shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints); + shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); + shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); + diffuseSection.add(shadowbias); panel.add(new JSeparator()); @@ -1803,6 +1811,18 @@ // aConstraints.gridy += 1; // aConstraints.gridwidth = 1; + cGridBag anisoU = new cGridBag(); + anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints); + anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); + anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); + specularSection.add(anisoU); + + cGridBag anisoV = new cGridBag(); + anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints); + anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); + anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); + specularSection.add(anisoV); + panel.add(new JSeparator()); @@ -1810,35 +1830,35 @@ //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); - cGridBag globalSection = new cGridBag().setVertical(true); + //cGridBag globalSection = new cGridBag().setVertical(true); cGridBag camera = new cGridBag(); camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints); cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING); camera.add(cameraField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); - globalSection.add(camera); + colorSection.add(camera); cGridBag ambient = new cGridBag(); ambient.add(ambientLabel = new JLabel("Ambient")); // , aConstraints); ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING); ambient.add(ambientField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); - globalSection.add(ambient); + colorSection.add(ambient); cGridBag backlit = new cGridBag(); backlit.add(backlitLabel = new JLabel("Backlit")); // , aConstraints); backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING); backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); - globalSection.add(backlit); + colorSection.add(backlit); cGridBag opacity = new cGridBag(); opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints); opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING); opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); - globalSection.add(opacity); + colorSection.add(opacity); - panel.add(new JSeparator()); + //panel.add(new JSeparator()); - panel.add(globalSection); + //panel.add(globalSection); //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); @@ -3537,8 +3557,10 @@ copy.ExtractBigData(hashtable); + byte[] compress = Compress(copy); + //EditorFrame.m_MainFrame.requestFocusInWindow(); - tab.graphs[tab.undoindex++] = Compress(copy); + tab.graphs[tab.undoindex++] = compress; copy.RestoreBigData(hashtable); -- Gitblit v1.6.2