NutzerEinstellung: passwort akuelliseren, Adressse aktuelliseren

This commit is contained in:
Reshad Meher 2023-02-06 03:23:27 +01:00
parent 20a39be10b
commit c46eff1dda
11 changed files with 591 additions and 186 deletions

View File

@ -5,8 +5,17 @@
</component>
<component name="ChangeListManager">
<list default="true" id="be8f30d3-089d-4d1c-bba3-da21b0466111" name="Changes" comment="Variablen und Attributen auf englisch umbennent">
<change beforePath="$PROJECT_DIR$/.idea/shelf/Uncommitted_changes_before_Update_at_30_01_2023_14_48__Changes_.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/shelf/Uncommitted_changes_before_Update_at_30_01_2023_14_48__Changes_.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/main/java/com/bib/essensbestellungsverwaltung/SettingsController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/database.db" beforeDir="false" afterPath="$PROJECT_DIR$/database.db" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/bib/essensbestellungsverwaltung/AccountMgr.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/bib/essensbestellungsverwaltung/AccountMgr.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/bib/essensbestellungsverwaltung/ParentController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/bib/essensbestellungsverwaltung/ParentController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/bib/essensbestellungsverwaltung/StartViewApplication.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/bib/essensbestellungsverwaltung/StartViewApplication.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/bib/essensbestellungsverwaltung/User.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/bib/essensbestellungsverwaltung/User.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/com/bib/essensbestellungsverwaltung/child-view.fxml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/com/bib/essensbestellungsverwaltung/child-view.fxml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/com/bib/essensbestellungsverwaltung/hello-view.fxml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/com/bib/essensbestellungsverwaltung/parentMenue-view.fxml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/com/bib/essensbestellungsverwaltung/parentMenue-view.fxml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/com/bib/essensbestellungsverwaltung/settingsMenue.fxml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/com/bib/essensbestellungsverwaltung/settingsMenue.fxml" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -107,7 +116,14 @@
<option name="project" value="LOCAL" />
<updated>1675241335793</updated>
</task>
<option name="localTasksCounter" value="4" />
<task id="LOCAL-00004" summary="Variablen und Attributen auf englisch umbennent">
<created>1675606671743</created>
<option name="number" value="00004" />
<option name="presentableId" value="LOCAL-00004" />
<option name="project" value="LOCAL" />
<updated>1675606671743</updated>
</task>
<option name="localTasksCounter" value="5" />
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
@ -125,6 +141,7 @@
<MESSAGE value="StartViewApplication ist die Startpunkt des Projekt" />
<MESSAGE value="singup mit Datebase verbunden" />
<MESSAGE value="singup mit Datebase verbunden und new Adresse" />
<option name="LAST_COMMIT_MESSAGE" value="singup mit Datebase verbunden und new Adresse" />
<MESSAGE value="Variablen und Attributen auf englisch umbennent" />
<option name="LAST_COMMIT_MESSAGE" value="Variablen und Attributen auf englisch umbennent" />
</component>
</project>

Binary file not shown.

View File

@ -17,6 +17,8 @@ import java.util.List;
*/
public class AccountMgr {
static User currentUser = null;
/**
* creates a user with createUser(...) and adds its id to the 'worker' table
* @param worker the worker to be created
@ -202,6 +204,32 @@ public class AccountMgr {
String[] userD = {email,hashAndSalt(pw,salt)};
return Database.getSingleId("user",userH,userD);
}
/**
* update password in User table
* @param password User
* @return update password
* @author Reshad Meher
*/
protected static long updatePassword( User password) {
String[] pwH = {"password"};
String[] pwD = {password.getPassword()};
long updates = Database.update("user",pwH,pwD);
return updates;
}
/**
* update adress in User table
* @param address Adresss
* @return update Adrssse
* @author Reshad Meher
*/
protected static long updateAdreess(Address address ){
String[] adH = {"stree","numbrt","plz","city"};
String[] adD = {address.getStreet(),address.getNumber(),address.getPlz(),address.getCity()};
long updates = Database.update("user",adH,adD);
return updates;
}
/**
* checks if id is in worker table

View File

@ -1,6 +1,78 @@
package com.bib.essensbestellungsverwaltung;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.control.Button;
import javafx.scene.layout.BorderPane;
import org.w3c.dom.events.MouseEvent;
import java.io.IOException;
public class ParentController{
@FXML
BorderPane contentView;
@FXML
Button essensplanButton;
@FXML
Button kinderButton;
@FXML
Button bestellungButton;
@FXML
Button einstellungenButton;
@FXML
public void initialize() {
changePage("menue-view.fxml");
setButtonActive(essensplanButton);
}
@FXML
public void onEssensplanClick(MouseEvent mouseEvent) {
setButtonActive(essensplanButton);
changePage("menue-view.fxml");
}
@FXML
public void onKinderClick(MouseEvent mouseEvent) {
setButtonActive(kinderButton);
changePage("child-view.fxml");
}
@FXML
public void onBestellungClick(MouseEvent mouseEvent) {
setButtonActive(bestellungButton);
changePage("orderHistory-view.fxml");
}
@FXML
public void onEinstellungenClick(MouseEvent mouseEvent) {
setButtonActive(einstellungenButton);
changePage("SettingsMenue.fxml");
}
@FXML
public void onAusloggenClick(MouseEvent mouseEvent) throws IOException {
AccountMgr.currentUser = null;
StartViewApplication.changeScene("login-view.fxml");
}
private void changePage(String page) {
try {
Parent root = FXMLLoader.load(getClass().getResource(page));
//contentView.setCenter(root);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
private void setButtonActive(Button b) {
einstellungenButton.getStyleClass().remove("active");
kinderButton.getStyleClass().remove("active");
bestellungButton.getStyleClass().remove("active");
essensplanButton.getStyleClass().remove("active");
b.getStyleClass().add("active");
}
}

View File

@ -0,0 +1,144 @@
package com.bib.essensbestellungsverwaltung;
/**
* @autor Reshad Meher
*/
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.control.Alert;
import javafx.scene.control.TextField;
import java.io.IOException;
public class SettingsController {
@FXML
private TextField tfOldPassword;
@FXML
private TextField tfNewPassword;
@FXML
private TextField tfConfirmNewPasword;
@FXML
private TextField tfPostCode;
@FXML
private TextField tfStreet;
@FXML
private TextField tfCity;
@FXML
private TextField tfHousNumber;
Alert alert;
@FXML
private void onPasswordChangClick(){
String oldPassword = tfOldPassword.getText();
String newPassword = tfNewPassword.getText();
String confirmNewPassword = tfConfirmNewPasword.getText();
if(!oldPassword.isEmpty() && !newPassword.isEmpty() && !confirmNewPassword.isEmpty()){
if(!newPassword.equals(confirmNewPassword)){
alert = new Alert(Alert.AlertType.WARNING);
alert.setTitle("Passwort");
alert.setHeaderText("Ihre neue Passwort und Bestätigung passt nicht. Nochmal versuchen");
alert.showAndWait();
}else {
User userPassword = new User(newPassword);
long UpdateUserPassword = AccountMgr.updatePassword(userPassword);
if (UpdateUserPassword > 0){
alert.setTitle("Passwort");
alert.setHeaderText("Ihre Passwort erfolgreich geändert");
alert.showAndWait();
}
else {
alert.setTitle("Passwort");
alert.setHeaderText("nei");
alert.showAndWait();
}
}
tfOldPassword.setText("");
tfNewPassword.setText("");
tfConfirmNewPasword.setText("");
}
else {
if(oldPassword.isEmpty()){
alert = new Alert(Alert.AlertType.WARNING);
alert.setTitle("Passwort");
alert.setHeaderText("Ihre aktuelles Passwort ist leer.");
alert.showAndWait();
}else if(newPassword.isEmpty()){
alert = new Alert(Alert.AlertType.WARNING);
alert.setTitle("Passwort");
alert.setHeaderText("Ihre neues Passwort ist leer.");
alert.showAndWait();
}if(confirmNewPassword.isEmpty()){
alert = new Alert(Alert.AlertType.WARNING);
alert.setTitle("Passwort");
alert.setHeaderText("Ihre neue Passwort Bestätigung ist leer.");
alert.showAndWait();
}else{
alert = new Alert(Alert.AlertType.WARNING);
alert.setTitle("Passwort");
alert.setHeaderText("Ihre Passwort wurde nicht geändert");
alert.showAndWait();
}
}
}
@FXML
private void onChangAdressClick(){
String postCode = tfPostCode.getText();
String street = tfStreet.getText();
String city = tfCity.getText();
String housNumber = tfHousNumber.getText();
if (!postCode.isEmpty() && !street.isEmpty() && !city.isEmpty() && !housNumber.isEmpty()) {
Address userAdress = new Address(street,housNumber,postCode,city);
long UpdateUserAdress = AccountMgr.updateAdreess(userAdress);
if (UpdateUserAdress > 0) {
alert.setTitle("Adresse");
alert.setHeaderText("Ihre Adresse erfolgreich geändert");
alert.showAndWait();
tfPostCode.setText("");
tfStreet.setText("");
tfCity.setText("");
tfHousNumber.setText("");
}
}else {
if (postCode.isEmpty()) {
alert = new Alert(Alert.AlertType.WARNING);
alert.setTitle("Adresse");
alert.setHeaderText("Postleitzahl ist leer.");
alert.showAndWait();
} else if (street.isEmpty()) {
alert = new Alert(Alert.AlertType.WARNING);
alert.setTitle("Adresse");
alert.setHeaderText("Straß ist leer.");
alert.showAndWait();
} else if (city.isEmpty()) {
alert = new Alert(Alert.AlertType.WARNING);
alert.setTitle("Adresse");
alert.setHeaderText("Statd ist leer.");
alert.showAndWait();
} else if (housNumber.isEmpty()) {
alert = new Alert(Alert.AlertType.WARNING);
alert.setTitle("Adresse");
alert.setHeaderText("Hausnumer ist leer.");
alert.showAndWait();
} else {
alert = new Alert(Alert.AlertType.WARNING);
alert.setTitle("Adresse");
alert.setHeaderText("Ihre Adresse wurde nicht geändert");
alert.showAndWait();
}
}
}
@FXML
private void onLogOutBtClick() throws IOException{
FXMLLoader fxmlLoader = new FXMLLoader(StartViewApplication.class.getResource("login-view.fxml"));
Scene scene = new Scene(fxmlLoader.load(), 950,700);
StartViewApplication.primary.setScene(scene);
}
}

View File

@ -7,6 +7,7 @@ package com.bib.essensbestellungsverwaltung;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
@ -14,10 +15,12 @@ import java.io.IOException;
public class StartViewApplication extends Application {
public static Stage primary;
public static boolean firstLaunch;
@Override
public void start(Stage stage) throws IOException {
FXMLLoader fxmlLoader = new FXMLLoader(StartViewApplication.class.getResource("login-view.fxml"));
Scene scene = new Scene(fxmlLoader.load(), 950,700);
//FXMLLoader fxmlLoader = new FXMLLoader(StartViewApplication.class.getResource((firstLaunch) ? "signUp-view.fxml" : "login-view.fxml"));
FXMLLoader fxmlLoader = new FXMLLoader(StartViewApplication.class.getResource((firstLaunch) ? "settingsMenue.fxml" : "settingsMenue.fxml"));
Scene scene = new Scene(fxmlLoader.load(), 1220, 790);
primary = stage;
stage.setTitle("Essen Bestellung im Kindergarten");
stage.setScene(scene);
@ -25,6 +28,7 @@ public class StartViewApplication extends Application {
}
public static void main(String[] args) {
firstLaunch = Database.init();
Database.init();
Database.createDb();
Database.fillDb();
@ -32,4 +36,9 @@ public class StartViewApplication extends Application {
//Database.deleteSample();
launch();
}
public static void changeScene(String scene) throws IOException{
Parent p = FXMLLoader.load(StartViewApplication.class.getResource(scene));
primary.getScene().setRoot(p);
}
}

View File

@ -28,6 +28,9 @@ public class User {
this.email = email;
this.address = address;
}
public User (String password){
this.password = password;
}
public long getId() {
return id;

View File

@ -2,9 +2,9 @@
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ComboBox?>
<?import javafx.scene.control.DatePicker?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.control.CheckBox?>
<?import javafx.scene.control.ChoiceBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
@ -19,30 +19,20 @@
<Font size="58.0" />
</font>
</Text>
<HBox id="contentContainer" alignment="CENTER" layoutX="48.0" layoutY="244.0" prefHeight="250.0" prefWidth="770.0">
<HBox id="contentContainer" alignment="CENTER" layoutX="8.0" layoutY="165.0" prefHeight="127.0" prefWidth="937.0">
<children>
<VBox id="contentContainer" prefHeight="250.0" prefWidth="256.0">
<children>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Name">
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Vorname">
<VBox.margin>
<Insets bottom="15.0" top="15.0" />
</VBox.margin>
</Text>
<TextField prefWidth="97.0">
<TextField fx:id="firstName" prefWidth="97.0">
<VBox.margin>
<Insets bottom="15.0" top="15.0" />
</VBox.margin>
</TextField>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Geburtsdatum">
<VBox.margin>
<Insets bottom="15.0" top="15.0" />
</VBox.margin>
</Text>
<DatePicker prefHeight="26.0" prefWidth="226.0">
<VBox.margin>
<Insets top="13.0" />
</VBox.margin>
</DatePicker>
</children>
<HBox.margin>
<Insets left="15.0" right="15.0" />
@ -50,44 +40,16 @@
</VBox>
<VBox id="contentContainer" prefHeight="250.0" prefWidth="256.0">
<children>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Alter">
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Nachname">
<VBox.margin>
<Insets bottom="15.0" top="15.0" />
</VBox.margin>
</Text>
<TextField prefWidth="97.0">
<TextField fx:id="lastName" prefWidth="97.0">
<VBox.margin>
<Insets bottom="15.0" top="15.0" />
</VBox.margin>
</TextField>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Gruppe">
<VBox.margin>
<Insets bottom="15.0" top="15.0" />
</VBox.margin>
</Text>
<ComboBox prefHeight="26.0" prefWidth="230.0">
<VBox.margin>
<Insets top="13.0" />
</VBox.margin>
</ComboBox>
</children>
<HBox.margin>
<Insets left="15.0" right="15.0" />
</HBox.margin>
</VBox>
<VBox id="contentContainer" prefHeight="250.0" prefWidth="256.0">
<children>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Allergien">
<VBox.margin>
<Insets bottom="15.0" top="15.0" />
</VBox.margin>
</Text>
<ListView prefHeight="101.0" prefWidth="227.0" />
<TextField id="tfAddAllergy" promptText="Allergie hinzufügen">
<VBox.margin>
<Insets top="15.0" />
</VBox.margin>
</TextField>
</children>
<HBox.margin>
<Insets left="15.0" right="15.0" />
@ -95,6 +57,19 @@
</VBox>
</children>
</HBox>
<Button id="btAddChild" layoutX="360.0" layoutY="592.0" mnemonicParsing="false" prefHeight="26.0" prefWidth="146.0" text="Kind hinzufügen" />
<Button id="btAddChild" fx:id="kindHinzufügenButton" layoutX="779.0" layoutY="646.0" mnemonicParsing="false" onAction="#onKindHinzufügen" prefHeight="26.0" prefWidth="125.0" text="Kind hinzufügen" />
<ChoiceBox fx:id="childChoiceBox" layoutX="704.0" layoutY="62.0" onAction="#onSelectChild" prefWidth="150.0" />
<Label layoutX="704.0" layoutY="44.0" text="Kind" />
<VBox id="contentContainer" layoutX="493.0" layoutY="330.0" prefHeight="250.0" prefWidth="256.0" spacing="20.0">
<children>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Allergien">
<VBox.margin>
<Insets bottom="15.0" top="15.0" />
</VBox.margin>
</Text>
<CheckBox fx:id="allergienComboBox" prefHeight="18.0" prefWidth="200.0" />
</children>
</VBox>
<Button id="btAddChild" fx:id="kindLoeschenButton" layoutX="621.0" layoutY="646.0" mnemonicParsing="false" onAction="#onKindLoeschen" prefHeight="26.0" prefWidth="125.0" text="Kind löschen" />
</children>
</AnchorPane>

View File

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.control.PasswordField?>
<GridPane hgap="10.0" vgap="10.0"
xmlns:fx="http://javafx.com/fxml/1"
xmlns="http://javafx.com/javafx/11.0.2"
fx:controller="com.bib.essensbestellungsverwaltung.HelloController">
<padding>
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0"/>
</padding>
<Label text="Bitte geben Sie Ihre Anmeldedaten ein."
GridPane.columnIndex="0" GridPane.columnSpan="2" GridPane.rowIndex="0" />
<Label text="Benutzername:"
GridPane.columnIndex="0" GridPane.rowIndex="1" />
<TextField fx:id="unsernameEingabe"
GridPane.columnIndex="1" GridPane.rowIndex="1"/>
<Label text="Passwort:"
GridPane.columnIndex="0" GridPane.rowIndex="2" />
<PasswordField fx:id="passwortEingabe"
GridPane.columnIndex="1" GridPane.rowIndex="2"/>
<Button text="LOGIN" onAction="#onLoginButtonClick"
GridPane.columnIndex="1" GridPane.rowIndex="3" />
<Label fx:id="lblAusgabe"
GridPane.columnIndex="0" GridPane.columnSpan="2" GridPane.rowIndex="4"/>
</GridPane>

View File

@ -9,75 +9,93 @@
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="1200.0" stylesheets="parentMenue.css" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1">
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.Region?>
<BorderPane fx:id="contentView" prefHeight="750.0" prefWidth="1200.0" stylesheets="@menue.css"
xmlns="http://javafx.com/javafx/17.0.2-ea" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.bib.essensbestellungsverwaltung.ParentMenuController">
<left>
<VBox alignment="TOP_CENTER" prefHeight="750.0" prefWidth="350.0" spacing="10.0"
style="-fx-background-color: #69b6ff; -fx-padding: 20;" BorderPane.alignment="CENTER">
<children>
<VBox id="contentContainer" layoutY="-14.0" prefHeight="814.0" prefWidth="333.0" stylesheets="@parentMenue.css">
<children>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="327.0">
<children>
<ImageView fitHeight="60.0" fitWidth="60.0" pickOnBounds="true" preserveRatio="true">
<Button fx:id="essensplanButton" alignment="CENTER_LEFT" mnemonicParsing="false"
onMouseClicked="#onEssensplanClick" prefHeight="60.0" prefWidth="250.0"
styleClass="sidebar-nav_button" text="Essensplan">
<font>
<Font size="20.0"/>
</font>
<graphic>
<ImageView fitHeight="35.0" fitWidth="35.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@pics/menu.png" />
<Image url="@pics/menu.png"/>
</image>
</ImageView>
<Button id="contentButton" alignment="BASELINE_LEFT" mnemonicParsing="false" prefHeight="25.0" prefWidth="260.0" text="Essensplan">
<font>
<Font size="25.0" />
</font>
</graphic>
</Button>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<ImageView fitHeight="60.0" fitWidth="60.0" pickOnBounds="true" preserveRatio="true">
<Button fx:id="kinderButton" alignment="CENTER_LEFT" mnemonicParsing="false"
onMouseClicked="#onKinderClick" prefHeight="60.0" prefWidth="250.0"
styleClass="sidebar-nav_button" text="Kinder">
<font>
<Font size="20.0"/>
</font>
<graphic>
<ImageView fitHeight="35.0" fitWidth="35.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@pics/little-kid.png" />
<Image url="@pics/little-kid.png"/>
</image>
</ImageView>
<Button id="contentButton" alignment="BASELINE_LEFT" mnemonicParsing="false" prefHeight="25.0" prefWidth="260.0" text="Kind">
<font>
<Font size="25.0" />
</font>
</graphic>
</Button>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<ImageView fitHeight="60.0" fitWidth="60.0" pickOnBounds="true" preserveRatio="true">
<Button fx:id="bestellungButton" alignment="CENTER_LEFT" mnemonicParsing="false"
onMouseClicked="#onBestellungClick" prefHeight="60.0" prefWidth="250.0"
styleClass="sidebar-nav_button" text="Bestellung">
<font>
<Font size="20.0"/>
</font>
<graphic>
<ImageView fitHeight="35.0" fitWidth="35.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@pics/shopping-list.png" />
<Image url="@pics/shopping-list.png"/>
</image>
</ImageView>
<Button id="contentButton" alignment="BASELINE_LEFT" mnemonicParsing="false" prefHeight="52.0" prefWidth="260.0" text="Bestellung">
<font>
<Font size="25.0" />
</font>
</graphic>
</Button>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<ImageView fitHeight="60.0" fitWidth="60.0" pickOnBounds="true" preserveRatio="true">
<Region VBox.vgrow="ALWAYS"/>
<Button fx:id="einstellungenButton" alignment="CENTER_LEFT" layoutX="10.0" layoutY="130.0"
mnemonicParsing="false" onMouseClicked="#onEinstellungenClick" prefHeight="60.0"
prefWidth="250.0" styleClass="sidebar-nav_button" text="Einstellungen">
<font>
<Font size="20.0"/>
</font>
<graphic>
<ImageView fitHeight="35.0" fitWidth="35.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@pics/setting.png" />
<Image url="@pics/setting.png"/>
</image>
</ImageView>
<Button id="contentButton" alignment="BASELINE_LEFT" mnemonicParsing="false" prefHeight="52.0" prefWidth="260.0" text="Nutzereinstellungen">
<font>
<Font size="25.0" />
</font>
</graphic>
</Button>
</children>
</HBox>
</VBox>
</left>
<top>
<HBox alignment="CENTER_RIGHT" prefHeight="50.0" prefWidth="1200.0" style="-fx-background-color: #69b6ff;"
BorderPane.alignment="CENTER">
<children>
<Button mnemonicParsing="false" onMouseClicked="#onAusloggenClick" styleClass="sidebar-nav_button"
text="Ausloggen">
<opaqueInsets>
<Insets/>
</opaqueInsets>
</Button>
</children>
<padding>
<Insets top="50.0" />
</padding></VBox>
<HBox id="contentContainer2" alignment="CENTER_RIGHT" prefHeight="40.0" prefWidth="1200.0" stylesheets="@parentMenue.css">
<children>
<Button id="btLogOut" mnemonicParsing="false" text="Abmelden" />
</children>
<Insets right="20.0"/>
</padding>
</HBox>
</children>
</top>
<center>
<AnchorPane prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER"/>
</center>
</BorderPane>
</AnchorPane>

View File

@ -1,14 +1,183 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane xmlns="http://javafx.com/javafx"
xmlns:fx="http://javafx.com/fxml"
fx:controller="com.bib.essensbestellungsverwaltung.SettingsController"
prefHeight="400.0" prefWidth="600.0">
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<AnchorPane prefHeight="800.0" prefWidth="1205.0" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.bib.essensbestellungsverwaltung.SettingsController">
<children>
<VBox id="contentContainer" layoutY="-14.0" prefHeight="814.0" prefWidth="333.0" stylesheets="@parentMenue.css">
<children>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="327.0">
<children>
<ImageView fitHeight="60.0" fitWidth="60.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@pics/menu.png" />
</image>
</ImageView>
<Button id="contentButton" alignment="BASELINE_LEFT" mnemonicParsing="false" prefHeight="25.0" prefWidth="260.0" text="Essensplan">
<font>
<Font size="25.0" />
</font>
</Button>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<ImageView fitHeight="60.0" fitWidth="60.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@pics/little-kid.png" />
</image>
</ImageView>
<Button id="contentButton" alignment="BASELINE_LEFT" mnemonicParsing="false" prefHeight="25.0" prefWidth="260.0" text="Kind">
<font>
<Font size="25.0" />
</font>
</Button>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<ImageView fitHeight="60.0" fitWidth="60.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@pics/shopping-list.png" />
</image>
</ImageView>
<Button id="contentButton" alignment="BASELINE_LEFT" mnemonicParsing="false" prefHeight="52.0" prefWidth="260.0" text="Bestellung">
<font>
<Font size="25.0" />
</font>
</Button>
</children>
</HBox>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children>
<ImageView fitHeight="60.0" fitWidth="60.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@pics/setting.png" />
</image>
</ImageView>
<Button fx:id="BtSetting" alignment="BASELINE_LEFT" mnemonicParsing="false" onAction="#onSettingBtClick" prefHeight="52.0" prefWidth="260.0" text="Nutzereinstellungen">
<font>
<Font size="25.0" />
</font>
</Button>
</children>
</HBox>
</children>
<padding>
<Insets top="50.0" />
</padding></VBox>
<HBox id="contentContainer2" alignment="CENTER_RIGHT" prefHeight="40.0" prefWidth="1200.0" stylesheets="@parentMenue.css">
<children>
<Button mnemonicParsing="false" onAction="#onLogOutBtClick" text="Abmelden" />
</children>
</HBox>
<HBox fx:id="UserSetting" layoutX="343.0" layoutY="48.0" prefHeight="355.0" prefWidth="856.0" style="-fx-border-width: 1 1 1 1; -fx-border-color: lightblue;" AnchorPane.topAnchor="230.0">
<children>
<VBox prefHeight="353.0" prefWidth="260.0">
<children>
<Label text="Elterndaten">
<font>
<Font name="Microsoft Tai Le Bold" size="24.0" />
</font>
<VBox.margin>
<Insets bottom="25.0" left="25.0" right="25.0" top="10.0" />
</VBox.margin>
</Label>
<TextField prefHeight="36.0" prefWidth="274.0" promptText="aktuelles Passwort" style="-fx-background-color: transparent; -fx-border-color: lightgray; -fx-border-width: 0 0 1 0;">
<VBox.margin>
<Insets bottom="25.0" left="20.0" right="25.0" top="5.0" />
</VBox.margin>
<font>
<Font name="Microsoft Tai Le Bold" size="16.0" />
</font>
</TextField>
<TextField promptText="neues Passwort" style="-fx-background-color: transparent; -fx-border-color: lightgray; -fx-border-width: 0 0 1 0;">
<VBox.margin>
<Insets left="20.0" right="25.0" top="5.0" />
</VBox.margin>
<font>
<Font name="Microsoft Tai Le Bold" size="16.799999237060547" />
</font>
</TextField>
<TextField promptText="passwort bestätigen " style="-fx-background-color: transparent; -fx-border-color: lightgray; -fx-border-width: 0 0 1 0;">
<VBox.margin>
<Insets bottom="25.0" left="20.0" right="25.0" top="25.0" />
</VBox.margin>
<font>
<Font name="Microsoft Tai Le Bold" size="16.799999237060547" />
</font>
</TextField>
<Button alignment="BASELINE_LEFT" contentDisplay="TOP" mnemonicParsing="false" style="-fx-background-radius: 25; -fx-background-color: lightblue;" text="Passowrt ändern" textFill="WHITE">
<font>
<Font name="Microsoft Tai Le Bold" size="16.799999237060547" />
</font>
<VBox.margin>
<Insets left="80.0" top="25.0" />
</VBox.margin>
</Button>
</children>
</VBox>
<VBox prefHeight="353.0" prefWidth="245.0">
<children>
<TextField prefHeight="35.0" prefWidth="102.0" promptText="PLZ" style="-fx-background-color: transparent; -fx-border-color: lightgray; -fx-border-width: 0 0 1 0;">
<VBox.margin>
<Insets bottom="25.0" left="20.0" right="25.0" top="75.0" />
</VBox.margin>
<font>
<Font name="Microsoft Tai Le Bold" size="16.0" />
</font>
</TextField>
<TextField promptText="Straße" style="-fx-background-color: transparent; -fx-border-color: lightgray; -fx-border-width: 0 0 1 0;">
<font>
<Font name="Microsoft Tai Le Bold" size="16.799999237060547" />
</font>
<VBox.margin>
<Insets bottom="25.0" left="20.0" right="25.0" top="5.0" />
</VBox.margin>
</TextField>
</children>
<HBox.margin>
<Insets left="80.0" />
</HBox.margin>
</VBox>
<VBox prefHeight="411.0" prefWidth="225.0">
<children>
<TextField promptText="Stadt" style="-fx-background-color: transparent; -fx-border-color: lightgray; -fx-border-width: 0 0 1 0;">
<VBox.margin>
<Insets left="20.0" right="25.0" top="75.0" />
</VBox.margin>
<font>
<Font name="Microsoft Tai Le Bold" size="16.799999237060547" />
</font>
</TextField>
<TextField promptText="Hausnummer" style="-fx-background-color: transparent; -fx-border-color: lightgray; -fx-border-width: 0 0 1 0;">
<font>
<Font name="Microsoft Tai Le Bold" size="16.799999237060547" />
</font>
<VBox.margin>
<Insets left="25.0" right="25.0" top="25.0" />
</VBox.margin>
</TextField>
<Button alignment="BASELINE_LEFT" contentDisplay="TOP" mnemonicParsing="false" style="-fx-background-radius: 25; -fx-background-color: lightblue;" text="Adresse ändern" textFill="WHITE">
<font>
<Font name="Microsoft Tai Le Bold" size="16.799999237060547" />
</font>
<VBox.margin>
<Insets left="60.0" top="120.0" />
</VBox.margin>
</Button>
</children>
</VBox>
</children>
</HBox>
</children>
</AnchorPane>