Parcourir la source

Added layer buttons and references of them in GUIController

dominik il y a 8 ans
Parent
commit
4ac59bdd62

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

@@ -153,4 +153,53 @@ public class ButtonManager {
 			}
 		}
 	};
+	
+	
+	
+	
+	public static EventHandler<ActionEvent> underlayHandler = new EventHandler<ActionEvent>(){
+
+		@Override
+		public void handle(ActionEvent arg0) {
+			// TODO Auto-generated method stub
+			
+		}
+		
+		
+	};
+	
+	public static EventHandler<ActionEvent> operatorHandler = new EventHandler<ActionEvent>(){
+
+		@Override
+		public void handle(ActionEvent arg0) {
+			// TODO Auto-generated method stub
+			
+		}
+		
+		
+	};
+	
+	public static EventHandler<ActionEvent> mappingHandler = new EventHandler<ActionEvent>(){
+
+		@Override
+		public void handle(ActionEvent arg0) {
+			// TODO Auto-generated method stub
+			
+		}
+			
+			
+	};
+		
+	public static EventHandler<ActionEvent> symbolRepHandler = new EventHandler<ActionEvent>(){
+
+		@Override
+		public void handle(ActionEvent arg0) {
+			// TODO Auto-generated method stub
+			
+		}
+			
+			
+	};
+	
+	
 }

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

@@ -52,6 +52,15 @@ public class GUIController implements Initializable {
 	public Button createNode;
 	@FXML
 	public Button createEdge;
+	
+	@FXML
+	public Button underlayButton;
+	@FXML
+	public Button operatorButton;
+	@FXML
+	public Button mappingButton;
+	@FXML
+	public Button symbolRepButton;
 
 	// The contents of the corresponding ScrollPanes
 	@FXML
@@ -89,6 +98,11 @@ public class GUIController implements Initializable {
 		assert createNode != null : "fx:id=\"createNode\" was not injected: check your FXML file 'NewBetterCoolerWindowTest.fxml'.";
 		assert createEdge != null : "fx:id=\"createEdge\" was not injected: check your FXML file 'NewBetterCoolerWindowTest.fxml'.";
 
+		assert underlayButton != null : "fx:id=\"underlayButton\" was not injected: check your FXML file 'NewBetterCoolerWindowTest.fxml'.";
+		assert operatorButton != null : "fx:id=\"operatorButton\" was not injected: check your FXML file 'NewBetterCoolerWindowTest.fxml'.";
+		assert mappingButton != null : "fx:id=\"mappingButton\" was not injected: check your FXML file 'NewBetterCoolerWindowTest.fxml'.";
+		assert symbolRepButton != null : "fx:id=\"symbolRepButton\" was not injected: check your FXML file 'NewBetterCoolerWindowTest.fxml'.";
+
 		assert layerListView != null : "fx:id=\"layerListView\" was not injected: check your FXML file 'NewBetterCoolerWindowTest.fxml'.";
 	
 		assert toolbox != null : "fx:id=\"toolbox\" was not injected: check your FXML file 'NewBetterCoolerWindowTest.fxml'.";
@@ -117,6 +131,7 @@ public class GUIController implements Initializable {
 		// Bind all the handlers to their corresponding UI elements
 		initializeZoomButtons();
 		initializeCreateButtons();
+		initializeLayerButton();
 		initializeDisplayPane();
 	}
 
@@ -136,6 +151,13 @@ public class GUIController implements Initializable {
 		createEdge.setOnAction(ButtonManager.createEdgeHandler);
 		swingNode.setOnMouseClicked(ButtonManager.clickedHandler);
 	}
+	
+	private void initializeLayerButton(){
+		underlayButton.setOnAction(ButtonManager.underlayHandler);
+		operatorButton.setOnAction(ButtonManager.operatorHandler);
+		mappingButton.setOnAction(ButtonManager.mappingHandler);
+		symbolRepButton.setOnAction(ButtonManager.symbolRepHandler);
+	}
 
 	/**
 	 * Sets the minimum size and adds the handlers to the graph display.

+ 4 - 0
scopviz/src/main/resources/NewBetterCoolerWindowTest.fxml

@@ -113,6 +113,10 @@
                                         <AnchorPane>
                                              <children>
                                                 <ListView fx:id="layerListView" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
+                                                <Button fx:id="underlayButton" mnemonicParsing="false" text="Underlay" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="5.0" />
+                                                <Button fx:id="operatorButton" layoutX="10.0" layoutY="10.0" mnemonicParsing="false" text="Operator" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="35.0" />
+                                                <Button fx:id="mappingButton" layoutX="10.0" layoutY="10.0" mnemonicParsing="false" text="Mapping" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="65.0" />
+                                                <Button fx:id="symbolRepButton" layoutX="10.0" layoutY="10.0" mnemonicParsing="false" text="Symbol Rep." AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="95.0" />
                                              </children>
                                           </AnchorPane>
                                         <AnchorPane>