SDK :
- Renaming a Spatial Node in the scene explorer now properly lights up the save button git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9650 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
116ced422b
commit
ba2e17ef89
@ -79,7 +79,7 @@ public class JmeAssetLinkNode extends JmeNode {
|
|||||||
linkChildren = (AssetLinkChildren)getChildren();
|
linkChildren = (AssetLinkChildren)getChildren();
|
||||||
linkChildren.setReadOnly(children.readOnly);
|
linkChildren.setReadOnly(children.readOnly);
|
||||||
this.geom = spatial;
|
this.geom = spatial;
|
||||||
setName(spatial.getName());
|
// setName(spatial.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -60,7 +60,7 @@ public class JmeAudioNode extends JmeNode {
|
|||||||
super(spatial, children);
|
super(spatial, children);
|
||||||
getLookupContents().add(spatial);
|
getLookupContents().add(spatial);
|
||||||
this.node = spatial;
|
this.node = spatial;
|
||||||
setName(spatial.getName());
|
// setName(spatial.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -58,7 +58,7 @@ public class JmeBitmapText extends JmeNode {
|
|||||||
super(spatial, children);
|
super(spatial, children);
|
||||||
getLookupContents().add(spatial);
|
getLookupContents().add(spatial);
|
||||||
this.geom = spatial;
|
this.geom = spatial;
|
||||||
setName(spatial.getName());
|
// setName(spatial.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -33,7 +33,6 @@ package com.jme3.gde.core.sceneexplorer.nodes;
|
|||||||
|
|
||||||
import com.jme3.gde.core.scene.SceneApplication;
|
import com.jme3.gde.core.scene.SceneApplication;
|
||||||
import com.jme3.gde.core.sceneexplorer.SceneExplorerTopComponent;
|
import com.jme3.gde.core.sceneexplorer.SceneExplorerTopComponent;
|
||||||
import com.jme3.gde.core.sceneexplorer.nodes.SceneExplorerNode;
|
|
||||||
import com.jme3.gde.core.sceneexplorer.MaterialChangeListener;
|
import com.jme3.gde.core.sceneexplorer.MaterialChangeListener;
|
||||||
import com.jme3.material.Material;
|
import com.jme3.material.Material;
|
||||||
import com.jme3.scene.Geometry;
|
import com.jme3.scene.Geometry;
|
||||||
@ -42,6 +41,7 @@ import java.awt.Image;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
import org.openide.loaders.DataObject;
|
import org.openide.loaders.DataObject;
|
||||||
|
import org.openide.nodes.AbstractNode;
|
||||||
import org.openide.nodes.Sheet;
|
import org.openide.nodes.Sheet;
|
||||||
import org.openide.util.ImageUtilities;
|
import org.openide.util.ImageUtilities;
|
||||||
|
|
||||||
@ -75,7 +75,6 @@ public class JmeGeometry extends JmeSpatial implements MaterialChangeListener {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
setName(spatial.getName());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -165,11 +165,16 @@ public class JmeSpatial extends AbstractSceneExplorerNode {
|
|||||||
return !((JmeSpatialChildren) jmeChildren).readOnly;
|
return !((JmeSpatialChildren) jmeChildren).readOnly;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
/**
|
||||||
|
* Warning this methods also changes the name of the spatial in the scene
|
||||||
|
* it will mark the file as changed and will activate save button.
|
||||||
|
* @param s
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public void setName(final String s) {
|
public void setName(final String s) {
|
||||||
super.setName(s);
|
super.setName(s);
|
||||||
try {
|
try {
|
||||||
// fireSave(true);
|
fireSave(true);
|
||||||
SceneApplication.getApplication().enqueue(new Callable<Void>() {
|
SceneApplication.getApplication().enqueue(new Callable<Void>() {
|
||||||
|
|
||||||
public Void call() throws Exception {
|
public Void call() throws Exception {
|
||||||
|
@ -62,7 +62,7 @@ public class JmeTerrainGrid extends JmeTerrainQuad implements TerrainGridListene
|
|||||||
super(spatial, children);
|
super(spatial, children);
|
||||||
getLookupContents().add(spatial);
|
getLookupContents().add(spatial);
|
||||||
this.geom = spatial;
|
this.geom = spatial;
|
||||||
setName(spatial.getName());
|
// setName(spatial.getName());
|
||||||
geom.addListener(this);
|
geom.addListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ public class JmeTerrainQuad extends JmeNode {
|
|||||||
super(spatial, children);
|
super(spatial, children);
|
||||||
getLookupContents().add(spatial);
|
getLookupContents().add(spatial);
|
||||||
this.geom = spatial;
|
this.geom = spatial;
|
||||||
setName(spatial.getName());
|
// setName(spatial.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user