Rename groupNameBar to groupNameField

This commit is contained in:
Kai S. K. Engelbart 2020-06-27 09:48:41 +02:00
parent 3d6a38e354
commit 920c83c4d1
2 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@ public class GroupCreationScene {
private Button createButton; private Button createButton;
@FXML @FXML
private TextField groupNameBar; private TextField groupNameField;
@FXML @FXML
private ListView<Contact> contactList; private ListView<Contact> contactList;
@ -74,10 +74,10 @@ public class GroupCreationScene {
*/ */
@FXML @FXML
private void createButtonClicked() { private void createButtonClicked() {
final var name = groupNameBar.getText(); final var name = groupNameField.getText();
if (!Bounds.isValidContactName(name)) { if (!Bounds.isValidContactName(name)) {
new Alert(AlertType.ERROR, "The entered group name is not valid (" + Bounds.CONTACT_NAME_PATTERN + ")").showAndWait(); new Alert(AlertType.ERROR, "The entered group name is not valid (" + Bounds.CONTACT_NAME_PATTERN + ")").showAndWait();
groupNameBar.clear(); groupNameField.clear();
} else { } else {
eventBus.dispatch(new SendEvent(new GroupCreation(name, eventBus.dispatch(new SendEvent(new GroupCreation(name,
contactList.getSelectionModel().getSelectedItems().stream().map(Contact::getID).collect(Collectors.toSet())))); contactList.getSelectionModel().getSelectedItems().stream().map(Contact::getID).collect(Collectors.toSet()))));

View File

@ -14,7 +14,7 @@
<children> <children>
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0"> <HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
<children> <children>
<TextField fx:id="groupNameBar" prefColumnCount="22" promptText="Enter Group Name"> <TextField fx:id="groupNameField" prefColumnCount="22" promptText="Enter Group Name">
<HBox.margin> <HBox.margin>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" /> <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</HBox.margin> </HBox.margin>