فهرست منبع

Merge remote-tracking branch 'origin/Julian' into Jascha

dominik 8 سال پیش
والد
کامیت
ee83ee1330

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

@@ -4,6 +4,8 @@ import javax.xml.stream.events.Attribute;
 import javax.xml.stream.events.XMLEvent;
 
 import de.tu_darmstadt.informatik.tk.scopviz.io.MyFileSourceGraphML;
+import de.tu_darmstadt.informatik.tk.scopviz.ui.ConsoleManager;
+import javafx.application.Platform;
 
 /**
  * Debug class to allow easy, static access to console output.
@@ -77,6 +79,7 @@ public final class Debug {
 	public static void out(String s) {
 		if (DEBUG_ENABLED) {
 			System.out.println(s);
+			Platform.runLater(() -> ConsoleManager.addNormalText(s));
 		}
 	}
 

+ 4 - 4
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/main/GUITheme.css

@@ -1,23 +1,23 @@
 .underlayButton{
-	-fx-background-image: url('/de/tu_darmstadt/informatik/tk/scopviz/main/test.png');
+	-fx-background-image: url('/de/tu_darmstadt/informatik/tk/scopviz/main/default_button.png');
   -fx-background-repeat: no-repeat;
   -fx-background-position: center
 }
 
 .operatorButton{
-	-fx-background-image: url('/de/tu_darmstadt/informatik/tk/scopviz/main/test.png');
+	-fx-background-image: url('/de/tu_darmstadt/informatik/tk/scopviz/main/default_button.png');
   -fx-background-repeat: no-repeat;
   -fx-background-position: center
 }
 
 .mappingButton{
-	-fx-background-image: url('/de/tu_darmstadt/informatik/tk/scopviz/main/test.png');
+	-fx-background-image: url('/de/tu_darmstadt/informatik/tk/scopviz/main/default_button.png');
   -fx-background-repeat: no-repeat;
   -fx-background-position: center
 }
 
 .symbolRepButton{
-	-fx-background-image: url('/de/tu_darmstadt/informatik/tk/scopviz/main/test.png');
+	-fx-background-image: url('/de/tu_darmstadt/informatik/tk/scopviz/main/sym_rep_button.png');
   -fx-background-repeat: no-repeat;
   -fx-background-position: center
 }

+ 7 - 10
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/main/MainWindow.fxml

@@ -17,7 +17,6 @@
 <?import javafx.scene.layout.Pane?>
 <?import javafx.scene.layout.StackPane?>
 <?import javafx.scene.layout.VBox?>
-<?import javafx.scene.text.Text?>
 <?import javafx.scene.text.TextFlow?>
 
 <VBox minHeight="768.0" minWidth="1024.0" prefHeight="768.0" prefWidth="1024.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.tu_darmstadt.informatik.tk.scopviz.ui.GUIController">
@@ -139,12 +138,12 @@
                                  <children>
                                     <VBox fx:id="rightSide" prefWidth="100.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
                                        <children>
-                                        <AnchorPane minWidth="170.0" VBox.vgrow="NEVER">
+                                        <AnchorPane minWidth="169.0" prefWidth="169.0" VBox.vgrow="NEVER">
                                              <children>
-                                                <Button fx:id="underlayButton" maxHeight="40.0" maxWidth="40.0" minHeight="40.0" minWidth="40.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="40.0" styleClass="underlayButton" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="3.0" />
-                                                <Button fx:id="operatorButton" layoutX="30.0" maxHeight="40.0" maxWidth="40.0" minHeight="40.0" minWidth="30.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="40.0" styleClass="operatorButton" AnchorPane.leftAnchor="45.0" AnchorPane.topAnchor="3.0" />
-                                                <Button fx:id="mappingButton" layoutX="60.0" maxHeight="40.0" maxWidth="40.0" minHeight="40.0" minWidth="30.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="40.0" styleClass="mappingButton" AnchorPane.leftAnchor="85.0" AnchorPane.topAnchor="3.0" />
-                                                <Button fx:id="symbolRepButton" layoutX="85.0" maxHeight="40.0" maxWidth="40.0" minHeight="40.0" minWidth="30.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="40.0" styleClass="symbolRepButton" AnchorPane.leftAnchor="125.0" AnchorPane.topAnchor="3.0" />
+                                                <Button fx:id="underlayButton" maxHeight="40.0" maxWidth="40.0" minHeight="40.0" minWidth="40.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="40.0" styleClass="underlayButton" AnchorPane.leftAnchor="3.0" AnchorPane.topAnchor="3.0" />
+                                                <Button fx:id="operatorButton" layoutX="30.0" maxHeight="40.0" maxWidth="40.0" minHeight="40.0" minWidth="40.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="40.0" styleClass="operatorButton" AnchorPane.leftAnchor="44.0" AnchorPane.topAnchor="3.0" />
+                                                <Button fx:id="mappingButton" layoutX="60.0" maxHeight="40.0" maxWidth="40.0" minHeight="40.0" minWidth="40.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="40.0" styleClass="mappingButton" AnchorPane.leftAnchor="85.0" AnchorPane.topAnchor="3.0" />
+                                                <Button fx:id="symbolRepButton" layoutX="85.0" maxHeight="40.0" maxWidth="40.0" minHeight="40.0" minWidth="40.0" mnemonicParsing="false" prefHeight="40.0" prefWidth="40.0" styleClass="symbolRepButton" AnchorPane.leftAnchor="126.0" AnchorPane.topAnchor="3.0" />
                                              </children>
                                           </AnchorPane>
                                           <AnchorPane VBox.vgrow="ALWAYS">
@@ -166,13 +165,11 @@
                                                 <Button fx:id="updateMetricButton" mnemonicParsing="false" prefHeight="25.0" text="Update metrics" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
                                              </children>
                                           </AnchorPane>
-                                          <ScrollPane fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" prefHeight="200.0" prefWidth="200.0" vbarPolicy="ALWAYS">
+                                          <ScrollPane fx:id="consoleScrollPane" fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" prefHeight="200.0" prefWidth="200.0" vbarPolicy="ALWAYS" vvalue="1.0">
                                              <content>
                                                 <TextFlow fx:id="consoleWindow" lineSpacing="0.5" styleClass="consoleWindow">
-                                                   <children>                                     
-                                                   </children>
                                                    <padding>
-                                                      <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
+                                                      <Insets bottom="5.0" left="5.0" right="5.0" />
                                                    </padding>
                                                 </TextFlow>
                                              </content>

+ 0 - 0
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/main/test.png → scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/main/default_button.png


BIN
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/main/sym_rep_button.png


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

@@ -194,7 +194,7 @@ public final class ButtonManager {
 		
 		// show metricbox/update button
 		if (!(GraphDisplayManager.getCurrentLayer().equals(Layer.MAPPING))) {
-			controller.rightSide.getChildren().add(controller.updateButtonAPane);
+			controller.rightSide.getChildren().add(2,controller.updateButtonAPane);
 			controller.metricbox.setVisible(true);
 		}
 

+ 10 - 0
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/ConsoleManager.java

@@ -1,5 +1,7 @@
 package de.tu_darmstadt.informatik.tk.scopviz.ui;
 
+import javafx.collections.ListChangeListener;
+import javafx.scene.Node;
 import javafx.scene.paint.Color;
 import javafx.scene.text.Text;
 
@@ -23,6 +25,14 @@ public class ConsoleManager {
 	 */
 	public static void initialize(GUIController c) {
 		controller = c;
+		
+		//behaviour for autoscrolling of the console window
+		controller.consoleWindow.getChildren().addListener(
+                (ListChangeListener<Node>) ((change) -> {
+                	controller.consoleWindow.layout();
+                	controller.consoleScrollPane.layout();
+                	controller.consoleScrollPane.setVvalue(1.0f);
+                }));
 	}
 
 	/**

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

@@ -28,6 +28,7 @@ import javafx.scene.control.CheckBox;
 import javafx.scene.control.ChoiceBox;
 import javafx.scene.control.Label;
 import javafx.scene.control.MenuItem;
+import javafx.scene.control.ScrollPane;
 import javafx.scene.control.TableColumn;
 import javafx.scene.control.TableRow;
 import javafx.scene.control.TableView;
@@ -148,6 +149,8 @@ public class GUIController implements Initializable {
 	@FXML
 	public ChoiceBox<String> mapViewChoiceBox;
 
+	@FXML
+	public ScrollPane consoleScrollPane;
 	@FXML
 	public TextFlow consoleWindow;
 
@@ -477,8 +480,9 @@ public class GUIController implements Initializable {
 		assert propertiesTypeColumn != null : "fx:id=\"propertiesType\" was not injected: check your FXML file 'MainWindow.fxml'.";
 
 		assert rightSide != null : "fx:id=\"rightSide\" was not injected: check your FXML file 'MainWindow.fxml'.";
+		assert consoleScrollPane != null : "fx:id=\"consoleScrollPane\" was not injected: check your FXML file 'MainWindow.fxml'.";
 		assert consoleWindow != null : "fx:id=\"consoleWindow\" was not injected: check your FXML file 'MainWindow.fxml'.";
-
+		
 		assert metricBoxMetricColumn != null : "fx:id=\"metricBoxMetricColumn\" was not injected: check your FXML file 'MainWindow.fxml'.";
 		assert metricBoxValueColumn != null : "fx:id=\"metricBoxValueColumn\" was not injected: check your FXML file 'MainWindow.fxml'.";
 		assert metricBoxUpdateColumn != null : "fx:id=\"metricBoxUpdateColumn\" was not injected: check your FXML file 'MainWindow.fxml'.";

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

@@ -99,6 +99,7 @@ public final class PropertiesManager {
 	private static void setItemRules() {
 
 		// setting the order for specific properties
+		itemOrderRules.add("weight");
 		itemOrderRules.add("ID");
 		itemOrderRules.add("typeofNode");
 		itemOrderRules.add("typeofDevice");