Package org.graphstream.stream.thread

Examples of org.graphstream.stream.thread.ThreadProxyPipe.pump()


    layout.addSink(sender);
      }
  }.start();

  // The receiver pro-actively checks for events on the ThreadProxyPipe
  pipe.pump();
  while (!graph.hasAttribute("ui.viewClosed")) {
      pipe.pump();
      fromViewer.pump();
      layout.compute();
  }
View Full Code Here


  }.start();

  // The receiver pro-actively checks for events on the ThreadProxyPipe
  pipe.pump();
  while (!graph.hasAttribute("ui.viewClosed")) {
      pipe.pump();
      fromViewer.pump();
      layout.compute();
  }
    }
View Full Code Here

  // ----- Back to the receiver side -----
  //
  // -The receiver pro-actively checks for events on the ThreadProxyPipe
  while (true) {
      pipe.pump();
      Thread.sleep(100);
  }
    }
}
View Full Code Here

  } catch (InterruptedException e) {
      e.printStackTrace();
  }

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

  // assertEquals(false, g.getAttribute("attribute"));
  // assertEquals(false, g.getEdge("AB").getAttribute("attribute"));
  // assertEquals(false,
  // g.getEdge("AB").getNode0().getAttribute("attribute"));
View Full Code Here

  launchClient("localhost", 8080, "workspace0", "0");
  launchClient("localhost", 8080, "workspace0", "1");

  for (int i = 0; i < 10; i++) {
      pipe.pump();

      try {
    Thread.sleep(100);
      } catch (InterruptedException e) {
    e.printStackTrace();
View Full Code Here

      } catch (InterruptedException e) {
    e.printStackTrace();
      }
  }

  pipe.pump();

  // assertEquals("workspace0", g.getAttribute("id"));
  assertEquals(180, g.getNodeCount());
    }
View Full Code Here

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

  pipe.pump();
    }

    public static void main(String[] args) {
  new TestJSONStream().testJSONStreamAttributesChanges();
  // new TestJSONStream().testJSONStreamMultiThreadSenders();
View Full Code Here

  ThreadProxyPipe pipe = receiver.getStream();
  // plug the pipe to the sink of the graph
  pipe.addSink(g);
  // The receiver pro-actively checks for events on the ThreadProxyPipe
  while (true) {
      pipe.pump();
  }
    }

}
View Full Code Here

    B.addAttribute("ui.bar", "foo");
    C.addAttribute("truc"); // Not prefixed by UI, will not pass.
    S1.addAttribute("ui.foo", "bar");
    main.stepBegins(1);

    toMain.pump();

    // We ask the Swing thread to modify the graphic graph.

    main.stepBegins(2);
    main.addAttribute("ui.EQUIP"); // Remember GraphicGraph filters
View Full Code Here

    main.addAttribute("ui.EQUIP"); // Remember GraphicGraph filters
                    // attributes.

    // Wait and stop.

    toMain.pump();
    sleep(1000);
    toMain.pump();

    main.addAttribute("ui.STOP");
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.