Package org.graphstream.stream.thread

Examples of org.graphstream.stream.thread.ThreadProxyPipe


   * New proxy pipe on events coming from the viewer through a thread.
   *
   * @return The new proxy pipe.
   */
  public ProxyPipe newThreadProxyOnGraphicGraph() {
    ThreadProxyPipe tpp = new ThreadProxyPipe();
    tpp.init(graph);
    return tpp;
  }
View Full Code Here


   * New viewer pipe on the events coming from the viewer through a thread.
   *
   * @return The new viewer pipe.
   */
  public ViewerPipe newViewerPipe() {
    ThreadProxyPipe tpp = new ThreadProxyPipe();
    tpp.init(graph, false);

    enableXYZfeedback(true);

    return new ViewerPipe(String.format("viewer_%d",
        (int) (Math.random() * 10000)), tpp);
View Full Code Here

  /* (non-Javadoc)
   * @see org.graphstream.stream.netstream.NetStreamDecoder#getStream(java.lang.String)
   */
  public synchronized ThreadProxyPipe getStream(String name) {
    ThreadProxyPipe s = streams.get(name);
    if (s == null) {
      s = new ThreadProxyPipe();
      streams.put(name, s);
    }
    return s;
  }
View Full Code Here

  /* (non-Javadoc)
   * @see org.graphstream.stream.netstream.NetStreamDecoder#getDefaultStream()
   */

  public synchronized ThreadProxyPipe getDefaultStream() {
    ThreadProxyPipe s = streams.get("default");
    if (s == null) {
      s = new ThreadProxyPipe();
      streams.put("default", s);
    }
    return s;

  }
View Full Code Here

   *            Start the layout thread immediately ? Else the start() method
   *            must be called later.
   */
  public LayoutRunner(Source source, Layout layout, boolean start) {
    this.layout = layout;
    this.pumpPipe = new ThreadProxyPipe();
    this.pumpPipe.addSink(layout);

    if (start)
      start();

View Full Code Here

   *            create the data, this is mostly always needed.
   */
  public LayoutRunner(Graph graph, Layout layout, boolean start,
      boolean replay) {
    this.layout = layout;
    this.pumpPipe = new ThreadProxyPipe();
    this.pumpPipe.addSink(layout);

    if (start)
      start();

View Full Code Here

   * Pipe out whose input is connected to the layout algorithm. You can safely
   * connect as a sink to it to receive events of the layout from a distinct
   * thread.
   */
  public ProxyPipe newLayoutPipe() {
    ThreadProxyPipe tpp = new ThreadProxyPipe();
    tpp.init(layout);
   
    return tpp;
  }
View Full Code Here

        // System.err.printf( "STOP!%n" );
      }
    }

    public ThreadProxyPipe getProxy() {
      ThreadProxyPipe toMain = new ThreadProxyPipe();
      toMain.init(graphic);

      // fromMain.synchronizeWith( toMain, graphic );

      return toMain;
    }
View Full Code Here

  }

  public DemoLayoutAndViewer() {
    boolean loop = true;
    Graph graph = new MultiGraph("test");
    Viewer viewer = new Viewer(new ThreadProxyPipe(graph));
    ProxyPipe fromViewer = viewer.newThreadProxyOnGraphicGraph();
    LinLog layout = new LinLog(false);
   
    layout.configure(a, r, true, force);
View Full Code Here

    new DemoViewerJComponents();
  }

  public DemoViewerJComponents() {
    Graph graph = new MultiGraph("main graph");
    ThreadProxyPipe toSwing = new ThreadProxyPipe(graph);
    Viewer viewer = new Viewer(toSwing);
    ProxyPipe fromSwing = viewer.newThreadProxyOnGraphicGraph();
    SpriteManager sman = new SpriteManager(graph);

    fromSwing.addAttributeSink(graph);
View Full Code Here

TOP

Related Classes of org.graphstream.stream.thread.ThreadProxyPipe

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.