Procházet zdrojové kódy

fixed visualizer Graph source

also added TODOs
Jascha Bohne před 8 roky
rodič
revize
7f2fb84b0b

+ 1 - 1
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/Visualizer.java

@@ -11,7 +11,7 @@ import org.graphstream.ui.view.*;
  *
  */
 public class Visualizer {
-  
+  //TODO add getview with size
   /**
    * returns a View of the Graph. 
    * The View is in the Swing Thread and the Graph in the Main thread.

+ 3 - 1
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/MainApp.java

@@ -61,7 +61,9 @@ public class MainApp extends Application {
 			Pane pane = (Pane) anchor.getChildren().get(1);
 			SwingNode swingNode = (SwingNode) pane.getChildren().get(0);
 			
-			ViewPanel view = Visualizer.getView(ExampleGraphCreater.getGraph());
+			//TODO: remove magic numbers
+			GraphMLImporter reader = new GraphMLImporter();
+			ViewPanel view = Visualizer.getView(reader.readGraph("src/main/resources/Example.graphml"));
 			view.setPreferredSize(new Dimension(300, 200));
 			swingNode.setContent((JPanel) view)/*new JLabel("Graph Anzeige")*/;