Rename groupNameBar to groupNameField
This commit is contained in:
parent
3d6a38e354
commit
920c83c4d1
@ -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()))));
|
||||||
|
@ -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>
|
||||||
|
Reference in New Issue
Block a user