Package org.graphstream.graph

Examples of org.graphstream.graph.Edge


    n2.addAttribute("x", shipment.getDeliveryCoord().getX());
    n2.addAttribute("y", shipment.getDeliveryCoord().getY());
    n2.setAttribute("ui.class", "delivery");

    if(renderShipments){
      Edge s = g.addEdge(shipment.getId(), makeId(shipment.getId(),shipment.getPickupLocationId()),
          makeId(shipment.getId(),shipment.getDeliveryLocationId()), true);
      s.addAttribute("ui.class", "shipment");
    }

  }
View Full Code Here


    g.addSink(sender);

    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();
    n.addAttribute("attribute", "foo");
    n.changeAttribute("attribute", false);

      }
  }.start();

  try {
      Thread.sleep(100);
  } catch (InterruptedException e) {
      e.printStackTrace();
  }

  // The receiver pro-actively checks for events on the ThreadProxyPipe
  pipe.pump();
View Full Code Here

      "workspace0");

    g.addSink(sender);

    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);
View Full Code Here

      copyAttributes(source, target);
    }

    for (int i = 0; i < g.getEdgeCount(); i++) {
      Edge source = g.getEdge(i);
      Edge target = copy.addEdge(source.getId(), source.getSourceNode()
          .getId(), source.getTargetNode().getId(), source
          .isDirected());

      copyAttributes(source, target);
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    public <T extends Edge> T addEdge(String id, String node1, String node2)
        throws IdAlreadyInUseException, ElementNotFoundException,
        EdgeRejectedException {
      T e;
      Edge se;

      elementLock.lock();

      e = wrappedElement.addEdge(id, node1, node2);
      se = new SynchronizedEdge(this, e);
View Full Code Here

    @SuppressWarnings("unchecked")
    public <T extends Edge> T addEdge(String id, String from, String to,
        boolean directed) throws IdAlreadyInUseException,
        ElementNotFoundException {
      T e;
      Edge se;

      elementLock.lock();

      e = wrappedElement.addEdge(id, from, to, directed);
      se = new SynchronizedEdge(this, e);
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    public <T extends Edge> T addEdge(String id, int index1, int index2) {
      T e;
      Edge se;

      elementLock.lock();

      e = wrappedElement.addEdge(id, index1, index2);
      se = new SynchronizedEdge(this, e);
View Full Code Here

    @SuppressWarnings("unchecked")
    public <T extends Edge> T addEdge(String id, int fromIndex,
        int toIndex, boolean directed) {
      T e;
      Edge se;

      elementLock.lock();

      e = wrappedElement.addEdge(id, fromIndex, toIndex, directed);
      se = new SynchronizedEdge(this, e);
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    public <T extends Edge> T addEdge(String id, Node node1, Node node2) {
      T e;
      Edge se;
      final Node unsyncNode1, unsyncNode2;

      unsyncNode1 = ((SynchronizedElement<Node>) node1).wrappedElement;
      unsyncNode2 = ((SynchronizedElement<Node>) node2).wrappedElement;
View Full Code Here

    @SuppressWarnings("unchecked")
    public <T extends Edge> T addEdge(String id, Node from, Node to,
        boolean directed) {
      T e;
      Edge se;
      final Node unsyncFrom, unsyncTo;

      unsyncFrom = ((SynchronizedElement<Node>) from).wrappedElement;
      unsyncTo = ((SynchronizedElement<Node>) to).wrappedElement;
View Full Code Here

TOP

Related Classes of org.graphstream.graph.Edge

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.