From e2a822fc482a5609255797ea7cca1593c592b7b3 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Thu, 25 Aug 2011 23:15:24 +0000 Subject: [PATCH] SDK: - fix NiftyGUI reshape.. still problems git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8101 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../com/jme3/gde/gui/multiview/NiftyJmeDisplay.java | 6 +----- .../com/jme3/gde/gui/multiview/NiftyPreviewPanel.java | 10 +++++++++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/NiftyJmeDisplay.java b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/NiftyJmeDisplay.java index 6d43d3b1a..4c6a40795 100644 --- a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/NiftyJmeDisplay.java +++ b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/NiftyJmeDisplay.java @@ -34,8 +34,6 @@ package com.jme3.gde.gui.multiview; import com.jme3.asset.AssetManager; import com.jme3.audio.AudioRenderer; -import com.jme3.gde.core.scene.SceneApplication; -import com.jme3.niftygui.InputSystemJme; import com.jme3.niftygui.RenderDeviceJme; import com.jme3.niftygui.SoundDeviceJme; import com.jme3.post.SceneProcessor; @@ -55,8 +53,6 @@ public class NiftyJmeDisplay extends com.jme3.niftygui.NiftyJmeDisplay implement AudioRenderer audioRenderer, ViewPort vp){ this.assetManager = assetManager; - //FIXME: needed, else npe - this.inputSys = new InputSystemJme(SceneApplication.getApplication().getInputManager()); w = vp.getCamera().getWidth(); h = vp.getCamera().getHeight(); @@ -109,7 +105,7 @@ public class NiftyJmeDisplay extends com.jme3.niftygui.NiftyJmeDisplay implement public void reshape(ViewPort vp, int w, int h) { this.w = w; this.h = h; - super.reshape(vp,w,h); + nifty.resolutionChanged(); } @Override diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/NiftyPreviewPanel.java b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/NiftyPreviewPanel.java index 4b0fb3831..49fb9b849 100644 --- a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/NiftyPreviewPanel.java +++ b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/NiftyPreviewPanel.java @@ -4,7 +4,6 @@ */ package com.jme3.gde.gui.multiview; -import com.jme3.asset.AssetManager; import com.jme3.audio.AudioRenderer; import com.jme3.gde.core.assets.ProjectAssetManager; import com.jme3.gde.core.scene.OffScenePanel; @@ -32,11 +31,15 @@ import javax.swing.JToolBar; import org.netbeans.modules.xml.multiview.Error; import org.netbeans.modules.xml.multiview.ui.PanelView; import org.netbeans.modules.xml.multiview.ui.ToolBarDesignEditor; +import org.openide.DialogDisplayer; +import org.openide.NotifyDescriptor; +import org.openide.NotifyDescriptor.Message; import org.openide.nodes.Node; import org.openide.util.Exceptions; import org.openide.xml.XMLUtil; import org.w3c.dom.Document; import org.xml.sax.InputSource; +import uk.co.mandolane.midi.e; /** * @@ -124,7 +127,12 @@ public class NiftyPreviewPanel extends PanelView { setRoot(rootContext); comp.setRootContext(rootContext); } catch (Exception ex) { + Message msg = new NotifyDescriptor.Message( + "Error parsing File:" + ex, + NotifyDescriptor.ERROR_MESSAGE); + DialogDisplayer.getDefault().notifyLater(msg); Exceptions.printStackTrace(ex); + return; } SceneApplication.getApplication().enqueue(new Callable() {