Package uk.ac.man.cs.mig.util.graph.model.impl

Examples of uk.ac.man.cs.mig.util.graph.model.impl.DefaultGraphNode


    controller1.setGraphSelectionModel(selModel);
  }

  public void buildModel()
  {
    DefaultGraphNode parNode, childNode, botNode;

    parNode = new DefaultGraphNode("Node abcdefghijklmnopqrstuvwxyz");

    botNode = new DefaultGraphNode("Bottom");

    model.add(parNode);

    model.add(botNode);



    for(int i = 0; i < 5; i++)
    {
      childNode = new DefaultGraphNode("Node " + i);

      model.add(childNode);

      parNode.addChild(childNode);

      botNode.addParent(childNode);
    }

    for(int i = 0; i < 3; i++)
    {
      childNode = new DefaultGraphNode("Node " + i + i);

      model.add(childNode);

      botNode.addChild(childNode);
View Full Code Here


    rand.setSeed(System.currentTimeMillis());

    DefaultGraphModel mod = new DefaultGraphModel();

    DefaultGraphNode node0 = null, node1 = null, node2 = null;

    rootNode = new DefaultGraphNode("Node0");

    mod.add(rootNode);

    for(int i = 0; i < 220; i++)
    {
      rootNode.addChild(node0 = new DefaultGraphNode("Node1." + i));

      mod.add(node0);
    }

    for(int i = 0; i < 220; i++)
    {
      if(rand.nextBoolean() == true)
      {
        node0.addChild(node1 = new DefaultGraphNode("Node2." + i));

        mod.add(node1);

        if(rand.nextBoolean() == true)
        {
          rootNode.addParent(node1);
        }
      }
    }

    for(int i = 0; i < 220; i++)
    {
      if(rand.nextBoolean() == true)
      {
        node1.addChild(node2 = new DefaultGraphNode("Node3." + i));

        mod.add(node2);
      }
    }
View Full Code Here

TOP

Related Classes of uk.ac.man.cs.mig.util.graph.model.impl.DefaultGraphNode

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.