From a3a179d2ac4aff2a01089f54f7ce377bfb79dbcb Mon Sep 17 00:00:00 2001 From: "bre..ns" Date: Fri, 23 Sep 2011 01:02:59 +0000 Subject: [PATCH] JmeDistanceLodCalculator now fires property change git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8273 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../nodes/JmeDistanceLodCalculator.java | 12 +++++++----- .../sceneexplorer/nodes/JmeTerrainLodControl.java | 13 +++++++------ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeDistanceLodCalculator.java b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeDistanceLodCalculator.java index 82d0bb4c1..5364253d0 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeDistanceLodCalculator.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeDistanceLodCalculator.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) }; } diff --git a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeTerrainLodControl.java b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeTerrainLodControl.java index ba644821b..f20905ef9 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeTerrainLodControl.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeTerrainLodControl.java @@ -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; } + } }