Package proseccoCoding.TLN.control
Class SelectStatusController
java.lang.Object
proseccoCoding.TLN.control.SelectStatusController
Controller of the selectStatus view
It has the duty to let the user choose his service statuses of interest with a view to creating a query.
It also has to let the user move forward to the queryResults view and go back to the service types selection.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) javafx.beans.value.ChangeListener<Boolean>
Custom ChangeListener used to define the second part of the selectAll CheckBox behaviorprivate javafx.scene.control.CheckBox
CheckBox used to select/deselect all the service status CheckBoxes at the same time(package private) javafx.beans.value.ChangeListener<Boolean>
Custom ChangeListener used to define the first part of the selectAll CheckBox behaviorprivate javafx.scene.layout.VBox
VBox object used to contain all the CheckBoxes used to let the user select his service statuses of interest -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
checkBoxChanged
(Boolean newValue) This private method is used to manage the indeterminate status of the selectAll CheckBox If a service status CheckBox is set to false and the selectAll one was previously set to true, selectAll becomes indeterminate.private void
Method called when SelectServiceStatusController is loaded.private void
selectAllChanged
(Boolean value) This private method is used to change every CheckBox status to the selectAll oneprivate void
Switches scene to the "queryResults" one.private void
Switches scene to the "selectServices" one
-
Field Details
-
serviceStatusesPane
private javafx.scene.layout.VBox serviceStatusesPaneVBox object used to contain all the CheckBoxes used to let the user select his service statuses of interest -
selectAll
private javafx.scene.control.CheckBox selectAllCheckBox used to select/deselect all the service status CheckBoxes at the same time -
selectAllListener
javafx.beans.value.ChangeListener<Boolean> selectAllListenerCustom ChangeListener used to define the first part of the selectAll CheckBox behavior -
checkBoxListener
javafx.beans.value.ChangeListener<Boolean> checkBoxListenerCustom ChangeListener used to define the second part of the selectAll CheckBox behavior
-
-
Constructor Details
-
SelectStatusController
public SelectStatusController()
-
-
Method Details
-
initialize
private void initialize()Method called when SelectServiceStatusController is loaded. This method adds to serviceStatusesPane the selectAll CheckBox and a CheckBox for each service status that is associated with at least one service which service type, country and provider was previously selected, all with their ChangeListener. -
selectAllChanged
This private method is used to change every CheckBox status to the selectAll one- Parameters:
value
- status of selectAll CheckBox
-
checkBoxChanged
This private method is used to manage the indeterminate status of the selectAll CheckBox If a service status CheckBox is set to false and the selectAll one was previously set to true, selectAll becomes indeterminate.- Parameters:
newValue
- updated status of the selected CheckBox
-
switchToSelectServices
Switches scene to the "selectServices" one- Throws:
IOException
-
switchToQueryResults
Switches scene to the "queryResults" one. This method also tracks down the selected service statuses via checking the status of the CheckBoxes and sets selectedServiceStatus in TrustedListFacade's Query. If no service status was selected, a warning alert is set to inform the user of his mistake.- Throws:
IOException
-