From 111d5758e0daa5b6a779de2f3ce929ad2e98c72f Mon Sep 17 00:00:00 2001 From: Alex Rechtin Date: Mon, 7 Feb 2022 13:48:58 +0100 Subject: [PATCH] improved the edit,create-user to JFX --- .../main/java/users/CreateUserController.java | 18 +++++++++--------- .../src/main/resources/users/create-user.css | 5 ++++- .../src/main/resources/users/create-user.fxml | 19 +++++++++++-------- .../src/main/resources/users/edit-user.fxml | 19 +++++++++++-------- 4 files changed, 35 insertions(+), 26 deletions(-) diff --git a/client/app/src/main/java/users/CreateUserController.java b/client/app/src/main/java/users/CreateUserController.java index 6078e21..f6604df 100644 --- a/client/app/src/main/java/users/CreateUserController.java +++ b/client/app/src/main/java/users/CreateUserController.java @@ -1,14 +1,14 @@ //Alex Rechtin// package users; +import com.jfoenix.controls.JFXPasswordField; +import com.jfoenix.controls.JFXTextField; +import com.jfoenix.controls.JFXToggleButton; import helper.HttpRequestException; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.scene.Node; import javafx.scene.control.Label; -import javafx.scene.control.PasswordField; -import javafx.scene.control.TextField; -import javafx.scene.control.ToggleButton; import javafx.stage.Stage; import container.DataController; import container.User; @@ -18,17 +18,17 @@ import java.util.Objects; public class CreateUserController { @FXML - protected TextField textName; + protected JFXTextField textName; @FXML - protected PasswordField textPassword; + protected JFXPasswordField textPassword; @FXML - protected PasswordField textPasswordSecond; + protected JFXPasswordField textPasswordSecond; @FXML - protected ToggleButton checkButtonIsAdmin; + protected JFXToggleButton checkButtonIsAdmin; @FXML - protected TextField textLogin; + protected JFXTextField textLogin; @FXML - protected TextField textForename; + protected JFXTextField textForename; @FXML protected Label labelError; diff --git a/client/app/src/main/resources/users/create-user.css b/client/app/src/main/resources/users/create-user.css index c56e8b2..f6343dd 100644 --- a/client/app/src/main/resources/users/create-user.css +++ b/client/app/src/main/resources/users/create-user.css @@ -1,6 +1,7 @@ /*Alex Rechtin*/ * { -fx-dark-background-color: #3E415F; + -fx-bright-background-color: #ffffff; -fx-bright-border-color: #B0B0B0; -fx-brighter-text-color: #ff5555; -fx-brightest-text-color: #ffffff; @@ -36,6 +37,7 @@ Label{ } .textField{ + -fx-background-color: -fx-bright-background-color; -fx-max-width: 400px; -fx-min-width: 400px; } @@ -46,7 +48,8 @@ Label{ -fx-text-fill: -fx-brighter-text-color; } -Button{ +JFXButton{ + -fx-background-color: -fx-bright-background-color; -fx-max-width: 150px; -fx-min-width: 150px; } diff --git a/client/app/src/main/resources/users/create-user.fxml b/client/app/src/main/resources/users/create-user.fxml index b296bcd..db8cd57 100644 --- a/client/app/src/main/resources/users/create-user.fxml +++ b/client/app/src/main/resources/users/create-user.fxml @@ -2,10 +2,13 @@ - + + + + @@ -37,11 +40,11 @@ - - - - - + + + + + @@ -51,8 +54,8 @@ - - + Abbrechen + Anlegen diff --git a/client/app/src/main/resources/users/edit-user.fxml b/client/app/src/main/resources/users/edit-user.fxml index c5da6a1..718ba2b 100644 --- a/client/app/src/main/resources/users/edit-user.fxml +++ b/client/app/src/main/resources/users/edit-user.fxml @@ -1,10 +1,13 @@ - + + + + @@ -36,11 +39,11 @@ - - - - - + + + + + @@ -50,8 +53,8 @@ - - + Abbrechen + Bearbeiten