Browse Source

Merged Jascha, auto formatted everything

Jan Enders 8 years ago
parent
commit
94c9b864dc

+ 3 - 4
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/debug/Debug.java

@@ -96,11 +96,10 @@ public final class Debug {
 	public static void out(String s, int severity) {
 		if (DEBUG_ENABLED && severity >= logLevel) {
 			System.out.println(s);
-			
-			if(severity < 3){
+
+			if (severity < 3) {
 				Platform.runLater(() -> ConsoleManager.addNormalText(s));
-			}
-			else{
+			} else {
 				Platform.runLater(() -> ConsoleManager.addErrorText(s));
 			}
 		}

+ 3 - 4
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/graphs/MyGraph.java

@@ -101,10 +101,9 @@ public class MyGraph extends SingleGraph {
 	 *            the Edge that was just created
 	 */
 	private void edgeCreatedNotify(Edge e) {
-		boolean doWeight = Layer.UNDERLAY.equals(this.getAttribute("layer")) 
-				&& (e.getAttribute("weight") == null
-				|| (e.getAttribute("weight") != null
-				&& (OptionsManager.getDefaultWeight() == Main.getInstance().convertAttributeTypes(e.getAttribute("weight"), new Double(0.0)))));
+		boolean doWeight = Layer.UNDERLAY.equals(this.getAttribute("layer")) && (e.getAttribute("weight") == null
+				|| (e.getAttribute("weight") != null && (OptionsManager.getDefaultWeight() == Main.getInstance()
+						.convertAttributeTypes(e.getAttribute("weight"), new Double(0.0)))));
 		if (doWeight) {
 			ToolboxManager.createWeightDialog(e);
 		}

+ 0 - 15
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/ButtonManager.java

@@ -4,10 +4,7 @@ import java.io.IOException;
 import java.util.ArrayList;
 import java.util.HashSet;
 
-<<<<<<< HEAD
 import org.jxmapviewer.viewer.GeoPosition;
-=======
->>>>>>> branch 'Jascha' of https://git.tk.informatik.tu-darmstadt.de/julien.gedeon/bp-scopviz.git
 import org.jxmapviewer.viewer.WaypointPainter;
 
 import de.tu_darmstadt.informatik.tk.scopviz.main.Layer;
@@ -265,19 +262,7 @@ public final class ButtonManager {
 
 		if (!(GraphDisplayManager.getCurrentLayer().equals(Layer.SYMBOL))) {
 
-<<<<<<< HEAD
-=======
-			// add a copy of the underlay graph to the the symbol layer
-			// TODO fix problem with underlay weight popups
-			// MyGraph gClone = (MyGraph)
-			// Graphs.clone(GraphDisplayManager.getGraphManager(Layer.UNDERLAY).getGraph());
-			// gClone.removeAttribute("layer");
->>>>>>> branch 'Jascha' of https://git.tk.informatik.tu-darmstadt.de/julien.gedeon/bp-scopviz.git
 			GraphDisplayManager.setCurrentLayer(Layer.SYMBOL);
-<<<<<<< HEAD
-=======
-			// GraphDisplayManager.addGraph(gClone, true);
->>>>>>> branch 'Jascha' of https://git.tk.informatik.tu-darmstadt.de/julien.gedeon/bp-scopviz.git
 			controller.topLeftAPane.getChildren().add(controller.symbolToolVBox);
 
 		}

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

@@ -171,7 +171,7 @@ public final class OptionsManager {
 
 		grid.add(new Label("Clicked Waypoint Color"), 0, row);
 		grid.add(waypointSelectedColorSymbolLayer, 1, row);
-		
+
 		row++;
 		grid.add(new Label("Logging level"), 0, row);
 		grid.add(loggingLevelSelector, 1, row);

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

@@ -354,10 +354,8 @@ public final class ToolboxManager {
 		}
 	}
 
-	
 	private static org.graphstream.graph.Node lastCreatedNode = null;
-	
-	
+
 	public static void createProcMaxDialog(org.graphstream.graph.Node n) {
 		if (n.equals(lastCreatedNode)) {
 			return;

+ 6 - 6
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/handlers/KeyboardShortcuts.java

@@ -26,7 +26,7 @@ public final class KeyboardShortcuts {
 	 * Reference to the GUI Controller for Access to various GUI Elements.
 	 */
 	private static GUIController controller;
-	
+
 	// example of keycombinations
 	final static KeyCombination mShift = new KeyCodeCombination(KeyCode.M, KeyCombination.SHIFT_DOWN);
 	final static KeyCombination rAltShift = new KeyCodeCombination(KeyCode.R, KeyCombination.ALT_DOWN,
@@ -45,7 +45,7 @@ public final class KeyboardShortcuts {
 	 *            the Stage
 	 */
 	public static void initialize(Stage primaryStage, GUIController c) {
-		
+
 		controller = c;
 		primaryStage.addEventFilter(KeyEvent.KEY_PRESSED, buttonsPressed);
 		primaryStage.addEventFilter(KeyEvent.KEY_RELEASED, buttonsReleased);
@@ -70,13 +70,13 @@ public final class KeyboardShortcuts {
 				}
 
 			}
-			
+
 			if (event.getCode() == KeyCode.ESCAPE) {
-				
-				//clears toolbox selection/selectionmode
+
+				// clears toolbox selection/selectionmode
 				controller.toolbox.getSelectionModel().clearSelection();
 				Main.getInstance().getGraphManager().deselectEdgeCreationNodes();
-				
+
 			}
 		}
 	};

+ 12 - 11
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/handlers/MyMouseManager.java

@@ -91,7 +91,8 @@ public class MyMouseManager extends DefaultMouseManager {
 			n.setAttribute("ui.class", "standard");
 			n.setAttribute("typeofNode", "standard");
 			graphManager.selectNode(n.getId());
-			Debug.out("INFORMATION: Added Node with ID " + n.getId() + " at Position (" + cursorPos.x + "/" + cursorPos.y + ")", 1);
+			Debug.out("INFORMATION: Added Node with ID " + n.getId() + " at Position (" + cursorPos.x + "/"
+					+ cursorPos.y + ")", 1);
 
 			break;
 
@@ -101,8 +102,8 @@ public class MyMouseManager extends DefaultMouseManager {
 			n.setAttribute("ui.class", "source");
 			n.setAttribute("typeofNode", "source");
 			graphManager.selectNode(n.getId());
-			Debug.out("INFORMATION: Added Source Node with ID " + n.getId() + " at Position (" + cursorPos.x + "/" + cursorPos.y
-					+ ")", 1);
+			Debug.out("INFORMATION: Added Source Node with ID " + n.getId() + " at Position (" + cursorPos.x + "/"
+					+ cursorPos.y + ")", 1);
 
 			break;
 
@@ -112,8 +113,8 @@ public class MyMouseManager extends DefaultMouseManager {
 			n.setAttribute("ui.class", "sink");
 			n.setAttribute("typeofNode", "sink");
 			graphManager.selectNode(n.getId());
-			Debug.out(
-					"INFORMATION: Added Sink Node with ID " + n.getId() + " at Position (" + cursorPos.x + "/" + cursorPos.y + ")", 1);
+			Debug.out("INFORMATION: Added Sink Node with ID " + n.getId() + " at Position (" + cursorPos.x + "/"
+					+ cursorPos.y + ")", 1);
 
 			break;
 
@@ -123,10 +124,10 @@ public class MyMouseManager extends DefaultMouseManager {
 			n.setAttribute("ui.class", "procEn");
 			n.setAttribute("typeofNode", "procEn");
 			ToolboxManager.createProcMaxDialog(n);
-			
+
 			graphManager.selectNode(n.getId());
-			Debug.out("INFORMATION: Added ProcEn Node with ID " + n.getId() + " at Position (" + cursorPos.x + "/" + cursorPos.y
-					+ ")", 1);
+			Debug.out("INFORMATION: Added ProcEn Node with ID " + n.getId() + " at Position (" + cursorPos.x + "/"
+					+ cursorPos.y + ")", 1);
 
 			break;
 
@@ -136,10 +137,10 @@ public class MyMouseManager extends DefaultMouseManager {
 			n.setAttribute("ui.class", "operator");
 			n.setAttribute("typeofNode", "operator");
 			ToolboxManager.createProcNeedDialog(n);
-			
+
 			graphManager.selectNode(n.getId());
-			Debug.out("INFORMATION: Added Operator Node with ID " + n.getId() + " at Position (" + cursorPos.x + "/" + cursorPos.y
-					+ ")", 1);
+			Debug.out("INFORMATION: Added Operator Node with ID " + n.getId() + " at Position (" + cursorPos.x + "/"
+					+ cursorPos.y + ")", 1);
 
 			break;