| Software Secret Weapons™ |
How To Use Linguine Maps Java API posted by Pavel Simakov on 2005-08-01 22:43:46 under Linguine Maps
|
|||||
|
Linguine Maps provides clean object-oriented diagramming API for graph visualization. Here is a smallest working Java code that creates a GIF image file with a diagramm:
private void simpleDraw() throws Exception {
// build graph
Graph graph = GraphFactory.newGraph();
graph.getInfo().setCaption("My test drawing");
GraphNode f = graph.addNode();
f.getInfo().setCaption("father");
f.getInfo().setFillColor("cyan");
GraphNode m = graph.addNode();
m.getInfo().setCaption("mother");
m.getInfo().setFillColor("pink");
GraphNode c = graph.addNode();
c.getInfo().setCaption("child");
m.getInfo().setFillColor("yellow");
GraphEdge ab = graph.addEdge(f, c);
ab.getInfo().setCaption("parent");
GraphEdge bc = graph.addEdge(m, c);
bc.getInfo().setCaption("parent");
// output graph to *.gif
final String dotFileName = outFolder + "\\SimpleDraw.dot";
final String gifFileName = outFolder + "\\SimpleDraw.gif";
GRAPHtoDOTtoGIF.transform(
graph, dotFileName, gifFileName, exeFile
);
}
Comment (1) Leave a comment |
|
|||||
| Copyright © 2004-2007 by Pavel Simakov |
|
Comment by arun — September 22, 2008 @ 3:38 am
hi…
i want to add graphics in my java project.as u do.
but i dont know how.is there any API or JAR files to include in to the project,i use eclipse as editor.
and wat r the limitations of this thinf.
i want do draw a time line with this.help me. if u can