Package org.graphstream.graph

Examples of org.graphstream.graph.Graph.addAttribute()


        g.addAttribute("double", 1.0);
        g.addAttribute("short", (short) 0);
        g.addAttribute("long", 1L);
        g.addAttribute("byte", (byte) 0);
        g.addAttribute("boolean", true);
        g.addAttribute("string", "true");

        try {
          nsc.close();
        } catch (IOException e) {
          e.printStackTrace();
View Full Code Here


          error(e1.toString());
          return;
        }
        g.addSink(nsc);

        g.addAttribute("id", id);

        for (int i = 0; i < 30; i++) {
          g.addNode(prefix + i + "_1");
          g.addNode(prefix + i + "_0");
          g.addNode(prefix + i + "_2");
View Full Code Here

        node0.changeAttribute("nodeAttribute", 1);
        node0.removeAttribute("nodeAttribute");
        edge.addAttribute("edgeAttribute", 0);
        edge.changeAttribute("edgeAttribute", 1);
        edge.removeAttribute("edgeAttribute");
        g.addAttribute("graphAttribute", 0);
        g.changeAttribute("graphAttribute", 1);
        g.removeAttribute("graphAttribute");
        g.stepBegins(1.1);
        g.removeEdge("edge");
        g.removeNode("node0");
View Full Code Here

  public void testDynFile() {
    try {
      Graph graph = new MultiGraph("Dynamic !");
      FileSourceGML source = new FileSourceGML();
     
      graph.addAttribute("ui.quality");
      graph.addAttribute("ui.antialias");
      graph.display();
      source.addSink(graph);
      source.begin(TestSourceGML.class.getResourceAsStream("dynamic.gml"));
      int step = 0;
View Full Code Here

    try {
      Graph graph = new MultiGraph("Dynamic !");
      FileSourceGML source = new FileSourceGML();
     
      graph.addAttribute("ui.quality");
      graph.addAttribute("ui.antialias");
      graph.display();
      source.addSink(graph);
      source.begin(TestSourceGML.class.getResourceAsStream("dynamic.gml"));
      int step = 0;
      while(source.nextStep()) {
View Full Code Here

  public void testBigFile() {
    try {
      Graph graph = new MultiGraph("foo");
      FileSourceGML source = new FileSourceGML();

      graph.addAttribute("ui.quality");
      graph.addAttribute("ui.antialias");
      graph.addAttribute("ui.stylesheet", "node { text-size:8; text-color: #0008; text-alignment: at-right; } edge { text-size:8; text-color: #0008; }");
      graph.display(false);
      source.addSink(graph);
      source.begin(TestSourceGML.class.getResourceAsStream("example2.sif.gml"));
View Full Code Here

    try {
      Graph graph = new MultiGraph("foo");
      FileSourceGML source = new FileSourceGML();

      graph.addAttribute("ui.quality");
      graph.addAttribute("ui.antialias");
      graph.addAttribute("ui.stylesheet", "node { text-size:8; text-color: #0008; text-alignment: at-right; } edge { text-size:8; text-color: #0008; }");
      graph.display(false);
      source.addSink(graph);
      source.begin(TestSourceGML.class.getResourceAsStream("example2.sif.gml"));
      while(source.nextEvents()) {}
View Full Code Here

      Graph graph = new MultiGraph("foo");
      FileSourceGML source = new FileSourceGML();

      graph.addAttribute("ui.quality");
      graph.addAttribute("ui.antialias");
      graph.addAttribute("ui.stylesheet", "node { text-size:8; text-color: #0008; text-alignment: at-right; } edge { text-size:8; text-color: #0008; }");
      graph.display(false);
      source.addSink(graph);
      source.begin(TestSourceGML.class.getResourceAsStream("example2.sif.gml"));
      while(source.nextEvents()) {}
      source.end();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.