Search in sources :

Example 1 with Graph

use of edu.mit.csail.sdg.alloy4graph.Graph in project org.alloytools.alloy by AlloyTools.

the class StaticGraphMaker method produceGraph.

/**
 * Produces a single Graph from the given Instance and View and choice of
 * Projection
 */
public static JPanel produceGraph(AlloyInstance instance, VizState view, AlloyProjection proj) throws ErrorFatal {
    view = new VizState(view);
    if (proj == null)
        proj = new AlloyProjection();
    Graph graph = new Graph(view.getFontSize() / 12.0D);
    new StaticGraphMaker(graph, instance, view, proj);
    if (graph.nodes.size() == 0)
        new GraphNode(graph, "", "Due to your theme settings, every atom is hidden.", "Please click Theme and adjust your settings.");
    return new GraphViewer(graph);
}
Also used : Graph(edu.mit.csail.sdg.alloy4graph.Graph) GraphViewer(edu.mit.csail.sdg.alloy4graph.GraphViewer) GraphNode(edu.mit.csail.sdg.alloy4graph.GraphNode)

Aggregations

Graph (edu.mit.csail.sdg.alloy4graph.Graph)1 GraphNode (edu.mit.csail.sdg.alloy4graph.GraphNode)1 GraphViewer (edu.mit.csail.sdg.alloy4graph.GraphViewer)1