Package org.graphstream.graph.implementations

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


      IOException, InterruptedException {
  // ----- On the receiver side -----
  //
  // - a graph that will display the received events
  Graph g = new MultiGraph("G", false, true);
  g.display();
  // - the receiver that waits for events
  JSONReceiver receiver = new JSONReceiver("localhost", 8080,
    "workspace0");
  receiver.setDebug(true);
  // - received events end up in the "default" pipe
View Full Code Here


public class GraphSender {

    public static void main(String args[]) {
  Graph graph = new MultiGraph("Tutorial 1 GraphSender");

  graph.display();

  JSONSender sender = new JSONSender("localhost", 8080, "workspace0");

  // plug the graph to the sender so that graph events can be
  // sent automatically
View Full Code Here

  // TODO Auto-generated method stub
  // ----- On the receiver side -----
  //
  // a graph that will display the received events
  Graph g = new MultiGraph("G", false, true);
  g.display();
  // the receiver that waits for events
  JSONReceiver receiver = new JSONReceiver("localhost", 8080,
    "workspace0");
  receiver.setDebug(true);
  ThreadProxyPipe pipe = receiver.getStream();
View Full Code Here

  protected boolean loop = true;

  public DemoViewerColorInterpolation() {
    Graph graph = new MultiGraph("main graph");
    ViewerPipe pipe = graph.display(false).newViewerPipe();

    // graph.addAttribute( "ui.quality" );
    graph.addAttribute("ui.antialias");

    pipe.addViewerListener(this);
View Full Code Here

  public static void main(String[] args) throws UnknownHostException, IOException, InterruptedException {
    // ----- On the receiver side -----
    //
    // - a graph that will display the received events
    Graph g = new MultiGraph("G",false,true);
    g.display();
    // - the receiver that waits for events
    NetStreamReceiver net = new NetStreamReceiver("localhost",2001,false);
   
    net.setUnpacker(new  Base64Unpacker());
   
View Full Code Here

          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;"));
   
    Viewer v = graph.display(entry.autoLayout);
    v.setCloseFramePolicy(CloseFramePolicy.CLOSE_VIEWER);
   
    in.addSink(graph);
    in.readAll(TestPajekParser.class
        .getResourceAsStream(entry.ressourceName));
View Full Code Here

      Graph graph = new MultiGraph("Dynamic !");
      FileSourceGML source = new FileSourceGML();
     
      graph.addAttribute("ui.quality");
      graph.addAttribute("ui.antialias");
      graph.display();
      source.addSink(graph);
      source.begin(TestSourceGML.class.getResourceAsStream("dynamic.gml"));
      int step = 0;
      while(source.nextStep()) {
        System.err.printf("Step %d%n", step);
View Full Code Here

      FileSourceGML source = new FileSourceGML();

      graph.addAttribute("ui.quality");
      graph.addAttribute("ui.antialias");
      graph.addAttribute("ui.stylesheet", "node { text-size:8; text-color: #0008; text-alignment: at-right; } edge { text-size:8; text-color: #0008; }");
      graph.display(false);
      source.addSink(graph);
      source.begin(TestSourceGML.class.getResourceAsStream("example2.sif.gml"));
      while(source.nextEvents()) {}
      source.end();
    }
View Full Code Here

      FileSourceGML source = new FileSourceGML();

      graph.addAttribute("ui.quality");
      graph.addAttribute("ui.antialias");
      //graph.addAttribute("ui.stylesheet", "node { text-size:8; text-color: #0008; text-alignment: at-right; } edge { text-size:8; text-color: #0008; }");
      graph.display();
      source.addSink(graph);
      source.begin(TestSourceGML.class.getResourceAsStream("SmallTest.gml"));
      while(source.nextEvents()) {}
      source.end();
    }
View Full Code Here

      IOException, InterruptedException {
    // ----- On the receiver side -----
    //
    // - a graph that will display the received events
    Graph g = new MultiGraph("G");
    g.display();
    // - the receiver that waits for events
    NetStreamReceiver net = new NetStreamReceiver(2001);
   
    net.setUnpacker(new Base64Unpacker());
    net.setDebugOn(false);
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.