java.lang.Object
com.prog3.ipt.Controller.ViewController
com.prog3.ipt.Controller.EditProfileViewController
- All Implemented Interfaces:
javafx.fxml.Initializable
EditProfileViewController is the controller that handles EditProfile view.
-
Field Summary
Modifier and TypeFieldDescriptionprivate javafx.scene.control.Button
private javafx.scene.control.DatePicker
private CitizenEditProfileOriginator
private javafx.scene.control.TextField
private javafx.scene.control.TextField
private javafx.scene.control.PasswordField
private javafx.scene.control.Button
private javafx.scene.control.TextField
private javafx.scene.control.Button
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
checkChanges
(Citizen firstCitizen, Citizen secondCitizen) Checks if citizen made changes on his profile datavoid
initialize
(URL url, ResourceBundle resourceBundle) protected void
Initializes View Componentprotected void
onBackButtonClick
(javafx.event.ActionEvent event) Back to previous viewprivate void
onSaveInformationButtonClick
(javafx.event.ActionEvent event) Saves changes to Citizen profileprivate void
onUndoButtonClick
(javafx.event.ActionEvent event) Undoes changesprivate void
Update Text Fields in EditProfile viewMethods inherited from class com.prog3.ipt.Controller.ViewController
checkDatePickersContent, checkTextFieldsContent, clearDatePickersContent, clearTextFieldsContent, generatePayPalAlert, getFxmlLoader, getLocalScene, getStage, onButtonClickNavigateToView, raiseConfirmationAlert, raiseErrorAlert, raiseInformationAlert, setFxmlLoader, setLocalScene, setStage, validateEmail
-
Field Details
-
backButton
private javafx.scene.control.Button backButton -
nameTextField
private javafx.scene.control.TextField nameTextField -
surnameTextField
private javafx.scene.control.TextField surnameTextField -
birthDatePicker
private javafx.scene.control.DatePicker birthDatePicker -
emailTextField
private javafx.scene.control.TextField emailTextField -
passwordField
private javafx.scene.control.PasswordField passwordField -
undoButton
private javafx.scene.control.Button undoButton -
saveInformationButton
private javafx.scene.control.Button saveInformationButton -
citizenEditProfileOriginator
-
-
Constructor Details
-
EditProfileViewController
public EditProfileViewController()
-
-
Method Details
-
onBackButtonClick
protected void onBackButtonClick(javafx.event.ActionEvent event) Back to previous view- Specified by:
onBackButtonClick
in classViewController
- Parameters:
event
- Button clicked
-
onSaveInformationButtonClick
private void onSaveInformationButtonClick(javafx.event.ActionEvent event) Saves changes to Citizen profile- Parameters:
event
- Button clicked- See Also:
-
onUndoButtonClick
private void onUndoButtonClick(javafx.event.ActionEvent event) Undoes changes- Parameters:
event
- Button clicked
-
updateTextFields
private void updateTextFields()Update Text Fields in EditProfile view -
checkChanges
Checks if citizen made changes on his profile data- Parameters:
firstCitizen
- A reference to a Citizen object, typically before the changessecondCitizen
- A reference to a Citizen object, typically after the changes- Returns:
- True if there are no changes, otherwise false
-
initialize
- See Also:
-
Initializable.initialize(URL, ResourceBundle)
-
initializeViewComponents
protected void initializeViewComponents()Description copied from class:ViewController
Initializes View Component- Specified by:
initializeViewComponents
in classViewController
- See Also:
-