Explorar o código

Merged Jascha, removed unnecessary code

Jan Enders %!s(int64=8) %!d(string=hai) anos
pai
achega
3d7664289f

+ 0 - 25
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/io/GraphMLExporter.java

@@ -3,8 +3,6 @@ package de.tu_darmstadt.informatik.tk.scopviz.io;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.util.Iterator;
-import java.util.LinkedList;
-
 import org.graphstream.graph.Edge;
 import org.graphstream.graph.Graph;
 import org.graphstream.graph.Node;
@@ -108,27 +106,4 @@ public class GraphMLExporter {
 			}
 		}
 	}
-
-	public void writeMapping(Graph underlay, Graph operator, LinkedList<? extends Edge> mappingEdges,
-			Stage parentWindow) {
-		String fileName, underlayId, operatorId;
-		String underlayFile = "underlay_Temp_" + Math.random() + ".graphml";
-		String operatorFile = "operator_Temp_" + Math.random() + ".graphml";
-		String edgesFile = "edges_Temp_" + Math.random() + ".graohml";
-		FileChooser fileChooser = new FileChooser();
-		fileChooser.setTitle("Saving graph");
-
-		underlayId = underlay.getId();
-		writeGraph(underlay, underlayFile);
-		operatorId = operator.getId();
-		writeGraph(operator, operatorFile);
-		writeMappingEdges(mappingEdges, edgesFile);
-
-		fileName = fileChooser.showSaveDialog(parentWindow).getPath();
-
-	}
-
-	private void writeMappingEdges(LinkedList<? extends Edge> mappingEdges, String fileName) {
-
-	}
 }

+ 1 - 30
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/ButtonManager.java

@@ -2,13 +2,9 @@ package de.tu_darmstadt.informatik.tk.scopviz.ui;
 
 import java.util.ArrayList;
 
-import org.graphstream.graph.Edge;
-import org.graphstream.graph.Graph;
-import org.graphstream.graph.Node;
 import org.graphstream.graph.implementations.Graphs;
 import org.jxmapviewer.viewer.WaypointPainter;
 
-import de.tu_darmstadt.informatik.tk.scopviz.main.GraphManager;
 import de.tu_darmstadt.informatik.tk.scopviz.main.Layer;
 import de.tu_darmstadt.informatik.tk.scopviz.main.Main;
 import de.tu_darmstadt.informatik.tk.scopviz.main.MyGraph;
@@ -211,31 +207,6 @@ public final class ButtonManager {
 		controller.swingNodeWorldView.setVisible(true);
 	}
 
-	/**
-	 * replaces all node sprites with symbol sprites corresponding with the
-	 * device/hardware type
-	 * 
-	 * @param g
-	 *            graph, which nodes should be symbolized
-	 */
-	private static void nodesToSymbols(Graph g) {
-
-		// TODO make it functional/make an extra stylesheet for this
-		for (Node n : g.getEachNode()) {
-
-			if (n.getAttribute("ui.class").equals("standard") || n.getAttribute("ui.class").equals("source")) {
-				n.changeAttribute("ui.style",
-						"fill-mode: image-scaled; fill-image: url('src/main/resources/png/computer.png');");
-			}
-
-			else if (n.getAttribute("ui.class").equals("source") || n.getAttribute("ui.class").equals("standard")) {
-				n.changeAttribute("ui.style",
-						"fill-mode: image-scaled; fill-image: url('src/main/resources/png/router.png');");
-			}
-
-		}
-	}
-
 	/**
 	 * Functionality for "edge visible" Checkbox
 	 * 
@@ -250,7 +221,7 @@ public final class ButtonManager {
 		if (newVal) {
 			WorldView.edgePainter.setShowEdges(true);
 			WorldView.internMapViewer.repaint();
-		} else{
+		} else {
 			// Hide edges
 			WorldView.edgePainter.setShowEdges(false);
 			WorldView.internMapViewer.repaint();

+ 0 - 1
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/GraphDisplayManager.java

@@ -164,7 +164,6 @@ public final class GraphDisplayManager {
 		// create and format the GraphManager
 		GraphManager v = new GraphManager(g);
 		g.addAttribute("layer", currentLayer);
-		g.addAttribute("ui.antialias");
 
 		int ret = 0;
 		// replacing the current graph or merging

+ 9 - 9
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/mapView/MapViewFunctions.java

@@ -138,13 +138,13 @@ public final class MapViewFunctions {
 
 		case "cloud_computing_server":
 			return MainApp.class.getResource("/png/symbol_icons/cloud_computing_server.png");
-			
+
 		case "data_storage":
 			return MainApp.class.getResource("/png/symbol_icons/data_storage.png");
-			
+
 		case "desktop":
 			return MainApp.class.getResource("/png/symbol_icons/desktop.png");
-			
+
 		case "laptop":
 			return MainApp.class.getResource("/png/symbol_icons/laptop.png");
 
@@ -159,22 +159,22 @@ public final class MapViewFunctions {
 
 		case "sensor":
 			return MainApp.class.getResource("/png/symbol_icons/sensor.png");
-			
+
 		case "smart_home":
 			return MainApp.class.getResource("/png/symbol_icons/smart_home.png");
-			
+
 		case "smartband":
 			return MainApp.class.getResource("/png/symbol_icons/smartband.png");
-			
+
 		case "smartphone":
 			return MainApp.class.getResource("/png/symbol_icons/smartphone.png");
-			
+
 		case "smartwatch":
 			return MainApp.class.getResource("/png/symbol_icons/smartwatch.png");
-			
+
 		case "switch":
 			return MainApp.class.getResource("/png/symbol_icons/switch.png");
-			
+
 		case "tablet":
 			return MainApp.class.getResource("/png/symbol_icons/tablet.png");
 

+ 0 - 1
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/mapView/WorldView.java

@@ -38,7 +38,6 @@ public class WorldView {
 	 */
 	public static GUIController controller;
 
-	
 	/**
 	 * private constructor to avoid instantiation
 	 */