Commit 21c9197c authored by Stefan Michel's avatar Stefan Michel

networking funktioniert jetzt

parent 0bed38d8
......@@ -78,7 +78,7 @@ public class DataBaseEntryDialogBox {
res = res.trim();
String[] tags = res.split(" ");
terrainController.parseXML(terrain.getName());
System.out.println(terrainController.loadXMLToString(terrain.getName()));
worked = databaseManager.insertExample(text.trim(), terrainController.loadXMLToString(terrain.getName()), tags);
if (!worked)
new Alert(Alert.AlertType.ERROR, "Fehler!"
......
......@@ -230,14 +230,9 @@ public class TerrainController {
if (node.getNodeType() == Node.ELEMENT_NODE) {
int column = Integer.parseInt(columnList.item(i).getAttributes().getNamedItem("index").getNodeValue());
int row = Integer.parseInt(node.getAttributes().getNamedItem("index").getNodeValue());
System.out.print("Value [" + column + "] [" + row + "] : ");
map[column][row] = Integer.parseInt(node.getTextContent());
System.out.println(node.getTextContent());
}
}
System.out.println();
}
terrain.setMap(map);
......
......@@ -89,9 +89,6 @@ public class MainViewCreationFX extends BorderPane implements Observer {
splitPane.getItems().addAll(textArea, terrainPane);
//TODO anderen weg finden das center den gesamten bereich ausfuellt
splitPane.setPrefHeight(400);
//label erstellen
footer = new Label("Herzlich willkommen!");
footer.setMinHeight(20);
......@@ -102,15 +99,8 @@ public class MainViewCreationFX extends BorderPane implements Observer {
this.setCenter(splitPane);
this.setBottom(footer);
this.getBottom().maxHeight(0);
//elemente in die VBox einsetzen und returnen
// this.getBottom().maxHeight(0);
// this.getChildren().addAll(menuBar, borderPane);
//ioController erstellen
ioController.setMainViewCreationFX(this);
}
......@@ -250,7 +240,6 @@ public class MainViewCreationFX extends BorderPane implements Observer {
String code = getInputText();
try {
networkManager.sendRequest(code, terrain);
anfrageSchicken.setDisable(true);
anfrageHolen.setDisable(false);
} catch (NullPointerException e) {
......@@ -358,6 +347,7 @@ public class MainViewCreationFX extends BorderPane implements Observer {
MenuItem drucken = new MenuItem("_Drucken");
MenuItem groesse = new MenuItem("_Größe ändern...");
groesse.setOnAction(event -> new SetMapSizeDialogBox(terrain));
//Togglemenu wird gebaut
ToggleGroup toggleGroup = new ToggleGroup();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment