Package nl.nanoworks.nanograph

Examples of nl.nanoworks.nanograph.NanoGraph


 
  NanoGraph p = null;
 
  public void init() {
    DefaultGraphModel g = new DefaultGraphModel();
    p = new NanoGraph();
   
    p.addMouseListener(new MouseAdapter(){
     
      public void mouseClicked(MouseEvent e)
      {
View Full Code Here


    g.addEdge("is a", "C++", "Programming Language");
    g.addEdge("is a", "Perl", "Programming Language");
    g.addEdge("is a", "Python", "Programming Language");
 
   
    NanoGraph gp = new NanoGraph();
   
    DebugGraphListener dgl = new DebugGraphListener(new OutputStreamWriter(System.out));
    gp.getSelectionManager().addSelectionListener(dgl);
   
    gp.setGraph(g);
    gp.setLayout(new CircularLayoutAlgorithm(200));
   
    JFrame f = new JFrame();
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
   
    f.getContentPane().add(gp);
View Full Code Here

TOP

Related Classes of nl.nanoworks.nanograph.NanoGraph

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.