#7 Nicht fertig: Locked Treatment UI
Some checks failed
Quality Check / Linting Check (push) Failing after 12s
Quality Check / Javadoc Check (push) Successful in 21s

This commit is contained in:
Dorian Nemec 2024-05-16 16:28:11 +02:00
parent ca30c413a5
commit 79ddf61c26

View file

@ -13,6 +13,7 @@ import javafx.collections.ObservableList;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.scene.control.Button; import javafx.scene.control.Button;
import javafx.scene.control.TableColumn; import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.cell.PropertyValueFactory; import javafx.scene.control.cell.PropertyValueFactory;
import java.sql.SQLException; import java.sql.SQLException;
@ -27,6 +28,8 @@ public class LockedTreatmentController {
@FXML @FXML
public Button buttonUnlock; public Button buttonUnlock;
@FXML @FXML
public TableView<Treatment> tableView;
@FXML
public TableColumn<Treatment, Long> columnId; public TableColumn<Treatment, Long> columnId;
@FXML @FXML
public TableColumn<Treatment, String> columnFirstName; public TableColumn<Treatment, String> columnFirstName;
@ -45,12 +48,14 @@ public class LockedTreatmentController {
* that is called after the binding of all the fields. * that is called after the binding of all the fields.
*/ */
public void initialize(){ public void initialize(){
this.readAllAndShowInTableView();
this.columnId.setCellValueFactory(new PropertyValueFactory<>("id")); this.columnId.setCellValueFactory(new PropertyValueFactory<>("id"));
this.columnFirstName.setCellValueFactory(new PropertyValueFactory<>("firstName")); this.columnFirstName.setCellValueFactory(new PropertyValueFactory<>("firstName"));
this.columnSurName.setCellValueFactory(new PropertyValueFactory<>("surName")); this.columnSurName.setCellValueFactory(new PropertyValueFactory<>("surName"));
this.columnDeleteDate.setCellValueFactory(cellData -> new SimpleStringProperty("coming soon")); this.columnDeleteDate.setCellValueFactory(cellData -> new SimpleStringProperty("coming soon"));
this.tableView.setItems(this.treatments);
} }
private void readAllAndShowInTableView() { private void readAllAndShowInTableView() {