org.jgrapht.ext.JGraphModelAdapter Java Examples
The following examples show how to use
org.jgrapht.ext.JGraphModelAdapter.
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: Main.java From SIMVA-SoS with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} */ @Override public void init() { // create a visualization using JGraph, via an adapter jgAdapter = new JGraphModelAdapter<>(g); JGraph jgraph = new JGraph(jgAdapter); adjustDisplaySettings(jgraph); getContentPane().add(jgraph); resize(DEFAULT_SIZE); }
Example #2
Source File: LayoutTest.java From JQF with BSD 2-Clause "Simplified" License | 3 votes |
@Fuzz public void testWithGenerator(@GraphModel(nodes=10, edges=25) DirectedGraph graph) { JGraphModelAdapter adapter = new JGraphModelAdapter(graph); Assume.assumeFalse(new CycleDetector<>(graph).detectCycles()); JGraph jgraph = new JGraph(adapter); JGraphLayout layout = new JGraphHierarchicalLayout(); JGraphFacade facade = new JGraphFacade(jgraph); layout.run(facade); }