org.netbeans.api.visual.graph.layout.GridGraphLayout Java Examples

The following examples show how to use org.netbeans.api.visual.graph.layout.GridGraphLayout. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: VMDGraphScene.java    From netbeans with Apache License 2.0 6 votes vote down vote up
/**
 * Creates a VMD graph scene with a specific color scheme.
 * @param scheme the color scheme
 */
public VMDGraphScene (VMDColorScheme scheme) {
    this.scheme = scheme;
    setKeyEventProcessingType (EventProcessingType.FOCUSED_WIDGET_AND_ITS_PARENTS);

    addChild (backgroundLayer);
    addChild (mainLayer);
    addChild (connectionLayer);
    addChild (upperLayer);

    router = RouterFactory.createOrthogonalSearchRouter (mainLayer, connectionLayer);

    getActions ().addAction (ActionFactory.createZoomAction ());
    getActions ().addAction (ActionFactory.createPanAction ());
    getActions ().addAction (ActionFactory.createRectangularSelectAction (this, backgroundLayer));

    sceneLayout = LayoutFactory.createSceneGraphLayout (this, new GridGraphLayout<String, String> ().setChecker (true));
}
 
Example #2
Source File: DB_VMDGraph.java    From BART with MIT License 5 votes vote down vote up
public DB_VMDGraph(IDatabase db,String topCompName) {
    scene = new VMDGraphScene();
    this.db=db;
    this.topCompName = topCompName;
    highlighterErrorBorderAttr = BorderFactory.createLineBorder(3, Color.MAGENTA);
    emptyBorder = BorderFactory.createEmptyBorder();
    graphLayout = new GridGraphLayout<String, String> ();
    sceneGraphLayout = LayoutFactory.createSceneGraphLayout(scene, graphLayout);
    createTables();
    createEdges();
}
 
Example #3
Source File: EgdSceneGenerator.java    From Llunatic with GNU General Public License v3.0 4 votes vote down vote up
public EgdSceneGenerator() {
    this.graphLayout = new GridGraphLayout<GraphNode, EdgeNode>();
    graphLayout.setAnimated(false);
}