#7 locked boolean zu Treatment addiert und initialisiert
This commit is contained in:
parent
84df7a7abb
commit
01e07be6e2
1 changed files with 18 additions and 1 deletions
|
@ -3,6 +3,7 @@ package de.hitec.nhplus.treatment;
|
|||
import de.hitec.nhplus.nurse.Nurse;
|
||||
import de.hitec.nhplus.patient.Patient;
|
||||
import de.hitec.nhplus.utils.DateConverter;
|
||||
import javafx.beans.property.SimpleBooleanProperty;
|
||||
import javafx.beans.property.SimpleIntegerProperty;
|
||||
import javafx.beans.property.SimpleObjectProperty;
|
||||
import javafx.beans.property.SimpleStringProperty;
|
||||
|
@ -26,6 +27,7 @@ public class Treatment {
|
|||
private final SimpleObjectProperty<LocalTime> end;
|
||||
private final SimpleStringProperty description;
|
||||
private final SimpleStringProperty remarks;
|
||||
private final SimpleBooleanProperty locked;
|
||||
|
||||
/**
|
||||
* This constructor allows instantiating a {@link Treatment} object,
|
||||
|
@ -50,6 +52,7 @@ public class Treatment {
|
|||
this.end = new SimpleObjectProperty<>(end);
|
||||
this.description = new SimpleStringProperty(description);
|
||||
this.remarks = new SimpleStringProperty(remarks);
|
||||
this.locked = new SimpleBooleanProperty(false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -63,7 +66,8 @@ public class Treatment {
|
|||
LocalTime begin,
|
||||
LocalTime end,
|
||||
String description,
|
||||
String remarks
|
||||
String remarks,
|
||||
boolean isLocked
|
||||
) {
|
||||
this.id = new SimpleIntegerProperty(id);
|
||||
this.patient = new SimpleObjectProperty<>(patient);
|
||||
|
@ -73,6 +77,19 @@ public class Treatment {
|
|||
this.end = new SimpleObjectProperty<>(end);
|
||||
this.description = new SimpleStringProperty(description);
|
||||
this.remarks = new SimpleStringProperty(remarks);
|
||||
this.locked = new SimpleBooleanProperty(isLocked);
|
||||
}
|
||||
|
||||
public boolean isLocked() {
|
||||
return locked.get();
|
||||
}
|
||||
|
||||
public SimpleBooleanProperty lockedProperty() {
|
||||
return locked;
|
||||
}
|
||||
|
||||
public void setLocked(boolean locked) {
|
||||
this.locked.set(locked);
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
|
|
Loading…
Reference in a new issue