diff --git a/client/app/src/main/java/main/MainController.java b/client/app/src/main/java/main/MainController.java index dbc8948..0a5ae54 100644 --- a/client/app/src/main/java/main/MainController.java +++ b/client/app/src/main/java/main/MainController.java @@ -126,7 +126,21 @@ public class MainController { } protected void onSettingBtnClick(){ - + try{ + FXMLLoader fxmlLoader = new FXMLLoader( + MainApplication.class.getResource("option-view.fxml")); + Scene scene = new Scene(fxmlLoader.load(), 650, 650); + scene.getStylesheets().add(Objects.requireNonNull( + MainApplication.class.getResource("option-view.css")).toExternalForm()); + Stage stage = new Stage(); + stage.setTitle("Einstellungen"); + stage.setScene(scene); + stage.initModality(Modality.APPLICATION_MODAL); + stage.setResizable(false); + stage.showAndWait(); + } catch (IOException e) { + e.printStackTrace(); + } } protected void onLogoutBtnClick(ActionEvent event){ diff --git a/client/app/src/main/java/main/OptionController.java b/client/app/src/main/java/main/OptionController.java new file mode 100644 index 0000000..5b1f7d3 --- /dev/null +++ b/client/app/src/main/java/main/OptionController.java @@ -0,0 +1,68 @@ +package main; + +import com.jfoenix.controls.*; +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; +import javafx.event.ActionEvent; +import javafx.fxml.FXML; +import javafx.fxml.FXMLLoader; +import javafx.scene.Node; +import javafx.scene.Scene; +import javafx.scene.control.Label; +import javafx.stage.Modality; +import javafx.stage.Stage; + +import java.io.IOException; +import java.util.Objects; + +public class OptionController { + + @FXML + public JFXButton updateUserBtn; + @FXML + public JFXButton deleteUserBtn; + @FXML + public JFXButton createUserBtn; + @FXML + public JFXToggleButton saveLoginTBtn; + @FXML + public Label labelError; + @FXML + public JFXComboBox userCmb; + + @FXML + public void initialize(){ + + } + + public void onBackBtnClick(ActionEvent actionEvent) { + Stage stage = (Stage) ((Node) actionEvent.getSource()).getScene().getWindow(); + stage.close(); + } + + public void onCreateBtnClick(ActionEvent actionEvent) { + try{ + FXMLLoader fxmlLoader = new FXMLLoader( + MainApplication.class.getResource("../users/create-user.fxml")); + Scene scene = new Scene(fxmlLoader.load(), 800, 650); + scene.getStylesheets().add(Objects.requireNonNull( + MainApplication.class.getResource("../users/create-user.css")).toExternalForm()); + Stage stage = new Stage(); + stage.setTitle("User erstellen"); + stage.setScene(scene); + stage.initModality(Modality.APPLICATION_MODAL); + stage.setResizable(false); + stage.showAndWait(); + Stage stageOld = (Stage) ((Node) actionEvent.getSource()).getScene().getWindow(); + stageOld.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + public void onUpdateBtnClick(ActionEvent actionEvent) { + } + + public void onDeleteBtnClick(ActionEvent actionEvent) { + } +} diff --git a/client/app/src/main/resources/main/option-view.css b/client/app/src/main/resources/main/option-view.css new file mode 100644 index 0000000..291a5d3 --- /dev/null +++ b/client/app/src/main/resources/main/option-view.css @@ -0,0 +1,58 @@ +GridPane{ + -fx-background-color: #3E415F; + -fx-padding: 20px; + -fx-font-size: 20px; + -fx-font-family: Segoe UI; + + -fx-border-insets: 1; + -fx-border-color: #B0B0B0; + -fx-border-style: solid; + -fx-border-width: 2; + -fx-effect: dropshadow(three-pass-box, rgba(100, 100, 100, 1), 24, 0.5, 0, 0); +} + +Label{ + -fx-text-fill: white; + -fx-max-width: 200px; + -fx-min-width: 200px; +} + +.mainLabel{ + -fx-background-color: #8D99AE; + -fx-padding: 10px; + -fx-max-width: 200px; + -fx-min-width: 200px; + -fx-font-weight: bold; + -fx-alignment: center; +} + +.mainButton{ + -fx-font-weight: bold; + -fx-background-color: white; +} + +JFXButton{ + -fx-background-color: white; +} + +#labelError{ + -fx-font-weight: bold; + -fx-max-width: 1000px; + -fx-text-fill: #ff5555; + -fx-padding: 16px; + -fx-min-height: 140px; + -fx-max-height: 400px; + -fx-wrap-text: true; + -fx-font-size: 16px; +} + +.comboBox{ + -fx-background-color: white; + -fx-max-width: 200px; + -fx-min-width: 200px; +} + +.userBtn{ + -fx-max-width: 200px; + -fx-min-width: 200px; +} \ No newline at end of file diff --git a/client/app/src/main/resources/main/option-view.fxml b/client/app/src/main/resources/main/option-view.fxml new file mode 100644 index 0000000..7e3edef --- /dev/null +++ b/client/app/src/main/resources/main/option-view.fxml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + User bearbeiten + User löschen + User anlegen + + + + + diff --git a/client/data/src/main/java/res/User.java b/client/data/src/main/java/res/User.java new file mode 100644 index 0000000..5ff062d --- /dev/null +++ b/client/data/src/main/java/res/User.java @@ -0,0 +1,44 @@ +package res; + +public class User { + + private int id; + private String loginName; + private String forename; + private String name; + + public User(){ + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getLoginName() { + return loginName; + } + + public void setLoginName(String loginName) { + this.loginName = loginName; + } + + public String getForename() { + return forename; + } + + public void setForename(String forename) { + this.forename = forename; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +}