Class HealthInformationController
java.lang.Object
com.ehealthsystem.healthInformation.HealthInformationController
- All Implemented Interfaces:
javafx.fxml.Initializable
managed the deleting and creation of the user health information
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) javafx.scene.control.Button(package private) javafx.scene.control.ChoiceBox(package private) javafx.scene.control.TableColumn<HealthInformationTableView,String> (package private) javafx.scene.control.TableView<HealthInformationTableView>all attributes with a fx:id assigned in the view(package private) javafx.scene.control.TableColumn<HealthInformationTableView,String> (package private) HealthInformationTableViewrepresents the selected row to determine which row needs to be deleted when event is triggered -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleAddButton(javafx.event.ActionEvent event) Adds a health problem to the uservoidhandleBackButton(javafx.event.ActionEvent event) switches back to the primary viewvoidhandleDeleteButton(javafx.event.ActionEvent event) deletes a users health problem (a row) in the Tableviewvoidinitialize(URL url, ResourceBundle resourceBundle) The first method that is called when scene is switched.private voidLoad the users health problems from the database and store them als Observable
-
Field Details
-
healthTableView
javafx.scene.control.TableView<HealthInformationTableView> healthTableViewall attributes with a fx:id assigned in the view -
ICD
javafx.scene.control.TableColumn<HealthInformationTableView,String> ICD -
healthProblem
javafx.scene.control.TableColumn<HealthInformationTableView,String> healthProblem -
deleteButton
javafx.scene.control.Button deleteButton -
healthChoiceBox
javafx.scene.control.ChoiceBox healthChoiceBox -
selectedRow
HealthInformationTableView selectedRowrepresents the selected row to determine which row needs to be deleted when event is triggered
-
-
Constructor Details
-
HealthInformationController
public HealthInformationController()
-
-
Method Details
-
initialize
The first method that is called when scene is switched. Used to fill the choice box and load the users health problems.- Specified by:
initializein interfacejavafx.fxml.Initializable- Parameters:
url-resourceBundle-
-
loadHealthProblem
Load the users health problems from the database and store them als Observable- Throws:
SQLException
-
handleDeleteButton
deletes a users health problem (a row) in the Tableview- Parameters:
event- the event that triggered the method- Throws:
SQLExceptionIOException
-
handleAddButton
Adds a health problem to the user- Parameters:
event- the event that triggered the method- Throws:
SQLExceptionIOException
-
handleBackButton
switches back to the primary view- Parameters:
event- the event that triggered the method- Throws:
IOException
-