Browse Source

added Tooltips and ampping loading

jascha Bohne 8 years ago
parent
commit
3b9abd093e

+ 5 - 5
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/metrics/ScopvizGraphOperator.java

@@ -6,12 +6,12 @@ import de.tu_darmstadt.informatik.tk.scopviz.main.MyGraph;
 
 public interface ScopvizGraphOperator {
 
-	/**
-	 * Returns true if the GraphOperator requires the Setup() to be called if
-	 * this is false setup() will not be called.
+	/**Metric
+	 * Returns true if the GraphOperator requires the Setup() to be called 
+	 * if this is false setup() will not be called.
 	 */
-	public boolean isSetupRequired();
-
+	public boolean isSetupRequired ();
+	
 	/**
 	 * calculates a new Version of the Graph using the given operator.
 	 * 

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

@@ -123,6 +123,7 @@ public final class ButtonManager {
 		ToolboxManager.setUnderlayItems();
 		setBorderStyle((Button) arg0.getSource());
 
+		controller.getOpenButton().setText("Open...");
 	}
 
 	/**
@@ -137,6 +138,8 @@ public final class ButtonManager {
 
 		ToolboxManager.setOperatorItems();
 		setBorderStyle((Button) arg0.getSource());
+
+		controller.getOpenButton().setText("Open...");
 	}
 
 	/**
@@ -152,6 +155,7 @@ public final class ButtonManager {
 		ToolboxManager.setMappingItems();
 		setBorderStyle((Button) arg0.getSource());
 
+		controller.getOpenButton().setText("Open Mapping...");
 	}
 
 	/**
@@ -173,6 +177,8 @@ public final class ButtonManager {
 
 		GraphDisplayManager.switchActiveGraph();
 		setBorderStyle((Button) arg0.getSource());
+		
+		controller.getOpenButton().setText("Open...");
 	}
 
 	/**

+ 18 - 0
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/GUIController.java

@@ -31,6 +31,7 @@ import javafx.scene.control.MenuItem;
 import javafx.scene.control.TableColumn;
 import javafx.scene.control.TableRow;
 import javafx.scene.control.TableView;
+import javafx.scene.control.Tooltip;
 import javafx.scene.control.cell.PropertyValueFactory;
 import javafx.scene.control.cell.TextFieldTableCell;
 import javafx.scene.layout.Pane;
@@ -254,6 +255,19 @@ public class GUIController implements Initializable {
 		mappingButton.setOnAction((event) -> ButtonManager.mappingAction(event));
 		symbolRepButton.setOnAction((event) -> ButtonManager.symbolRepAction(event));
 
+		Tooltip tip = new Tooltip();
+		tip.setText("Underlay");
+		underlayButton.setTooltip(tip);
+		tip = new Tooltip();
+		tip.setText("Operator");
+		operatorButton.setTooltip(tip);
+		tip = new Tooltip();
+		tip.setText("Mapping");
+		mappingButton.setTooltip(tip);
+		tip = new Tooltip();
+		tip.setText("Geographical Visualization");
+		symbolRepButton.setTooltip(tip);
+		
 		ArrayList<Button> layerButtons = new ArrayList<Button>();
 		layerButtons.add(underlayButton);
 		layerButtons.add(operatorButton);
@@ -418,4 +432,8 @@ public class GUIController implements Initializable {
 		assert stackPane != null : "fx:id=\"stackPane\" was not injected: check your FXML file 'MainWindow.fxml'.";
 		assert swingNodeWorldView != null : "fx:id=\"swingNodeWorldView\" was not injected: check your FXML file 'MainWindow.fxml'.";
 	}
+	
+	MenuItem getOpenButton(){
+		return open;
+	}
 }

+ 5 - 0
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/MenuBarManager.java

@@ -2,6 +2,7 @@ package de.tu_darmstadt.informatik.tk.scopviz.ui;
 
 import de.tu_darmstadt.informatik.tk.scopviz.io.GraphMLExporter;
 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 javafx.event.ActionEvent;
 import javafx.scene.control.Alert;
@@ -35,7 +36,11 @@ public final class MenuBarManager {
 	 * Handler for the "open" MenuItem.
 	 */
 	public static final void openAction(ActionEvent event) {
+		if (GraphDisplayManager.getCurrentLayer()==Layer.MAPPING){
+		GraphDisplayManager.readMapping();	
+		} else {
 		GraphDisplayManager.addGraph(Main.getInstance().getPrimaryStage(), true);
+		}
 	}
 
 	/**