Search in sources :

Example 1 with Graph

use of prefuse.data.Graph in project qi4j-sdk by Qi4j.

the class GraphPane method initQi4J.

public void initQi4J(ApplicationDetailDescriptor descriptor) {
    Graph graph = GraphBuilder.buildGraph(descriptor);
    Dimension size = getSize();
    treeDisplay.setSize(size.width, size.height);
    treeDisplay.run(graph);
    graph = GraphBuilder.buildGraph(descriptor);
    stackedDisplay.setSize(size.width, size.height);
    stackedDisplay.run(graph);
}
Also used : Graph(prefuse.data.Graph) Dimension(java.awt.Dimension)

Example 2 with Graph

use of prefuse.data.Graph in project jo-client-platform by jo-source.

the class TreeRootAction method run.

@Override
public void run(final double frac) {
    final TupleSet focus = vis.getGroup(Visualization.FOCUS_ITEMS);
    if (focus == null || focus.getTupleCount() == 0) {
        return;
    }
    final Graph g = (Graph) vis.getGroup(m_group);
    final Node node = getFirstContainingNode(g, focus);
    if (node != null) {
        g.getSpanningTree(node);
    }
}
Also used : TupleSet(prefuse.data.tuple.TupleSet) Graph(prefuse.data.Graph) Node(prefuse.data.Node)

Aggregations

Graph (prefuse.data.Graph)2 Dimension (java.awt.Dimension)1 Node (prefuse.data.Node)1 TupleSet (prefuse.data.tuple.TupleSet)1