當前位置: 首頁>>代碼示例>>Java>>正文


Java SceneRequest.setWindowTitle方法代碼示例

本文整理匯總了Java中com.jme3.gde.core.scene.SceneRequest.setWindowTitle方法的典型用法代碼示例。如果您正苦於以下問題:Java SceneRequest.setWindowTitle方法的具體用法?Java SceneRequest.setWindowTitle怎麽用?Java SceneRequest.setWindowTitle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.jme3.gde.core.scene.SceneRequest的用法示例。


在下文中一共展示了SceneRequest.setWindowTitle方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: actionPerformed

import com.jme3.gde.core.scene.SceneRequest; //導入方法依賴的package包/類
public void actionPerformed(ActionEvent ev) {
    ProjectAssetManager pm = context.getLookup().lookup(ProjectAssetManager.class);
    if (pm == null) {
        Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "AssetManager not found!");
        return;
    }
    Element assetElement = context.getLookup().lookup(Element.class);
    com.jme3.scene.Node node = new com.jme3.scene.Node("PreviewRootNode");
    Spatial model = null;
    model = AssetPackLoader.loadAssetPackModel(pm, new AssetConfiguration(assetElement));
    node.attachChild(model);
    JmeNode jmeNode = NodeUtility.createNode(node);
    SceneApplication app = SceneApplication.getApplication();
    SceneRequest request = new SceneRequest(app, jmeNode, pm);
    try {
        request.setDataObject(DataObject.find(context.getLookup().lookup(Project.class).getProjectDirectory()));
    } catch (DataObjectNotFoundException ex) {
        Exceptions.printStackTrace(ex);
    }
    request.setWindowTitle("AssetPack - PreView Model");
    app.openScene(request);

}
 
開發者ID:jMonkeyEngine,項目名稱:sdk,代碼行數:24,代碼來源:PreviewAssetAction.java

示例2: openScene

import com.jme3.gde.core.scene.SceneRequest; //導入方法依賴的package包/類
public void openScene(Spatial spat, AssetDataObject file, ProjectAssetManager manager) {
    cleanupControllers();
    SceneApplication.getApplication().addSceneListener(this);
    Node node;
    if (spat instanceof Node) {
        node = (Node) spat;
    } else {
        node = new Node();
        node.attachChild(spat);
    }
    JmeNode jmeNode = NodeUtility.createNode(node, file, false);
    SceneRequest request = new SceneRequest(this, jmeNode, manager);
    request.setDataObject(file);
    request.setHelpCtx(ctx);
    this.sentRequest = request;
    request.setWindowTitle("SceneComposer - " + manager.getRelativeAssetPath(file.getPrimaryFile().getPath()));
    request.setToolNode(new Node("SceneComposerToolNode"));
    SceneApplication.getApplication().openScene(request);
}
 
開發者ID:jMonkeyEngine,項目名稱:sdk,代碼行數:20,代碼來源:SceneComposerTopComponent.java

示例3: initSceneViewerWithSpatial

import com.jme3.gde.core.scene.SceneRequest; //導入方法依賴的package包/類
/**
 * Creates a new {@link SceneRequest} and launches the OGL Window loaded
 * with {@link Spatial} spat and {@link CinematicEditorTopComponent}
 *
 * @param spat
 * @param layer
 * @throws DataObjectNotFoundException
 */
private void initSceneViewerWithSpatial(Spatial spat,SpatialLayer layer) throws DataObjectNotFoundException {
    
   
    AssetDataObject dataObject = getSpatialAssetDataObject(layer);
    Node node;
    if (spat instanceof Node) {
        node = (Node) spat;
    } else {
        node = new Node();
        node.attachChild(spat);
        
    }
    JmeNode jmeNode = NodeUtility.createNode(node, dataObject, false);
    //assert jmeNode!=null:"see CinematicEditorManager#initSceneViewerWithSpatial";
    SceneRequest request = new SceneRequest(this, jmeNode, assetManager);
    request.setDataObject(dataObject);
    // request.setHelpCtx(ctx);
    this.sentRequest = request;
    request.setWindowTitle("Cinematic Editor - " + currentDataObject.getName());
    request.setToolNode(new Node("CinematicEditorToolNode"));
    SceneApplication.getApplication().openScene(request);
    
    
}
 
開發者ID:maany,項目名稱:jME-CinematicEditor,代碼行數:33,代碼來源:CinematicEditorManager.java

示例4: actionPerformed

import com.jme3.gde.core.scene.SceneRequest; //導入方法依賴的package包/類
public void actionPerformed(ActionEvent ev) {
    ProjectAssetManager pm = context.getLookup().lookup(ProjectAssetManager.class);
    if (pm == null) {
        Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "AssetManager not found!");
        return;
    }
    Element assetElement = context.getLookup().lookup(Element.class);
    com.jme3.scene.Node node = new com.jme3.scene.Node("PreviewRootNode");
    Spatial model = null;
    model = AssetPackLoader.loadAssetPackModel(pm, new AssetConfiguration(assetElement));
    node.attachChild(model);
    JmeNode jmeNode = NodeUtility.createNode(node);
    SceneApplication app = SceneApplication.getApplication();
    SceneRequest request = new SceneRequest(app, jmeNode, pm);
    try {
        request.setDataObject(DataObject.find(context.getLookup().lookup(Project.class).getProjectDirectory()));
    } catch (DataObjectNotFoundException ex) {
        Exceptions.printStackTrace(ex);
    }
    request.setWindowTitle("AssetPack - PreView Model");
    app.requestScene(request);

}
 
開發者ID:chototsu,項目名稱:MikuMikuStudio,代碼行數:24,代碼來源:PreviewAssetAction.java

示例5: openScene

import com.jme3.gde.core.scene.SceneRequest; //導入方法依賴的package包/類
public void openScene(Spatial spat, AssetDataObject file, ProjectAssetManager manager) {
        cleanupControllers();
        SceneApplication.getApplication().addSceneListener(this);
        result.addLookupListener(this);
        //TODO: handle request change
        Node node;
        if (spat instanceof Node) {
            node = (Node) spat;
        } else {
            node = new Node();
            node.attachChild(spat);
        }
        JmeNode jmeNode = NodeUtility.createNode(node, file, false);
        SceneRequest request = new SceneRequest(this, jmeNode, manager);
        request.setDataObject(file);
        request.setHelpCtx(ctx);
//        file.setSaveCookie(saveCookie);
        if (editorController != null) {
            editorController.cleanup();
        }
        editorController = new SceneEditorController(jmeNode, file);
        this.currentRequest = request;
        request.setWindowTitle("SceneComposer - " + manager.getRelativeAssetPath(file.getPrimaryFile().getPath()));
        request.setToolNode(new Node("SceneComposerToolNode"));
        SceneApplication.getApplication().requestScene(request);
    }
 
開發者ID:chototsu,項目名稱:MikuMikuStudio,代碼行數:27,代碼來源:SceneComposerTopComponent.java

示例6: openFile

import com.jme3.gde.core.scene.SceneRequest; //導入方法依賴的package包/類
public void openFile(BinaryModelDataObject file, Node spatial) {
    JmeNode node = NodeUtility.createNode(spatial, false);
    newEditorController = new VehicleEditorController(node, file);
    SceneApplication.getApplication().addSceneListener(this);
    sentRequest = new SceneRequest(this, node, file.getLookup().lookup(ProjectAssetManager.class));
    sentRequest.setWindowTitle("Vehicle Creator");
    sentRequest.setDataObject(file);
    sentRequest.setToolNode(newEditorController.getToolsNode());
    sentRequest.setHelpCtx(ctx);
    SceneApplication.getApplication().openScene(sentRequest);
}
 
開發者ID:jMonkeyEngine,項目名稱:sdk,代碼行數:12,代碼來源:VehicleCreatorTopComponent.java

示例7: openScene

import com.jme3.gde.core.scene.SceneRequest; //導入方法依賴的package包/類
public void openScene(Spatial spat, AssetDataObject file, ProjectAssetManager manager) {
    cleanupControllers();
    SceneApplication.getApplication().addSceneListener(this);
    result.addLookupListener(this);
    //TODO: handle request change
    Node node;
    if (spat instanceof Node) {
        node = (Node) spat;
    } else {
        node = new Node();
        node.attachChild(spat);
    }
    JmeNode jmeNode = NodeUtility.createNode(node, file, false);
    SceneRequest request = new SceneRequest(this, jmeNode, manager);
    request.setDataObject(file);

    addSaveNode(jmeNode);

    Logger.getLogger(NavMeshTopComponent.class.getName()).finer("NavMesh openScene " + file.getName());

    if (editorController != null) {
        editorController.cleanup();
    }
    editorController = new NavMeshController(jmeNode, file, this);
    this.currentRequest = request;
    request.setWindowTitle("NavMesh - " + manager.getRelativeAssetPath(file.getPrimaryFile().getPath()));
    request.setToolNode(new Node("NavMeshEditorToolNode"));
    SceneApplication.getApplication().openScene(request);
}
 
開發者ID:jMonkeyEngine,項目名稱:sdk,代碼行數:30,代碼來源:NavMeshTopComponent.java

示例8: openFile

import com.jme3.gde.core.scene.SceneRequest; //導入方法依賴的package包/類
public void openFile(BinaryModelDataObject file, Node spatial) {
    JmeNode node = NodeUtility.createNode(spatial, false);
    editorController = new VehicleEditorController(node, file);
    SceneApplication.getApplication().addSceneListener(this);
    currentRequest = new SceneRequest(this, node, file.getLookup().lookup(ProjectAssetManager.class));
    currentRequest.setWindowTitle("Vehicle Creator");
    currentRequest.setDataObject(file);
    currentRequest.setToolNode(editorController.getToolsNode());
    currentRequest.setHelpCtx(ctx);
    SceneApplication.getApplication().requestScene(currentRequest);
}
 
開發者ID:chototsu,項目名稱:MikuMikuStudio,代碼行數:12,代碼來源:VehicleCreatorTopComponent.java

示例9: openScene

import com.jme3.gde.core.scene.SceneRequest; //導入方法依賴的package包/類
public void openScene(Spatial spat, AssetDataObject file, ProjectAssetManager manager) {
    cleanupControllers();
    SceneApplication.getApplication().addSceneListener(this);
    result.addLookupListener(this);
    //TODO: handle request change
    Node node;
    if (spat instanceof Node) {
        node = (Node) spat;
    } else {
        node = new Node();
        node.attachChild(spat);
    }
    JmeNode jmeNode = NodeUtility.createNode(node, file, false);
    SceneRequest request = new SceneRequest(this, jmeNode, manager);
    request.setDataObject(file);
    request.setHelpCtx(ctx);

    addSaveNode(jmeNode);

    //SceneUndoRedoManager m = Lookup.getDefault().lookup(SceneUndoRedoManager.class);//TODO remove this line

    Logger.getLogger(TerrainEditorTopComponent.class.getName()).finer("Terrain openScene " + file.getName());

    if (editorController != null) {
        editorController.cleanup();
    }
    editorController = new TerrainEditorController(jmeNode, file, this);
    this.currentRequest = request;
    request.setWindowTitle("TerrainEditor - " + manager.getRelativeAssetPath(file.getPrimaryFile().getPath()));
    request.setToolNode(new Node("TerrainEditorToolNode"));
    SceneApplication.getApplication().requestScene(request);

    terrainDeletedNodeListener = new TerrainNodeListener();
    editorController.enableTextureButtons();

}
 
開發者ID:chototsu,項目名稱:MikuMikuStudio,代碼行數:37,代碼來源:TerrainEditorTopComponent.java

示例10: openScene

import com.jme3.gde.core.scene.SceneRequest; //導入方法依賴的package包/類
public void openScene(Spatial spat, AssetDataObject file, ProjectAssetManager manager) {
    cleanupControllers();
    SceneApplication.getApplication().addSceneListener(this);
    result.addLookupListener(this);
    //TODO: handle request change
    Node node;
    if (spat instanceof Node) {
        node = (Node) spat;
    } else {
        node = new Node();
        node.attachChild(spat);
    }
    JmeNode jmeNode = NodeUtility.createNode(node, file, false);
    SceneRequest request = new SceneRequest(this, jmeNode, manager);
    request.setDataObject(file);
    request.setHelpCtx(ctx);

    addSaveNode(jmeNode);

    //SceneUndoRedoManager m = Lookup.getDefault().lookup(SceneUndoRedoManager.class);//TODO remove this line

    Logger.getLogger(TerrainEditorTopComponent.class.getName()).log(Level.FINER, "Terrain openScene {0}", file.getName());

    if (editorController != null) {
        editorController.cleanup();
    }
    
    //this.associateLookup( new AbstractLookup(content) ); // for saving alpha images
    
    editorController = new TerrainEditorController(jmeNode, file, this);
    
    
    this.sentRequest = request;
    request.setWindowTitle("TerrainEditor - " + manager.getRelativeAssetPath(file.getPrimaryFile().getPath()));
    request.setToolNode(new Node("TerrainEditorToolNode"));
    SceneApplication.getApplication().openScene(request);

    //terrainDeletedNodeListener = new TerrainNodeListener();
    //editorController.enableTextureButtons();

}
 
開發者ID:jMonkeyEngine,項目名稱:sdk,代碼行數:42,代碼來源:TerrainEditorTopComponent.java

示例11: actionPerformed

import com.jme3.gde.core.scene.SceneRequest; //導入方法依賴的package包/類
public void actionPerformed(ActionEvent ev) {
    final ProjectAssetManager manager = context.getLookup().lookup(ProjectAssetManager.class);
    if (manager == null) {
        return;
    }
    Runnable call = new Runnable() {

        public void run() {
            ProgressHandle progressHandle = ProgressHandle.createHandle("Opening Model");
            progressHandle.start();
            try {
                manager.clearCache();

                final Spatial asset = context.loadAsset();

                if (asset != null) {
                    Node node = null;
                    if (asset instanceof Node) {
                        node = (Node) asset;
                    } else {
                        node = new Node("RootNode");
                        node.attachChild(asset);
                    }
                    JmeNode jmeNode = NodeUtility.createNode(node);
                    SceneApplication app = SceneApplication.getApplication();
                    SceneRequest request = new SceneRequest(app, jmeNode, manager);
                    request.setDataObject(context);
                    request.setWindowTitle("OpenGL Window - View Model");
                    app.openScene(request);
                } else {
                    DialogDisplayer.getDefault().notifyLater(new NotifyDescriptor.Message("Error opening " + context.getPrimaryFile().getNameExt(), NotifyDescriptor.ERROR_MESSAGE));
                }
            }catch(Exception e){
                e.printStackTrace();
            }finally {
                progressHandle.finish();
            }
        }
    };
    new Thread(call).start();

}
 
開發者ID:jMonkeyEngine,項目名稱:sdk,代碼行數:43,代碼來源:OpenModel.java

示例12: actionPerformed

import com.jme3.gde.core.scene.SceneRequest; //導入方法依賴的package包/類
public void actionPerformed(ActionEvent ev) {
    final ProjectAssetManager manager = context.getLookup().lookup(ProjectAssetManager.class);
    if (manager == null) {
        return;
    }
    Runnable call = new Runnable() {

        public void run() {
            ProgressHandle progressHandle = ProgressHandleFactory.createHandle("Opening Model");
            progressHandle.start();
            try {
                manager.clearCache();

                final Spatial asset = context.loadAsset();

                if (asset != null) {
                    Node node = null;
                    if (asset instanceof Node) {
                        node = (Node) asset;
                    } else {
                        node = new Node("RootNode");
                        node.attachChild(asset);
                    }
                    JmeNode jmeNode = NodeUtility.createNode(node);
                    SceneApplication app = SceneApplication.getApplication();
                    SceneRequest request = new SceneRequest(app, jmeNode, manager);
                    request.setDataObject(context);
                    request.setWindowTitle("OpenGL Window - View Model");
                    app.requestScene(request);
                } else {
                    Confirmation msg = new NotifyDescriptor.Confirmation(
                            "Error opening " + context.getPrimaryFile().getNameExt(),
                            NotifyDescriptor.OK_CANCEL_OPTION,
                            NotifyDescriptor.ERROR_MESSAGE);
                    DialogDisplayer.getDefault().notify(msg);
                }
            }catch(Exception e){
                e.printStackTrace();
            }finally {
                progressHandle.finish();
            }
        }
    };
    new Thread(call).start();

}
 
開發者ID:chototsu,項目名稱:MikuMikuStudio,代碼行數:47,代碼來源:OpenModel.java


注:本文中的com.jme3.gde.core.scene.SceneRequest.setWindowTitle方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。