Research Article
Graph Drawing and Analysis Library and Its Domain-Specific Language for Graphs’ Layout Specifications
Listing 8
JAVA code corresponding to the layout specification from Listing
8.
//select the best algorithm based on properties of the graph, | //but only consider those belonging to a class specified by style | LayoutAlgorithms algorithm = | LayoutPicker.pickAlgorithm(graph, "circular"); | GraphLayoutProperties layoutProperties = DefaultGraphLayoutProperties. | getDefaultLayoutProperties(algorithm, graph); | Layouter<GraphVertex, GraphEdge> layouter = new Layouter<>( | vertices, edges, algorithm, layoutProperties); | Drawing<GraphVertex, GraphEdge> drawing = layouter.layout(); |
|