|
@@ -2,6 +2,10 @@ package de.tu_darmstadt.informatik.tk.scopviz.ui;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
|
+import de.tu_darmstadt.informatik.tk.scopviz.ui.mapView.CustomWaypointRenderer;
|
|
|
+import de.tu_darmstadt.informatik.tk.scopviz.ui.mapView.EdgePainter;
|
|
|
+import de.tu_darmstadt.informatik.tk.scopviz.ui.mapView.MapViewFunctions;
|
|
|
+import de.tu_darmstadt.informatik.tk.scopviz.ui.mapView.WorldView;
|
|
|
import javafx.application.Platform;
|
|
|
import javafx.collections.FXCollections;
|
|
|
import javafx.geometry.Insets;
|
|
@@ -68,6 +72,32 @@ public final class OptionsManager {
|
|
|
|
|
|
TextField defaultLatitudeField = new TextField(Double.toString(defaultLat));
|
|
|
TextField defaultLongitudeField = new TextField(Double.toString(defaultLong));
|
|
|
+
|
|
|
+
|
|
|
+ // Symbol Layer options
|
|
|
+ ChoiceBox<String> edgeSelectedColorSymbolLayer = new ChoiceBox<String>();
|
|
|
+ edgeSelectedColorSymbolLayer.setItems(FXCollections.observableArrayList("Red", "Black", "Blue", "Green", "Yellow", "Orange", "Gray"));
|
|
|
+ edgeSelectedColorSymbolLayer.getSelectionModel().select(EdgePainter.getClickedColor());
|
|
|
+
|
|
|
+ ChoiceBox<String> edgePlacementColorSymbolLayer = new ChoiceBox<String>();
|
|
|
+ edgePlacementColorSymbolLayer.setItems(FXCollections.observableArrayList("Blue", "Black", "Red", "Green", "Yellow", "Orange", "Gray"));
|
|
|
+ edgePlacementColorSymbolLayer.getSelectionModel().select(EdgePainter.getPlacementColor());
|
|
|
+
|
|
|
+ ChoiceBox<String> edgeStandardColorSymbolLayer = new ChoiceBox<String>();
|
|
|
+ edgeStandardColorSymbolLayer.setItems(FXCollections.observableArrayList("Black", "Red", "Blue", "Green", "Yellow", "Orange", "Gray"));
|
|
|
+ edgeStandardColorSymbolLayer.getSelectionModel().select(EdgePainter.getStandardColor());
|
|
|
+
|
|
|
+ ChoiceBox<String> waypointStandardColorSymbolLayer = new ChoiceBox<String>();
|
|
|
+ waypointStandardColorSymbolLayer.setItems(FXCollections.observableArrayList("Black", "Red", "Blue", "Green", "Yellow", "Orange", "Gray"));
|
|
|
+ waypointStandardColorSymbolLayer.getSelectionModel().select(CustomWaypointRenderer.getStandardColor());
|
|
|
+
|
|
|
+ ChoiceBox<String> waypointSelectedColorSymbolLayer = new ChoiceBox<String>();
|
|
|
+ waypointSelectedColorSymbolLayer.setItems(FXCollections.observableArrayList("Red", "Black", "Blue", "Green", "Yellow", "Orange", "Gray"));
|
|
|
+ waypointSelectedColorSymbolLayer.getSelectionModel().select(CustomWaypointRenderer.getClickedColor());
|
|
|
+
|
|
|
+ TextField edgeThickness = new TextField(Integer.toString(EdgePainter.getThickness()));
|
|
|
+
|
|
|
+ TextField waypointSize = new TextField(Integer.toString(CustomWaypointRenderer.getWaypointSize()));
|
|
|
|
|
|
// position elements on grid
|
|
|
grid.add(new Label("Default weight of edges:"), 0, 0);
|
|
@@ -83,6 +113,32 @@ public final class OptionsManager {
|
|
|
grid.add(defaultLatitudeField, 1, 4);
|
|
|
grid.add(new Label("Longitude:"), 0, 5);
|
|
|
grid.add(defaultLongitudeField, 1, 5);
|
|
|
+
|
|
|
+ // symbol layer stuff
|
|
|
+ grid.add(new Label(""), 1, 6);
|
|
|
+ grid.add(new Label("Symbol-Layer Options"), 1, 7);
|
|
|
+ grid.add(new Label("Waypoint Size (int):"), 0, 8);
|
|
|
+ grid.add(waypointSize, 1, 8);
|
|
|
+
|
|
|
+ grid.add(new Label("Edge thickness (int):"), 0, 9);
|
|
|
+ grid.add(edgeThickness, 1, 9);
|
|
|
+
|
|
|
+ grid.add(new Label("Edge Colors"), 1, 10);
|
|
|
+ grid.add(new Label("Standard Edge Color"), 0, 11);
|
|
|
+ grid.add(edgeStandardColorSymbolLayer, 1, 11);
|
|
|
+
|
|
|
+ grid.add(new Label("Clicked Edge Color"), 0, 12);
|
|
|
+ grid.add(edgeSelectedColorSymbolLayer, 1, 12);
|
|
|
+
|
|
|
+ grid.add(new Label("Placement Edge Color"), 0, 13);
|
|
|
+ grid.add(edgePlacementColorSymbolLayer, 1, 13);
|
|
|
+
|
|
|
+ grid.add(new Label("Waypoint Colors"), 1, 14);
|
|
|
+ grid.add(new Label("Standard Waypoint Color"), 0, 15);
|
|
|
+ grid.add(waypointStandardColorSymbolLayer, 1, 15);
|
|
|
+
|
|
|
+ grid.add(new Label("Clicked Waypoint Color"), 0, 16);
|
|
|
+ grid.add(waypointSelectedColorSymbolLayer, 1, 16);
|
|
|
|
|
|
// set dialog
|
|
|
addPropDialog.getDialogPane().setContent(grid);
|
|
@@ -100,10 +156,29 @@ public final class OptionsManager {
|
|
|
defaultLat = Double.parseDouble(defaultLatitudeField.getText());
|
|
|
defaultLong = Double.parseDouble(defaultLongitudeField.getText());
|
|
|
}
|
|
|
+
|
|
|
+ // symbol layer edge thickness
|
|
|
+ if(Integer.parseInt(edgeThickness.getText()) != EdgePainter.getThickness()) {
|
|
|
+ EdgePainter.setEdgeThickness(Integer.parseInt(edgeThickness.getText()));
|
|
|
+ }
|
|
|
+ // symbol layer waypoint size
|
|
|
+ if(Integer.parseInt(waypointSize.getText()) != CustomWaypointRenderer.getWaypointSize()) {
|
|
|
+ CustomWaypointRenderer.setScaleSize(Integer.parseInt(waypointSize.getText()));
|
|
|
+ MapViewFunctions.resetImageMap();
|
|
|
+ MapViewFunctions.initializeWaypointImages();
|
|
|
+ }
|
|
|
+
|
|
|
} catch (NumberFormatException e) {
|
|
|
}
|
|
|
showWeight = showWeightButton.isSelected();
|
|
|
StylesheetManager.adjustNodeGraphics(nodeGraphicsSelector.getValue());
|
|
|
+
|
|
|
+ // color types of waypoints and edges
|
|
|
+ EdgePainter.setColor(edgeStandardColorSymbolLayer.getValue(), edgePlacementColorSymbolLayer.getValue(), edgeSelectedColorSymbolLayer.getValue());
|
|
|
+ CustomWaypointRenderer.setColor(waypointStandardColorSymbolLayer.getValue(), waypointSelectedColorSymbolLayer.getValue());
|
|
|
+
|
|
|
+ WorldView.internMapViewer.repaint();
|
|
|
+
|
|
|
return null;
|
|
|
} else
|
|
|
return null;
|