Package org.graphstream.graph.implementations

Examples of org.graphstream.graph.implementations.MultiGraph.addAttribute()


  @Test
  public void testNullAttributes() {
    Graph graph = new MultiGraph("g1");

    graph.addAttribute("foo");
    graph.addAttribute("bar", (Object) null); // Yes an attribute with a
                          // null value, You can !

    assertTrue(graph.hasAttribute("foo"));
    assertTrue(graph.hasAttribute("bar"));
View Full Code Here


  @Test
  public void testNullAttributes() {
    Graph graph = new MultiGraph("g1");

    graph.addAttribute("foo");
    graph.addAttribute("bar", (Object) null); // Yes an attribute with a
                          // null value, You can !

    assertTrue(graph.hasAttribute("foo"));
    assertTrue(graph.hasAttribute("bar"));
View Full Code Here

    // - plug the graph to the sender so that graph events can be
    // sent automatically
    g.addSink(nsc);
    // - generate some events on the client side
    String style = "node{fill-mode:plain;fill-color:#567;size:6px;}";
    g.addAttribute("stylesheet", style);
    g.addAttribute("ui.antialias", true);
    g.addAttribute("layout.stabilization-limit", 0);
    for (int i = 0; i < 500; i++) {
      g.addNode(i + "");
      if (i > 0) {
View Full Code Here

    // sent automatically
    g.addSink(nsc);
    // - generate some events on the client side
    String style = "node{fill-mode:plain;fill-color:#567;size:6px;}";
    g.addAttribute("stylesheet", style);
    g.addAttribute("ui.antialias", true);
    g.addAttribute("layout.stabilization-limit", 0);
    for (int i = 0; i < 500; i++) {
      g.addNode(i + "");
      if (i > 0) {
        g.addEdge(i + "-" + (i - 1), i + "", (i - 1) + "");
View Full Code Here

    g.addSink(nsc);
    // - generate some events on the client side
    String style = "node{fill-mode:plain;fill-color:#567;size:6px;}";
    g.addAttribute("stylesheet", style);
    g.addAttribute("ui.antialias", true);
    g.addAttribute("layout.stabilization-limit", 0);
    for (int i = 0; i < 500; i++) {
      g.addNode(i + "");
      if (i > 0) {
        g.addEdge(i + "-" + (i - 1), i + "", (i - 1) + "");
        g.addEdge(i + "--" + (i / 2), i + "", (i / 2) + "");
View Full Code Here

    System.out.printf("> \"%s\"\n", entry.ressourceName);
   
    Graph graph = new MultiGraph("foo");
    FileSourcePajek in = new FileSourcePajek();

    graph.addAttribute("ui.quality");
    if (!entry.veryLarge)
      graph.addAttribute("ui.antialias");
    if (entry.addLabels)
      graph.addAttribute(
          "ui.stylesheet",
View Full Code Here

    Graph graph = new MultiGraph("foo");
    FileSourcePajek in = new FileSourcePajek();

    graph.addAttribute("ui.quality");
    if (!entry.veryLarge)
      graph.addAttribute("ui.antialias");
    if (entry.addLabels)
      graph.addAttribute(
          "ui.stylesheet",
          String.format(
              "node { text-alignment: center; size: %dpx; fill-color: grey; %s } edge { fill-color: #333; }",
View Full Code Here

    graph.addAttribute("ui.quality");
    if (!entry.veryLarge)
      graph.addAttribute("ui.antialias");
    if (entry.addLabels)
      graph.addAttribute(
          "ui.stylesheet",
          String.format(
              "node { text-alignment: center; size: %dpx; fill-color: grey; %s } edge { fill-color: #333; }",
              entry.veryLarge ? 6 : 16, entry.veryLarge ? ""
                  : "stroke-mode: plain; stroke-color: #333;"));
View Full Code Here

          String.format(
              "node { text-alignment: center; size: %dpx; fill-color: grey; %s } edge { fill-color: #333; }",
              entry.veryLarge ? 6 : 16, entry.veryLarge ? ""
                  : "stroke-mode: plain; stroke-color: #333;"));
    else
      graph.addAttribute(
          "ui.stylesheet",
          String.format(
              "node { text-alignment: at-right; size: %dpx; fill-color: grey; %s text-background-mode: plain; text-offset: 2px, 0px; text-padding: 2px; text-background-color: #FFFFFFAA; } edge { fill-color: #333; }",
              entry.veryLarge ? 6 : 16, entry.veryLarge ? ""
                  : "stroke-mode: plain; stroke-color: #333;"));
View Full Code Here

            return;
          }

          g.addSink(nsc);

          g.addAttribute("attribute", "foo");
          g.changeAttribute("attribute", false);
          Edge e = g.addEdge("AB", "A", "B");
          e.addAttribute("attribute", "foo");
          e.changeAttribute("attribute", false);
          Node n = e.getNode0();
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.