use of edu.uci.ics.jung.algorithms.layout.ISOMLayout in project fql by CategoricalData.
the class Query method lowerComp2.
public static JPanel lowerComp2(@SuppressWarnings("unused") FqlEnvironment env) {
Layout<String, String> layout = new ISOMLayout<>(legend());
layout.setSize(new Dimension(500, 100));
VisualizationViewer<String, String> vv = new VisualizationViewer<>(layout);
vv.setPreferredSize(new Dimension(500, 100));
DefaultModalGraphMouse<String, String> gm = new DefaultModalGraphMouse<>();
gm.setMode(Mode.TRANSFORMING);
vv.setGraphMouse(gm);
gm.setMode(Mode.PICKING);
vv.getRenderContext().setEdgeLabelTransformer(new ToStringLabeller());
vv.getRenderContext().setVertexLabelTransformer(new ToStringLabeller());
return vv;
}
Aggregations