JmeDistanceLodCalculator now fires property change

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8273 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
bre..ns 14 years ago
parent 30dd60aea7
commit a3a179d2ac
  1. 12
      sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeDistanceLodCalculator.java
  2. 13
      sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeTerrainLodControl.java

@ -41,6 +41,7 @@ import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import javax.swing.Action;
import org.openide.actions.DeleteAction;
import org.openide.loaders.DataObject;
import org.openide.nodes.Children;
import org.openide.nodes.Sheet;
import org.openide.util.Exceptions;
@ -64,10 +65,11 @@ public class JmeDistanceLodCalculator extends AbstractSceneExplorerNode {
public JmeDistanceLodCalculator() {
}
public JmeDistanceLodCalculator(TerrainLodControl lodControl, DistanceLodCalculator lodCalculator) {
public JmeDistanceLodCalculator(TerrainLodControl lodControl, DistanceLodCalculator lodCalculator, DataObject dataObject) {
super(Children.LEAF);
this.lodControl=lodControl;
this.lodCalculator = lodCalculator;
this.dataObject = dataObject;
getLookupContents().add(lodCalculator);
getLookupContents().add(this);
setName("DistanceLodCalculator");
@ -104,10 +106,10 @@ public class JmeDistanceLodCalculator extends AbstractSceneExplorerNode {
@Override
public Action[] getActions(boolean context) {
return new SystemAction[]{
// SystemAction.get(CopyAction.class),
// SystemAction.get(CutAction.class),
// SystemAction.get(PasteAction.class),
SystemAction.get(DeleteAction.class)
//SystemAction.get(CopyAction.class),
//SystemAction.get(CutAction.class),
//SystemAction.get(PasteAction.class),
//SystemAction.get(DeleteAction.class)
};
}

@ -58,7 +58,7 @@ import org.openide.util.actions.SystemAction;
* @author Brent Owens
*/
@org.openide.util.lookup.ServiceProvider(service=SceneExplorerNode.class)
public class JmeTerrainLodControl extends AbstractSceneExplorerNode{
public class JmeTerrainLodControl extends AbstractSceneExplorerNode {
private static Image smallImage =
ImageUtilities.loadImage("com/jme3/gde/core/sceneexplorer/nodes/icons/physicswheel.gif");
@ -88,10 +88,10 @@ public class JmeTerrainLodControl extends AbstractSceneExplorerNode{
@Override
public Action[] getActions(boolean context) {
return new SystemAction[]{
// SystemAction.get(CopyAction.class),
// SystemAction.get(CutAction.class),
// SystemAction.get(PasteAction.class),
SystemAction.get(DeleteAction.class)
//SystemAction.get(CopyAction.class),
//SystemAction.get(CutAction.class),
//SystemAction.get(PasteAction.class),
//SystemAction.get(DeleteAction.class)
};
}
@ -204,12 +204,13 @@ public class JmeTerrainLodControl extends AbstractSceneExplorerNode{
protected Node[] createNodes(Object key) {
if (key instanceof DistanceLodCalculator) {
DistanceLodCalculator assetKey = (DistanceLodCalculator) key;
return new Node[]{new JmeDistanceLodCalculator(control, assetKey)};
return new Node[]{new JmeDistanceLodCalculator(control, assetKey, getDataObject())};
} else if (key instanceof PerspectiveLodCalculator) {
//PerspectiveLodCalculator assetKey = (PerspectiveLodCalculator) key;
//return new Node[]{new JmePerspectiveLodCalculator(control, assetKey)};
}
return null;
}
}
}

Loading…
Cancel
Save