当前位置: 首页>>代码示例>>Java>>正文


Java SceneLayout类代码示例

本文整理汇总了Java中org.netbeans.api.visual.layout.SceneLayout的典型用法代码示例。如果您正苦于以下问题:Java SceneLayout类的具体用法?Java SceneLayout怎么用?Java SceneLayout使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SceneLayout类属于org.netbeans.api.visual.layout包,在下文中一共展示了SceneLayout类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: layoutScene

import org.netbeans.api.visual.layout.SceneLayout; //导入依赖的package包/类
private static void layoutScene(GraphScene<String, String> scene,
		String root) {
	AbegoTreeLayoutForNetbeans<String, String> graphLayout = new AbegoTreeLayoutForNetbeans<String, String>(
			root, 100, 100, 50, 50, true);
	SceneLayout sceneLayout = LayoutFactory.createSceneGraphLayout(scene,
			graphLayout);
	sceneLayout.invokeLayoutImmediately();
}
 
开发者ID:abego,项目名称:treelayout,代码行数:9,代码来源:AbegoTreeLayoutForNetbeansDemo.java

示例2: layoutScene_NetbeansStyle

import org.netbeans.api.visual.layout.SceneLayout; //导入依赖的package包/类
private static void layoutScene_NetbeansStyle(
		GraphScene<String, String> scene, String root) {
	GraphLayout<String, String> graphLayout = GraphLayoutFactory
			.createTreeGraphLayout(100, 100, 50, 50, true);
	GraphLayoutSupport.setTreeGraphLayoutRootNode(graphLayout, root);
	SceneLayout sceneLayout = LayoutFactory.createSceneGraphLayout(scene,
			graphLayout);
	sceneLayout.invokeLayoutImmediately();
}
 
开发者ID:abego,项目名称:treelayout,代码行数:10,代码来源:AbegoTreeLayoutForNetbeansDemo.java

示例3: createScene

import org.netbeans.api.visual.layout.SceneLayout; //导入依赖的package包/类
@Override
public Scene createScene(Dependency dependency) {
    LunaticDepScene scene = new LunaticDepScene();
    SceneLayout sceneLayout = LayoutFactory.createSceneGraphLayout(scene, graphLayout);
    scene.setSceneLayout(sceneLayout);
    populateScene(dependency, scene);
    return scene;
}
 
开发者ID:donatellosantoro,项目名称:Llunatic,代码行数:9,代码来源:TgdDepSceneGenerator.java

示例4: SchemaScene

import org.netbeans.api.visual.layout.SceneLayout; //导入依赖的package包/类
public SchemaScene()
{
  mainLayer = new LayerWidget(this);
  addChild(mainLayer);
  connectionLayer = new LayerWidget(this);
  addChild(connectionLayer);
  router = RouterFactory.createOrthogonalSearchRouter(mainLayer, connectionLayer);
  GraphLayout<SchemaClass, SchemaRelationship> graphLayout = GraphLayoutFactory.createOrthogonalGraphLayout(this, true);
  SceneLayout sceneLayout = LayoutFactory.createSceneGraphLayout(this, graphLayout);
  sceneLayout.invokeLayout();
}
 
开发者ID:terraframe,项目名称:Runway-SDK,代码行数:12,代码来源:SchemaScene.java

示例5: autoLayout

import org.netbeans.api.visual.layout.SceneLayout; //导入依赖的package包/类
@Override
public void autoLayout() {
    SceneLayout sceneLayout = LayoutFactory.createSceneGraphLayout(this, new GridGraphLayout<NodeWidgetInfo, EdgeWidgetInfo>().setChecker(true));
    sceneLayout.invokeLayout();
}
 
开发者ID:jeddict,项目名称:NBModeler,代码行数:6,代码来源:AbstractPModelerScene.java

示例6: populateDefault

import org.netbeans.api.visual.layout.SceneLayout; //导入依赖的package包/类
private void populateDefault() {
        currentModel = OpenSimDB.getInstance().getCurrentModel();
        if (currentModel == null) return;
        scene.addNode("ground");
        GraphLayoutSupport.setTreeGraphLayoutRootNode (graphLayout, "ground");
        final SceneLayout sceneGraphLayout = LayoutFactory.createSceneGraphLayout (scene, graphLayout);
        WidgetAction editAction = ActionFactory.createEditAction (new MyEditProvider (sceneGraphLayout));
        scene.getActions().addAction (editAction);
        JointSet jnts = currentModel.getJointSet();
        int numJoints = jnts.getSize();
        for (int j=0; j<numJoints; j++ ){
            Joint jnt = jnts.get(j);
            String childFrameName = jnt.getChildFrame().findBaseFrame().getName();
            String parentFrameName = jnt.getParentFrame().findBaseFrame().getName();
            //LabelWidget bodyWidget= new LabelWidget(scene, "Body:"+bod.getName());
            Widget bodyWidget = scene.addNode(childFrameName);
            //bodyWidget.setPreferredLocation (new Point (b*30, b*50));
            bodyWidget.getActions().addAction (editAction);
            Widget jntWidget = scene.addNode(jnt.getName());
            jntWidget.setBorder(ModelGraphScene.getBORDER_0());
            //String edgeID = bod.getJoint().getName();
            String jntToParent = parentFrameName+ "_"+jnt.getName();
            scene.addEdge(jntToParent);
            scene.setEdgeSource (jntToParent, parentFrameName);
            scene.setEdgeTarget (jntToParent, jnt.getName());
            String jntToChild = childFrameName+ "_"+jnt.getName();
            scene.addEdge(jntToChild);
            scene.setEdgeSource (jntToChild, jnt.getName());
            scene.setEdgeTarget (jntToChild, childFrameName);
    }
        scene.validate();
        
        
        //add(scene.createSatelliteView(), BorderLayout.EAST); 
        sceneGraphLayout.invokeLayoutImmediately ();
        scene.validate();
        scene.getActions ().addAction (ActionFactory.createEditAction (new EditProvider() {
            public void edit (Widget widget) {
                // new implementation
                sceneGraphLayout.invokeLayoutImmediately ();
                // old implementation
//                new TreeGraphLayout<String, String> (TreeGraphLayoutTest.this, 100, 100, 50, 50, true).layout ("root");
            }
        }));

    }
 
开发者ID:opensim-org,项目名称:opensim-gui,代码行数:47,代码来源:topologyEditorTopComponent.java

示例7: MyEditProvider

import org.netbeans.api.visual.layout.SceneLayout; //导入依赖的package包/类
MyEditProvider(SceneLayout sceneGraphLayout){
    this.sceneGraphLayout = sceneGraphLayout;
}
 
开发者ID:opensim-org,项目名称:opensim-gui,代码行数:4,代码来源:topologyEditorTopComponent.java

示例8: setSceneLayout

import org.netbeans.api.visual.layout.SceneLayout; //导入依赖的package包/类
public void setSceneLayout(SceneLayout sceneLayout) {
    this.sceneLayout = sceneLayout;
    layout();
}
 
开发者ID:donatellosantoro,项目名称:Llunatic,代码行数:5,代码来源:LunaticDepScene.java

示例9: getSceneLayout

import org.netbeans.api.visual.layout.SceneLayout; //导入依赖的package包/类
/**
 * Get the SceneLayout implementation which wrappers the JUNG layout and
 * lays out the widgets
 *
 * @return A SceneLayout
 */
public final SceneLayout getSceneLayout() {
    return sceneLayout;
}
 
开发者ID:timboudreau,项目名称:vl-jung,代码行数:10,代码来源:JungScene.java


注:本文中的org.netbeans.api.visual.layout.SceneLayout类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。