From 5b02a24428bb8087e8d0eb2542f2fca4ecc19b96 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Wed, 17 Aug 2011 21:44:40 +0000 Subject: [PATCH] SDK: - Make sure plugin TopComponents bring OpenGL window to front when used git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8031 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../jme3/gde/scenecomposer/SceneComposerTopComponent.java | 6 ++++++ .../jme3/gde/terraineditor/TerrainEditorTopComponent.java | 6 ++++++ .../jme3/gde/vehiclecreator/VehicleCreatorTopComponent.form | 6 +++--- .../jme3/gde/vehiclecreator/VehicleCreatorTopComponent.java | 5 +++++ 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/SceneComposerTopComponent.java b/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/SceneComposerTopComponent.java index 6c665d0cf..b36b31372 100644 --- a/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/SceneComposerTopComponent.java +++ b/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/SceneComposerTopComponent.java @@ -16,6 +16,7 @@ import com.jme3.gde.core.scene.SceneRequest; import com.jme3.gde.core.sceneexplorer.nodes.JmeNode; import com.jme3.gde.core.sceneexplorer.nodes.JmeSpatial; import com.jme3.gde.core.sceneexplorer.nodes.NodeUtility; +import com.jme3.gde.core.sceneviewer.SceneViewerTopComponent; import com.jme3.gde.scenecomposer.tools.MoveTool; import com.jme3.gde.scenecomposer.tools.SelectTool; import com.jme3.math.Vector3f; @@ -629,6 +630,11 @@ private void emitButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FI } } + @Override + protected void componentActivated() { + SceneViewerTopComponent.findInstance().requestVisible(); + } + void writeProperties(java.util.Properties p) { // better to version settings since initial version as advocated at // http://wiki.apidesign.org/wiki/PropertyFiles diff --git a/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.java b/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.java index 088846776..c2a9a4eec 100644 --- a/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.java +++ b/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.java @@ -43,6 +43,7 @@ import com.jme3.gde.core.sceneexplorer.nodes.JmeTerrainQuad; import com.jme3.gde.core.sceneexplorer.nodes.NodeUtility; import com.jme3.gde.core.properties.TexturePropertyEditor; import com.jme3.gde.core.properties.preview.DDSPreview; +import com.jme3.gde.core.sceneviewer.SceneViewerTopComponent; import com.jme3.gde.core.util.DataObjectSaveNode; import com.jme3.gde.core.util.ToggleButtonGroup; import com.jme3.gde.terraineditor.sky.SkyboxWizardAction; @@ -940,6 +941,11 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce } + @Override + protected void componentActivated() { + SceneViewerTopComponent.findInstance().requestVisible(); + } + void writeProperties(java.util.Properties p) { // better to version settings since initial version as advocated at // http://wiki.apidesign.org/wiki/PropertyFiles diff --git a/sdk/jme3-vehicle-creator/src/com/jme3/gde/vehiclecreator/VehicleCreatorTopComponent.form b/sdk/jme3-vehicle-creator/src/com/jme3/gde/vehiclecreator/VehicleCreatorTopComponent.form index bc79261bd..672500aa8 100644 --- a/sdk/jme3-vehicle-creator/src/com/jme3/gde/vehiclecreator/VehicleCreatorTopComponent.form +++ b/sdk/jme3-vehicle-creator/src/com/jme3/gde/vehiclecreator/VehicleCreatorTopComponent.form @@ -753,7 +753,7 @@ - + @@ -801,7 +801,7 @@ - + @@ -816,7 +816,7 @@ - + diff --git a/sdk/jme3-vehicle-creator/src/com/jme3/gde/vehiclecreator/VehicleCreatorTopComponent.java b/sdk/jme3-vehicle-creator/src/com/jme3/gde/vehiclecreator/VehicleCreatorTopComponent.java index aebe3b3c5..93f3036e8 100644 --- a/sdk/jme3-vehicle-creator/src/com/jme3/gde/vehiclecreator/VehicleCreatorTopComponent.java +++ b/sdk/jme3-vehicle-creator/src/com/jme3/gde/vehiclecreator/VehicleCreatorTopComponent.java @@ -799,6 +799,11 @@ public final class VehicleCreatorTopComponent extends TopComponent implements Sc } } + @Override + protected void componentActivated() { + SceneViewerTopComponent.findInstance().requestVisible(); + } + void writeProperties(java.util.Properties p) { // better to version settings since initial version as advocated at // http://wiki.apidesign.org/wiki/PropertyFiles