model.getUniEdgeSupervisor().setArrowSize(15f);
model.getUniEdgeSupervisor().setArrowAddedRadius(15f);
model.getUniEdgeSupervisor().setColorizer((EdgeColorizer) colorizerFactory.createCustomColorMode(Color.BLACK));
model.getNodeSupervisor().setBaseNodeLabelFont(model.getNodeSupervisor().getBaseNodeLabelFont().deriveFont(12));
//set the layout of the graph
ForceAtlasLayout layout = new ForceAtlasLayout(null);
layout.setGraphModel(graphModel);
layout.resetPropertiesValues();
layout.setRepulsionStrength(60000.0);//for repulsion between nodes
layout.setAttractionStrength(10.0);
layout.setMaxDisplacement(10.0);
layout.setGravity(3.0);
layout.setAdjustSizes(Boolean.TRUE);
layout.inertia = 0.1;
layout.setSpeed(1.0);//layout.setConverged(Boolean.TRUE);
layout.setFreezeStrength(80.0);
layout.setFreezeInertia(0.2);
layout.setOutboundAttractionDistribution(Boolean.TRUE);//incoming links tend to be at centre
for (int i = 0; i < 100 && layout.canAlgo(); i++) {
layout.goAlgo();
}
//export the graph
ExportController ec = Lookup.getDefault().lookup(ExportController.class);
PDFExporter exporter = (PDFExporter) ec.getExporter("pdf");