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
Modifier 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) HealthInformationTableView
represents the selected row to determine which row needs to be deleted when event is triggered -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
handleAddButton
(javafx.event.ActionEvent event) Adds a health problem to the uservoid
handleBackButton
(javafx.event.ActionEvent event) switches back to the primary viewvoid
handleDeleteButton
(javafx.event.ActionEvent event) deletes a users health problem (a row) in the Tableviewvoid
initialize
(URL url, ResourceBundle resourceBundle) The first method that is called when scene is switched.private void
Load 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:
initialize
in 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:
SQLException
IOException
-
handleAddButton
Adds a health problem to the user- Parameters:
event
- the event that triggered the method- Throws:
SQLException
IOException
-
handleBackButton
switches back to the primary view- Parameters:
event
- the event that triggered the method- Throws:
IOException
-