fixed functionality Places Formular
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package ch.zhaw.projekt2.turnierverwaltung;
|
||||
|
||||
public class Place {
|
||||
import java.io.Serializable;
|
||||
|
||||
public class Place implements Serializable {
|
||||
private final String NAME_MATCHING_REGEX = "[a-zA-Z0-9]{1,20}";
|
||||
private String name;
|
||||
|
||||
@@ -18,4 +20,13 @@ public class Place {
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(){
|
||||
return name;
|
||||
}
|
||||
|
||||
public boolean equals(Place place){
|
||||
return name.equals(place.getName());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ public class Tournament implements Serializable {
|
||||
setName(name);
|
||||
setType(type);
|
||||
participants = new ArrayList<>();
|
||||
places = new ArrayList<>();
|
||||
}
|
||||
|
||||
public void addParticipant(Participant newParticipant) throws ParticipantExistsException {
|
||||
|
||||
-18
@@ -18,21 +18,9 @@ public class PlacesFormularController extends FXController {
|
||||
@FXML
|
||||
private Button addBtn;
|
||||
|
||||
@FXML
|
||||
private Label birthDateLabel;
|
||||
|
||||
@FXML
|
||||
private TextField birthDateTextField;
|
||||
|
||||
@FXML
|
||||
private VBox changeBtn;
|
||||
|
||||
@FXML
|
||||
private Label firstNameLabel;
|
||||
|
||||
@FXML
|
||||
private TextField firstNameTextField;
|
||||
|
||||
@FXML
|
||||
private GridPane grid;
|
||||
|
||||
@@ -58,12 +46,6 @@ public class PlacesFormularController extends FXController {
|
||||
@FXML
|
||||
private TextField placeNameTextField;
|
||||
|
||||
@FXML
|
||||
private Label phoneNumberLabel;
|
||||
|
||||
@FXML
|
||||
private TextField phoneNumberTextField;
|
||||
|
||||
@FXML
|
||||
private Button saveBtn;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user