From cb5982ef2d5fbbf85636f3e28d752f79c928b091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20K=C3=BChn?= Date: Wed, 26 Jan 2022 13:18:05 +0100 Subject: [PATCH] Added user class --- .../src/main/java/main/OptionController.java | 6 +++ .../src/main/resources/main/option-view.fxml | 7 +-- .../src/main/java/res/DataController.java | 8 ++++ client/data/src/main/java/res/User.java | 44 +++++++++++++++++++ 4 files changed, 60 insertions(+), 5 deletions(-) create mode 100644 client/data/src/main/java/res/User.java diff --git a/client/app/src/main/java/main/OptionController.java b/client/app/src/main/java/main/OptionController.java index 8ca0b93..5b1f7d3 100644 --- a/client/app/src/main/java/main/OptionController.java +++ b/client/app/src/main/java/main/OptionController.java @@ -2,6 +2,7 @@ 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; @@ -29,6 +30,11 @@ public class OptionController { @FXML public JFXComboBox userCmb; + @FXML + public void initialize(){ + + } + public void onBackBtnClick(ActionEvent actionEvent) { Stage stage = (Stage) ((Node) actionEvent.getSource()).getScene().getWindow(); stage.close(); diff --git a/client/app/src/main/resources/main/option-view.fxml b/client/app/src/main/resources/main/option-view.fxml index 86fcae3..7e3edef 100644 --- a/client/app/src/main/resources/main/option-view.fxml +++ b/client/app/src/main/resources/main/option-view.fxml @@ -3,9 +3,8 @@ - - + - - - + diff --git a/client/data/src/main/java/res/DataController.java b/client/data/src/main/java/res/DataController.java index f920bac..5e8777e 100644 --- a/client/data/src/main/java/res/DataController.java +++ b/client/data/src/main/java/res/DataController.java @@ -142,5 +142,13 @@ public class DataController { return eventList; } + public List getAllUseres(){ + List users = new ArrayList<>(); + + + + return users; + } + } \ No newline at end of file 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; + } +}