- Fix NiftyGUI editor build
- Attempt at making NiftyEditor work
experimental
Normen Hansen 10 years ago
parent 5a222f1541
commit d4a04b9808
  1. 16
      sdk/jme3-gui/build.xml
  2. 12
      sdk/jme3-gui/manifest.mf
  3. 90
      sdk/jme3-gui/nbproject/build-impl.xml
  4. 8
      sdk/jme3-gui/nbproject/genfiles.properties
  5. 16
      sdk/jme3-gui/nbproject/project.properties
  6. 63
      sdk/jme3-gui/nbproject/project.xml
  7. BIN
      sdk/jme3-gui/release/modules/ext/Nifty-Editor0.5.7.jar
  8. BIN
      sdk/jme3-gui/release/modules/ext/Nifty-Editor0.5.9.jar
  9. BIN
      sdk/jme3-gui/release/modules/ext/guava-16.0.1.jar
  10. BIN
      sdk/jme3-gui/release/modules/ext/jTatoo.jar
  11. BIN
      sdk/jme3-gui/release/modules/ext/javassist.jar
  12. BIN
      sdk/jme3-gui/release/modules/ext/nifty-java2d-renderer-1.4.0-SNAPSHOT.jar
  13. BIN
      sdk/jme3-gui/release/modules/ext/reflections-0.9.9-RC1.jar
  14. BIN
      sdk/jme3-gui/release/modules/ext/relaxngDatatype-1.5.jar
  15. BIN
      sdk/jme3-gui/release/modules/ext/slf4j-simple-1.7.7.jar
  16. BIN
      sdk/jme3-gui/release/modules/ext/xsom-20110101-SNAPSHOT.jar
  17. 41
      sdk/jme3-gui/src/com/jme3/gde/gui/view/NiftyGuiVisualElement.java

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
<!-- for some information on what you could do (e.g. targets to override). -->
<!-- If you delete this file and reopen the project it will be recreated. -->
<project name="com.jme3.gde.gui" default="netbeans" basedir=".">
<description>Builds, tests, and runs the project com.jme3.gde.gui.</description>
<import file="nbproject/build-impl.xml"/>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
<!-- for some information on what you could do (e.g. targets to override). -->
<!-- If you delete this file and reopen the project it will be recreated. -->
<project name="com.jme3.gde.gui" default="netbeans" basedir=".">
<description>Builds, tests, and runs the project com.jme3.gde.gui.</description>
<import file="nbproject/build-impl.xml"/>
</project>

@ -1,6 +1,6 @@
Manifest-Version: 1.0
OpenIDE-Module: com.jme3.gde.gui/3
OpenIDE-Module-Implementation-Version: 0
OpenIDE-Module-Layer: com/jme3/gde/gui/layer.xml
OpenIDE-Module-Localizing-Bundle: com/jme3/gde/gui/Bundle.properties
Manifest-Version: 1.0
OpenIDE-Module: com.jme3.gde.gui/3
OpenIDE-Module-Implementation-Version: 0
OpenIDE-Module-Layer: com/jme3/gde/gui/layer.xml
OpenIDE-Module-Localizing-Bundle: com/jme3/gde/gui/Bundle.properties

@ -1,45 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
*** GENERATED FROM project.xml - DO NOT EDIT ***
*** EDIT ../build.xml INSTEAD ***
-->
<project name="com.jme3.gde.gui-impl" basedir="..">
<fail message="Please build using Ant 1.7.1 or higher.">
<condition>
<not>
<antversion atleast="1.7.1"/>
</not>
</condition>
</fail>
<property file="nbproject/private/suite-private.properties"/>
<property file="nbproject/suite.properties"/>
<fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
<property file="${suite.dir}/nbproject/private/platform-private.properties"/>
<property file="${suite.dir}/nbproject/platform.properties"/>
<macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
<attribute name="name"/>
<attribute name="value"/>
<sequential>
<property name="@{name}" value="${@{value}}"/>
</sequential>
</macrodef>
<macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2">
<attribute name="property"/>
<attribute name="value"/>
<sequential>
<property name="@{property}" value="@{value}"/>
</sequential>
</macrodef>
<property file="${user.properties.file}"/>
<nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
<nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
<nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
<fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
<condition>
<not>
<contains string="${cluster.path.evaluated}" substring="platform"/>
</not>
</condition>
</fail>
<import file="${harness.dir}/build.xml"/>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<!--
*** GENERATED FROM project.xml - DO NOT EDIT ***
*** EDIT ../build.xml INSTEAD ***
-->
<project name="com.jme3.gde.gui-impl" basedir="..">
<fail message="Please build using Ant 1.7.1 or higher.">
<condition>
<not>
<antversion atleast="1.7.1"/>
</not>
</condition>
</fail>
<property file="nbproject/private/suite-private.properties"/>
<property file="nbproject/suite.properties"/>
<fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
<property file="${suite.dir}/nbproject/private/platform-private.properties"/>
<property file="${suite.dir}/nbproject/platform.properties"/>
<macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
<attribute name="name"/>
<attribute name="value"/>
<sequential>
<property name="@{name}" value="${@{value}}"/>
</sequential>
</macrodef>
<macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2">
<attribute name="property"/>
<attribute name="value"/>
<sequential>
<property name="@{property}" value="@{value}"/>
</sequential>
</macrodef>
<property file="${user.properties.file}"/>
<nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
<nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
<nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
<fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
<condition>
<not>
<contains string="${cluster.path.evaluated}" substring="platform"/>
</not>
</condition>
</fail>
<import file="${harness.dir}/build.xml"/>
</project>

@ -8,12 +8,12 @@ nbproject/build-impl.xml.data.CRC32=971927a9
nbproject/build-impl.xml.script.CRC32=55a34aaf
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.66.1
=======
build.xml.data.CRC32=d998e9a1
build.xml.data.CRC32=db539353
build.xml.script.CRC32=a0136781
build.xml.stylesheet.CRC32=a56c6a5b@2.56.1
build.xml.stylesheet.CRC32=a56c6a5b@2.66.1
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=d998e9a1
nbproject/build-impl.xml.data.CRC32=db539353
nbproject/build-impl.xml.script.CRC32=55a34aaf
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.56.1
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.66.1
>>>>>>> experimental

@ -1,8 +1,18 @@
file.reference.guava-16.0.1.jar=release/modules/ext/guava-16.0.1.jar
file.reference.javassist.jar=release/modules/ext/javassist.jar
file.reference.jTatoo.jar=release/modules/ext/jTatoo.jar
file.reference.Nifty-Editor0.5.7.jar=release/modules/ext/Nifty-Editor0.5.7.jar
file.reference.nifty-java2d-renderer-1.4.0-SNAPSHOT.jar=release/modules/ext/nifty-java2d-renderer-1.4.0-SNAPSHOT.jar
file.reference.reflections-0.9.9-RC1.jar=release/modules/ext/reflections-0.9.9-RC1.jar
file.reference.relaxngDatatype-1.5.jar=release/modules/ext/relaxngDatatype-1.5.jar
file.reference.slf4j-simple-1.7.7.jar=release/modules/ext/slf4j-simple-1.7.7.jar
file.reference.swingtonifty.jar=release/modules/ext/swingtonifty.jar
file.reference.xsom-20110101-SNAPSHOT.jar=release/modules/ext/xsom-20110101-SNAPSHOT.jar
#Thu, 25 Aug 2011 20:26:49 +0200
javac.source=1.5
javac.compilerargs=-Xlint -Xlint\:-serial
javac.compilerargs=-Xlint -Xlint:-serial
license.file=../license-jme.txt
nbm.homepage=http\://www.jmonkeyengine.com
nbm.module.author=Normen Hansen
nbm.homepage=http://www.jmonkeyengine.com
nbm.module.author=Relucri
nbm.needs.restart=true
spec.version.base=3.1.0

@ -42,6 +42,15 @@
<specification-version>1.36.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.api.progress</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.37.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.core.multiview</code-name-base>
<build-prerequisite/>
@ -51,6 +60,15 @@
<specification-version>1.32.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.editor.mimelookup</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.35.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.java.project</code-name-base>
<build-prerequisite/>
@ -78,6 +96,15 @@
<implementation-version/>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.spi.navigator</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.32.1</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.spi.palette</code-name-base>
<build-prerequisite/>
@ -171,10 +198,46 @@
<public-packages>
<package>com.jme3.gde.gui</package>
</public-packages>
<class-path-extension>
<runtime-relative-path>ext/xsom-20110101-SNAPSHOT.jar</runtime-relative-path>
<binary-origin>release/modules/ext/xsom-20110101-SNAPSHOT.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/guava-16.0.1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/guava-16.0.1.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/reflections-0.9.9-RC1.jar</runtime-relative-path>
<binary-origin>release/modules/ext/reflections-0.9.9-RC1.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/jTatoo.jar</runtime-relative-path>
<binary-origin>release/modules/ext/jTatoo.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/swingtonifty.jar</runtime-relative-path>
<binary-origin>release/modules/ext/swingtonifty.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/slf4j-simple-1.7.7.jar</runtime-relative-path>
<binary-origin>release/modules/ext/slf4j-simple-1.7.7.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/nifty-java2d-renderer-1.4.0-SNAPSHOT.jar</runtime-relative-path>
<binary-origin>release/modules/ext/nifty-java2d-renderer-1.4.0-SNAPSHOT.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/javassist.jar</runtime-relative-path>
<binary-origin>release/modules/ext/javassist.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/Nifty-Editor0.5.7.jar</runtime-relative-path>
<binary-origin>release/modules/ext/Nifty-Editor0.5.7.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/relaxngDatatype-1.5.jar</runtime-relative-path>
<binary-origin>release/modules/ext/relaxngDatatype-1.5.jar</binary-origin>
</class-path-extension>
</data>
</configuration>
</project>

@ -4,12 +4,16 @@
*/
package com.jme3.gde.gui.view;
import com.jme3.app.Application;
import com.jme3.asset.AssetInfo;
import com.jme3.asset.AssetKey;
import com.jme3.asset.AssetManager;
import com.jme3.asset.AssetNotFoundException;
import com.jme3.gde.core.assets.ProjectAssetManager;
import com.jme3.gde.gui.NiftyGuiDataObject;
import com.jme3.gde.gui.nodes.GElementNode;
import com.jme3.gde.gui.nodes.GUINode;
import de.lessvoid.nifty.Nifty;
import de.lessvoid.nifty.tools.resourceloader.ResourceLocation;
import jada.ngeditor.controller.CommandProcessor;
import jada.ngeditor.controller.GUIEditor;
import jada.ngeditor.guiviews.DND.PaletteDropTarget;
@ -27,21 +31,18 @@ import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyVetoException;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.net.URL;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Observable;
import java.util.Observer;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.Action;
import javax.swing.ActionMap;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JComboBox;
import javax.swing.JComponent;
@ -58,18 +59,14 @@ import org.netbeans.core.spi.multiview.MultiViewElementCallback;
import org.netbeans.spi.actions.AbstractSavable;
import org.openide.awt.UndoRedo;
import org.openide.explorer.ExplorerManager;
import org.openide.explorer.ExplorerUtils;
import org.openide.loaders.DataObject;
import org.openide.nodes.Node;
import org.openide.util.Exceptions;
import org.openide.util.Lookup;
import org.openide.util.NbBundle.Messages;
import org.openide.util.lookup.AbstractLookup;
import org.openide.util.lookup.InstanceContent;
import org.openide.util.lookup.ProxyLookup;
import org.openide.windows.TopComponent;
import org.xml.sax.SAXException;
import sun.rmi.runtime.Log;
@MultiViewElement.Registration(
displayName = "#LBL_NiftyGui_VISUAL",
@ -93,13 +90,37 @@ public final class NiftyGuiVisualElement extends JPanel implements MultiViewElem
private int guiID;
private final InstanceContent content = new InstanceContent();
private Lookup lookup;
private AssetManager assetManager;
protected class ResourceLocationJmp implements ResourceLocation {
public InputStream getResourceAsStream(String path) {
AssetKey<Object> key = new AssetKey<Object>(path);
AssetInfo info = assetManager.locateAsset(key);
if (info != null){
return info.openStream();
}else{
throw new AssetNotFoundException(path);
}
}
public URL getResource(String path) {
throw new UnsupportedOperationException();
}
}
private ResourceLocation resourceLocation = new ResourceLocationJmp();
public NiftyGuiVisualElement(Lookup lkp) {
obj = lkp.lookup(NiftyGuiDataObject.class);
assert obj != null;
assetManager = obj.getLookup().lookup(AssetManager.class);
assert assetManager != null;
System.out.println("AssetManagerNifty " + assetManager);
initComponents();
view = new J2DNiftyView(800, 600);
view.init();
view.init(resourceLocation);
this.scrollArea.getViewport().addChangeListener(view);
this.scrollArea.setViewportView(view);
TrasferHandling tranf = new TrasferHandling();

Loading…
Cancel
Save