- fix NiftyGUI reshape.. still problems

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8101 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 14 years ago
parent 578c92affc
commit e2a822fc48
  1. 6
      sdk/jme3-gui/src/com/jme3/gde/gui/multiview/NiftyJmeDisplay.java
  2. 10
      sdk/jme3-gui/src/com/jme3/gde/gui/multiview/NiftyPreviewPanel.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

@ -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<Object>() {

Loading…
Cancel
Save