public class EditAccountView extends ViewWithMenu
Modifier and Type | Field and Description |
---|---|
private javafx.scene.control.TextField |
confirmPasswordField |
private javafx.scene.control.TextField |
currentPasswordField |
private static java.lang.String |
EDIT_ACCOUNT_FXML
The fxml resource for the view
|
private EditAccountController |
editAccountController |
private javafx.scene.control.Label |
errorLabel |
private static java.lang.String |
FX_TEXT_FILL_RED
Used the set the color of a label to red
|
private javafx.scene.control.TextField |
passwordField |
private javafx.scene.control.Label |
passwordInfoLabel |
private javafx.scene.control.Button |
saveButton |
private javafx.scene.control.TextField |
userNameField |
private javafx.scene.control.Label |
userNameInfoLabel |
Constructor and Description |
---|
EditAccountView(EditAccountController controller,
javafx.scene.Scene scene)
Loads the fxml and creates the menu
|
Modifier and Type | Method and Description |
---|---|
private java.lang.String |
getConfirmPasswordField() |
private java.lang.String |
getCurrentPasswordField() |
private java.lang.String |
getPasswordField() |
private java.lang.String |
getUserNameField() |
void |
hideAllLabels()
Hides all the labels on the screen
|
private void |
initialize()
Initializes the Window, disable the save button when current password field is
empty and username or password field is empty
|
void |
onSave(javafx.event.ActionEvent event)
Handles the event when the save button is pressed
|
void |
showErrorPassword()
Displays an error label and a popup when an error with the password occurred
|
void |
showErrorUsername()
Displays an error label when an error with the user name occurred
|
void |
showInfoPasswordPopup()
Displays an information popup to explain the rules on the password
|
void |
showInvalidCurrentPasswordError()
Displays an error label when the current password is invalid
|
void |
showPasswordsDontMatchError()
Displays an error label when the passwords don't match
|
void |
showProfileEditedPopup()
Displays an information popup to notify the user his profile has been updated
|
createMenu, disableHelpButton, enableHelpButton, getHeader, onEditProfileClick, onHelpClick, onLogoutClick, onMyGroceryListsClick, onMyRecipesClick, onShowMapClick
showDatabaseConnectionError, showDataBaseInternalError
private static final java.lang.String EDIT_ACCOUNT_FXML
private static final java.lang.String FX_TEXT_FILL_RED
private javafx.scene.control.TextField userNameField
private javafx.scene.control.TextField passwordField
private javafx.scene.control.TextField confirmPasswordField
private javafx.scene.control.TextField currentPasswordField
private javafx.scene.control.Button saveButton
private javafx.scene.control.Label passwordInfoLabel
private javafx.scene.control.Label userNameInfoLabel
private javafx.scene.control.Label errorLabel
private EditAccountController editAccountController
public EditAccountView(EditAccountController controller, javafx.scene.Scene scene)
controller
- scene
- private void initialize()
private java.lang.String getCurrentPasswordField()
private java.lang.String getUserNameField()
private java.lang.String getPasswordField()
private java.lang.String getConfirmPasswordField()
public void showErrorPassword()
public void showErrorUsername()
public void hideAllLabels()
public void showPasswordsDontMatchError()
public void showInvalidCurrentPasswordError()
public void showInfoPasswordPopup()
public void showProfileEditedPopup()
public void onSave(javafx.event.ActionEvent event)
event
-