bug fixes
This commit is contained in:
parent
85a599cda5
commit
22cc69ecf7
2
pom.xml
2
pom.xml
@ -60,7 +60,7 @@
|
||||
<!-- Default configuration for running with: mvn clean javafx:run -->
|
||||
<id>default-cli</id>
|
||||
<configuration>
|
||||
<mainClass>com.example.vpr_javafx/com.example.vpr_javafx.HelloApplication</mainClass>
|
||||
<mainClass>com.example.vpr_javafx/com.example.vpr_javafx.MainApplication</mainClass>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
@ -289,7 +289,7 @@ public class Data {
|
||||
* @return phoneNumberValid, passwordValid
|
||||
* @author Kevin Maier, Kevin Pfannenstiel
|
||||
*/
|
||||
public boolean validateData(TextField tfPhone, PasswordField pfPassword, HelloController controller)
|
||||
public boolean validateData(TextField tfPhone, PasswordField pfPassword, MainController controller)
|
||||
{
|
||||
boolean phoneNumberMatchFound;
|
||||
boolean passwordMatchFound;
|
||||
@ -411,7 +411,7 @@ public class Data {
|
||||
* @param controller Controller
|
||||
* @return phoneNumberValid, passwordValid, postalCodeValid
|
||||
*/
|
||||
public boolean validateRegistration(TextField tfName, TextField tfPhone, PasswordField pfPassword, TextField tfStreet, TextField tfHouseNumber, TextField tfPostalCode, TextField tfCity, TextField tfChild, HelloController controller)
|
||||
public boolean validateRegistration(TextField tfName, TextField tfPhone, PasswordField pfPassword, TextField tfStreet, TextField tfHouseNumber, TextField tfPostalCode, TextField tfCity, TextField tfChild, MainController controller)
|
||||
{
|
||||
boolean phoneNumberMatchFound;
|
||||
boolean passwordMatchFound;
|
||||
|
@ -1,42 +0,0 @@
|
||||
//package com.example.vpr_javafx;
|
||||
//
|
||||
//import java.io.IOException;
|
||||
//import java.nio.file.Files;
|
||||
//import java.nio.file.Paths;
|
||||
//import java.util.HashMap;
|
||||
//import java.util.List;
|
||||
//
|
||||
//public class LoginDatei
|
||||
//{
|
||||
// private final String dateiname;
|
||||
//
|
||||
// public LoginDatei(String dateiname)
|
||||
// {
|
||||
// this.dateiname = dateiname;
|
||||
// }
|
||||
//
|
||||
// public HashMap<String, String> readFile()
|
||||
// {
|
||||
// try {
|
||||
// List<String> lines = Files.readAllLines(Paths.get(dateiname));
|
||||
//
|
||||
// HashMap<String, String> user = new HashMap<>();
|
||||
//
|
||||
// for (int i = 0; i < lines.size(); i++)
|
||||
// {
|
||||
// String[] parts = lines.get(i).split(";");
|
||||
//
|
||||
// String phoneNumber = parts[3];
|
||||
// String password = parts[5];
|
||||
//
|
||||
// user.put(phoneNumber, password);
|
||||
// }
|
||||
//
|
||||
// return user;
|
||||
//
|
||||
// } catch (IOException e) {
|
||||
// e.printStackTrace();
|
||||
// return new HashMap<>();
|
||||
// }
|
||||
// }
|
||||
//}
|
@ -7,15 +7,15 @@ import javafx.stage.Stage;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class HelloApplication extends Application {
|
||||
public class MainApplication extends Application {
|
||||
@Override
|
||||
public void start(Stage stage) throws IOException {
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(HelloApplication.class.getResource("MenuOverview-view.fxml"));
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(MainApplication.class.getResource("MenuOverview-view.fxml"));
|
||||
Scene scene = new Scene(fxmlLoader.load(),1000, 800);
|
||||
stage.setTitle("Mittagsbestellung");
|
||||
stage.setScene(scene);
|
||||
stage.show();
|
||||
HelloController controller = fxmlLoader.getController();
|
||||
MainController controller = fxmlLoader.getController();
|
||||
controller.FillLabels();
|
||||
controller.writeAllergene();
|
||||
}
|
@ -12,7 +12,6 @@ import javafx.scene.Scene;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
import javafx.scene.layout.StackPane;
|
||||
import javafx.stage.Stage;
|
||||
import java.io.FileWriter;
|
||||
@ -22,7 +21,7 @@ import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class HelloController {
|
||||
public class MainController {
|
||||
|
||||
@FXML
|
||||
private Label lMonH1;
|
@ -7,7 +7,7 @@
|
||||
<?import javafx.scene.shape.*?>
|
||||
<?import javafx.scene.text.*?>
|
||||
|
||||
<AnchorPane fx:id="anchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="795.0" prefWidth="980.0" style="-fx-background-color: #f0C8bd;" xmlns="http://javafx.com/javafx/11.0.14-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.vpr_javafx.HelloController">
|
||||
<AnchorPane fx:id="anchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="795.0" prefWidth="980.0" style="-fx-background-color: #f0C8bd;" xmlns="http://javafx.com/javafx/11.0.14-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.vpr_javafx.MainController">
|
||||
<Label layoutX="97.0" layoutY="176.0" text="Montag" textFill="#6f7baf">
|
||||
<font>
|
||||
<Font name="Century Gothic Bold" size="13.0" />
|
||||
|
@ -6,7 +6,7 @@
|
||||
<?import javafx.scene.shape.*?>
|
||||
<?import javafx.scene.text.*?>
|
||||
|
||||
<AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.14-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.vpr_javafx.HelloController">
|
||||
<AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.14-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.vpr_javafx.MainController">
|
||||
<Label layoutX="27.0" layoutY="160.0" style="-fx-font-weight: bold; -fx-font-family: century gothic; -fx-font-size: 14; -fx-text-fill: #746FA6;" text="Montag" textFill="BLUE">
|
||||
<font>
|
||||
<Font name="Century Gothic" size="13.0" />
|
||||
|
@ -3,7 +3,7 @@
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.14-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.vpr_javafx.HelloController">
|
||||
<AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.14-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.vpr_javafx.MainController">
|
||||
<children>
|
||||
<GridPane layoutX="81.0" layoutY="50.0" prefHeight="272.0" prefWidth="496.0">
|
||||
<columnConstraints>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.scene.text.*?>
|
||||
|
||||
<AnchorPane prefHeight="400.0" prefWidth="600.0" style="-fx-background-color: #F0C8BD;" xmlns="http://javafx.com/javafx/11.0.2" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.vpr_javafx.HelloController">
|
||||
<AnchorPane prefHeight="400.0" prefWidth="600.0" style="-fx-background-color: #F0C8BD;" xmlns="http://javafx.com/javafx/11.0.2" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.vpr_javafx.MainController">
|
||||
<children>
|
||||
<GridPane layoutX="50.0" layoutY="62.0" prefHeight="275.0" prefWidth="500.0" style="-fx-background-color: #F0C8BD;">
|
||||
<columnConstraints>
|
||||
|
@ -12,7 +12,7 @@
|
||||
<?import javafx.scene.shape.Line?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
|
||||
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="742.0" prefWidth="980.0" style="-fx-background-color: #f0C8bd;" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.vpr_javafx.HelloController">
|
||||
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="742.0" prefWidth="980.0" style="-fx-background-color: #f0C8bd;" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.vpr_javafx.MainController">
|
||||
<Label layoutX="76.0" layoutY="176.0" text="Montag" textFill="#6f7baf">
|
||||
<font>
|
||||
<Font name="Century Gothic Bold" size="13.0" />
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -7,7 +7,7 @@
|
||||
<?import javafx.scene.shape.*?>
|
||||
<?import javafx.scene.text.*?>
|
||||
|
||||
<AnchorPane fx:id="anchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="795.0" prefWidth="980.0" style="-fx-background-color: #f0C8bd;" xmlns="http://javafx.com/javafx/11.0.14-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.vpr_javafx.HelloController">
|
||||
<AnchorPane fx:id="anchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="795.0" prefWidth="980.0" style="-fx-background-color: #f0C8bd;" xmlns="http://javafx.com/javafx/11.0.14-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.vpr_javafx.MainController">
|
||||
<Label layoutX="97.0" layoutY="176.0" text="Montag" textFill="#6f7baf">
|
||||
<font>
|
||||
<Font name="Century Gothic Bold" size="13.0" />
|
||||
|
@ -6,7 +6,7 @@
|
||||
<?import javafx.scene.shape.*?>
|
||||
<?import javafx.scene.text.*?>
|
||||
|
||||
<AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.14-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.vpr_javafx.HelloController">
|
||||
<AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.14-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.vpr_javafx.MainController">
|
||||
<Label layoutX="27.0" layoutY="160.0" style="-fx-font-weight: bold; -fx-font-family: century gothic; -fx-font-size: 14; -fx-text-fill: #746FA6;" text="Montag" textFill="BLUE">
|
||||
<font>
|
||||
<Font name="Century Gothic" size="13.0" />
|
||||
|
@ -3,7 +3,7 @@
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
|
||||
<AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.14-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.vpr_javafx.HelloController">
|
||||
<AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.14-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.vpr_javafx.MainController">
|
||||
<children>
|
||||
<GridPane layoutX="81.0" layoutY="50.0" prefHeight="272.0" prefWidth="496.0">
|
||||
<columnConstraints>
|
||||
|
@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.scene.text.*?>
|
||||
|
||||
<AnchorPane prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.14-internal" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.vpr_javafx.HelloController">
|
||||
<AnchorPane prefHeight="400.0" prefWidth="600.0" style="-fx-background-color: #F0C8BD;" xmlns="http://javafx.com/javafx/11.0.2" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.vpr_javafx.MainController">
|
||||
<children>
|
||||
<GridPane layoutX="50.0" layoutY="62.0" prefHeight="275.0" prefWidth="500.0">
|
||||
<GridPane layoutX="50.0" layoutY="62.0" prefHeight="275.0" prefWidth="500.0" style="-fx-background-color: #F0C8BD;">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="153.0" minWidth="10.0" prefWidth="85.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="261.0" minWidth="10.0" prefWidth="200.0" />
|
||||
@ -23,22 +23,70 @@
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Label text="Name" />
|
||||
<Label text="Handynummer" GridPane.rowIndex="1" />
|
||||
<Label prefWidth="95.0" text="Passwort: " GridPane.rowIndex="2" />
|
||||
<Label text="Kind:" GridPane.rowIndex="5" />
|
||||
<Label text="Straße" GridPane.rowIndex="3" />
|
||||
<Label text="Ort" GridPane.rowIndex="4" />
|
||||
<Button mnemonicParsing="false" onAction="#OnRegistrationButton" prefHeight="26.0" prefWidth="90.0" text="Abschicken" translateX="100.0" GridPane.columnIndex="1" GridPane.rowIndex="7" />
|
||||
<PasswordField fx:id="pfPassword" promptText="Passwort" GridPane.columnIndex="1" GridPane.rowIndex="2" />
|
||||
<TextField fx:id="tfName" promptText="Voller Name" GridPane.columnIndex="1" />
|
||||
<TextField fx:id="tfPhone" promptText="Handynummer" GridPane.columnIndex="1" GridPane.rowIndex="1" />
|
||||
<TextField fx:id="tfChild" promptText="Kind" GridPane.columnIndex="1" GridPane.rowIndex="5" />
|
||||
<TextField GridPane.columnIndex="1" GridPane.rowIndex="4" />
|
||||
<TextField fx:id="tfStreet" prefWidth="254.0" promptText="Straße" GridPane.columnIndex="1" GridPane.rowIndex="3" />
|
||||
<TextField fx:id="tfHouseNumber" prefWidth="123.0" promptText="Hausnummer" GridPane.columnIndex="2" GridPane.rowIndex="3"/>
|
||||
<TextField fx:id="tfPostalCode" promptText="Postleitzahl" GridPane.columnIndex="1" GridPane.rowIndex="4" />
|
||||
<TextField fx:id="tfCity" promptText="Ort" GridPane.columnIndex="2" GridPane.rowIndex="4" />
|
||||
<Label text="Name:" textFill="#746fa6">
|
||||
<font>
|
||||
<Font name="Century Gothic Bold" size="12.0" />
|
||||
</font></Label>
|
||||
<Label text="Handynummer:" textFill="#746fa6" GridPane.rowIndex="1">
|
||||
<font>
|
||||
<Font name="Century Gothic Bold" size="12.0" />
|
||||
</font></Label>
|
||||
<Label prefWidth="95.0" text="Passwort: " textFill="#746fa6" GridPane.rowIndex="2">
|
||||
<font>
|
||||
<Font name="Century Gothic Bold" size="12.0" />
|
||||
</font></Label>
|
||||
<Label text="Kind:" textFill="#746fa6" GridPane.rowIndex="5">
|
||||
<font>
|
||||
<Font name="Century Gothic Bold" size="12.0" />
|
||||
</font></Label>
|
||||
<Label text="Straße:" textFill="#746fa6" GridPane.rowIndex="3">
|
||||
<font>
|
||||
<Font name="Century Gothic Bold" size="12.0" />
|
||||
</font></Label>
|
||||
<Label text="Ort:" textFill="#746fa6" GridPane.rowIndex="4">
|
||||
<font>
|
||||
<Font name="Century Gothic Bold" size="12.0" />
|
||||
</font></Label>
|
||||
<Button mnemonicParsing="false" onAction="#OnRegistrationButton" prefHeight="26.0" prefWidth="90.0" style="-fx-background-color: #CBC7F0; -fx-border-color: #746FA6;" text="Abschicken" textFill="WHITE" translateX="100.0" GridPane.columnIndex="1" GridPane.rowIndex="7">
|
||||
<font>
|
||||
<Font name="Century Gothic" size="12.0" />
|
||||
</font></Button>
|
||||
<PasswordField fx:id="pfPassword" promptText="Passwort" GridPane.columnIndex="1" GridPane.rowIndex="2">
|
||||
<font>
|
||||
<Font name="Century Gothic" size="12.0" />
|
||||
</font></PasswordField>
|
||||
<TextField fx:id="tfName" promptText="Voller Name" GridPane.columnIndex="1">
|
||||
<font>
|
||||
<Font name="Century Gothic" size="12.0" />
|
||||
</font></TextField>
|
||||
<TextField fx:id="tfPhone" promptText="Handynummer" GridPane.columnIndex="1" GridPane.rowIndex="1">
|
||||
<font>
|
||||
<Font name="Century Gothic" size="12.0" />
|
||||
</font></TextField>
|
||||
<TextField fx:id="tfChild" promptText="Kind" GridPane.columnIndex="1" GridPane.rowIndex="5">
|
||||
<font>
|
||||
<Font name="Century Gothic" size="12.0" />
|
||||
</font></TextField>
|
||||
<TextField GridPane.columnIndex="1" GridPane.rowIndex="4">
|
||||
<font>
|
||||
<Font name="Century Gothic" size="12.0" />
|
||||
</font></TextField>
|
||||
<TextField fx:id="tfStreet" prefWidth="254.0" promptText="Straße" GridPane.columnIndex="1" GridPane.rowIndex="3">
|
||||
<font>
|
||||
<Font name="Century Gothic" size="12.0" />
|
||||
</font></TextField>
|
||||
<TextField fx:id="tfHouseNumber" prefWidth="123.0" promptText="Hausnummer" GridPane.columnIndex="2" GridPane.rowIndex="3">
|
||||
<font>
|
||||
<Font name="Century Gothic" size="12.0" />
|
||||
</font></TextField>
|
||||
<TextField fx:id="tfPostalCode" promptText="Postleitzahl" GridPane.columnIndex="1" GridPane.rowIndex="4">
|
||||
<font>
|
||||
<Font name="Century Gothic" size="12.0" />
|
||||
</font></TextField>
|
||||
<TextField fx:id="tfCity" promptText="Ort" GridPane.columnIndex="2" GridPane.rowIndex="4">
|
||||
<font>
|
||||
<Font name="Century Gothic" size="12.0" />
|
||||
</font></TextField>
|
||||
|
||||
</children>
|
||||
</GridPane>
|
||||
|
@ -12,7 +12,7 @@
|
||||
<?import javafx.scene.shape.Line?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
|
||||
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="742.0" prefWidth="980.0" style="-fx-background-color: #f0C8bd;" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.vpr_javafx.HelloController">
|
||||
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="742.0" prefWidth="980.0" style="-fx-background-color: #f0C8bd;" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.vpr_javafx.MainController">
|
||||
<Label layoutX="76.0" layoutY="176.0" text="Montag" textFill="#6f7baf">
|
||||
<font>
|
||||
<Font name="Century Gothic Bold" size="13.0" />
|
||||
|
Loading…
Reference in New Issue
Block a user