Software Secret Weapons™


 
How To Use Linguine Maps Java API
by Pavel Simakov on 2005-08-01 22:43:46 under Linguine Maps, view comments
Bookmark and Share
 


Index  •  Intro  •  WSDL  •  Apache Ant  •  DTD's for XML  •  ObJectRelationalBridge  •  Hibernate  •  Gallery  •  FAQ  •  Help  •  JavaDoc  •  Download
Hibernate Configuration  •  Object Relational Impedance Mismatch  

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)

  • 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


Leave a comment


 
Dog Emotional 2010 Calendar Dog Emotional Mousepad Dog Fashionable 2010 Calendar Dog Fashionable Mousepad

Copyright © 2004-2010 by Pavel Simakov
any conclusions, recommendations, ideas, thoughts or the source code presented on this site are my own and do not reflect a official opinion of my current or past employers, partners or clients
SourceForge.net Logo