Package org.graphstream.graph

Examples of org.graphstream.graph.Node.removeAttribute()


      if (node != null) {
        sendNodeAttributeRemoved(sourceId, timeId, nodeId, attribute);
        passYourWay = true;

        try {
          node.removeAttribute(attribute);
        } finally {
          passYourWay = false;
        }
      }
    }
View Full Code Here


    assertEquals("bar", output.getNode("A").getAttribute("foo"));
    assertEquals("bar", output.getEdge("BC").getAttribute("foo"));

    // Now remove an attribute.

    A.removeAttribute("foo");

    assertFalse(output.hasAttribute("foo"));

    // Now remove a node.
View Full Code Here

              B.getLabel("ui.label"));
          B.removeAttribute("ui.clicked");
        } else if (C.hasAttribute("ui.clicked")) {
          System.err.printf("C clicked (%s)%n",
              C.getLabel("ui.label"));
          C.removeAttribute("ui.clicked");
          if (C.hasAttribute("ui.class"))
            C.removeAttribute("ui.class");
          else
            C.addAttribute("ui.class", "editable");
        }
View Full Code Here

        } else if (C.hasAttribute("ui.clicked")) {
          System.err.printf("C clicked (%s)%n",
              C.getLabel("ui.label"));
          C.removeAttribute("ui.clicked");
          if (C.hasAttribute("ui.class"))
            C.removeAttribute("ui.class");
          else
            C.addAttribute("ui.class", "editable");
        }

        angle += 0.01;
View Full Code Here

    assertEquals(false, A.getAttribute("foo"));
    assertEquals(Boolean.FALSE, A.getAttribute("foo"));

    // Removal.

    A.removeAttribute("foo");
    assertEquals(0, A.getAttributeCount());
    assertFalse(A.hasAttribute("foo"));
    assertNull(A.getAttribute("foo"));
   
    // Test null attributes checking.
View Full Code Here

        g.addSink(nsc);
        Node node0 = g.addNode("node0");
        Edge edge = g.addEdge("edge", "node0", "node1", true);
        node0.addAttribute("nodeAttribute", 0);
        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);
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.