Search in sources :

Example 1 with AddEdgeToGraph

use of org.gephi.datalab.plugin.manipulators.general.AddEdgeToGraph in project gephi by gephi.

the class LinkNodes method execute.

@Override
public void execute() {
    if (nodes.length > 1) {
        GraphElementsController gec = Lookup.getDefault().lookup(GraphElementsController.class);
        gec.createEdges(sourceNode, nodes, directed);
    } else {
        AddEdgeToGraph manipulator = new AddEdgeToGraph();
        manipulator.setSource(sourceNode);
        DataLaboratoryHelper.getDefault().executeManipulator(manipulator);
    }
}
Also used : GraphElementsController(org.gephi.datalab.api.GraphElementsController) AddEdgeToGraph(org.gephi.datalab.plugin.manipulators.general.AddEdgeToGraph)

Aggregations

GraphElementsController (org.gephi.datalab.api.GraphElementsController)1 AddEdgeToGraph (org.gephi.datalab.plugin.manipulators.general.AddEdgeToGraph)1