#7 Nicht fertig: Locked Treatment UI
This commit is contained in:
parent
ca30c413a5
commit
79ddf61c26
1 changed files with 5 additions and 0 deletions
|
@ -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() {
|
||||||
|
|
Loading…
Reference in a new issue