Added user class

This commit is contained in:
Marco Kühn 2022-01-26 13:18:05 +01:00
parent 3848baddb6
commit cb5982ef2d
4 changed files with 60 additions and 5 deletions

View File

@ -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<String> userCmb;
@FXML
public void initialize(){
}
public void onBackBtnClick(ActionEvent actionEvent) {
Stage stage = (Stage) ((Node) actionEvent.getSource()).getScene().getWindow();
stage.close();

View File

@ -3,9 +3,8 @@
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import com.jfoenix.controls.*?>
<?import javafx.collections.FXCollections?>
<?import java.lang.String?>
<GridPane xmlns="http://javafx.com/javafx"
xmlns:fx="http://javafx.com/fxml"
fx:controller="main.OptionController"
@ -37,9 +36,7 @@
<JFXComboBox styleClass="comboBox" fx:id="userCmb" GridPane.columnIndex="2" GridPane.rowIndex="2">
<items>
<FXCollections fx:factory="observableArrayList">
<String fx:value="alex"/>
<String fx:value="marc"/>
<String fx:value="marco"/>
</FXCollections>
</items>
</JFXComboBox>

View File

@ -142,5 +142,13 @@ public class DataController {
return eventList;
}
public List<User> getAllUseres(){
List<User> users = new ArrayList<>();
return users;
}
}

View File

@ -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;
}
}