Class SelectServicesController

java.lang.Object
proseccoCoding.TLN.control.SelectServicesController

public class SelectServicesController extends Object
Controller of the selectServices view. It has the duty to let the user choose his service types of interest with a view to creating a query. It also has to let the user move forward to the service statuses selection and go back to the providers selection.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) javafx.beans.value.ChangeListener<Boolean>
    Custom ChangeListener used to define the second part of the selectAll CheckBox behavior
    private javafx.scene.control.CheckBox
    CheckBox used to select/deselect all the service types CheckBoxes at the same time
    (package private) javafx.beans.value.ChangeListener<Boolean>
    Custom ChangeListener used to define the first part of the selectAll CheckBox behavior
    private javafx.scene.layout.VBox
    VBox object used to contain all the CheckBoxes used to let the user select his service types of interest
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private void
    This private method is used to manage the indeterminate status of the selectAll CheckBox If a service type CheckBox is set to false and the selectAll one was previously set to true, selectAll becomes indeterminate.
    private void
    Method called when SelectServicesController is loaded.
    private void
    This private method is used to change every CheckBox status to the selectAll one
    private void
    Switches scene to the "selectProviders" one
    private void
    Switches scene to the "selectStatus" one.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • serviceTypesPane

      private javafx.scene.layout.VBox serviceTypesPane
      VBox object used to contain all the CheckBoxes used to let the user select his service types of interest
    • selectAll

      private javafx.scene.control.CheckBox selectAll
      CheckBox used to select/deselect all the service types CheckBoxes at the same time
    • selectAllListener

      javafx.beans.value.ChangeListener<Boolean> selectAllListener
      Custom ChangeListener used to define the first part of the selectAll CheckBox behavior
    • checkBoxListener

      javafx.beans.value.ChangeListener<Boolean> checkBoxListener
      Custom ChangeListener used to define the second part of the selectAll CheckBox behavior
  • Constructor Details

    • SelectServicesController

      public SelectServicesController()
  • Method Details

    • initialize

      private void initialize()
      Method called when SelectServicesController is loaded. This method adds to serviceTypesPane the selectAll CheckBox and a CheckBox for each service type that is associated with at least one service which country and provider was previously selected, all with their ChangeListener.
    • selectAllChanged

      private void selectAllChanged(Boolean value)
      This private method is used to change every CheckBox status to the selectAll one
      Parameters:
      value - status of selectAll CheckBox
    • checkBoxChanged

      private void checkBoxChanged(Boolean newValue)
      This private method is used to manage the indeterminate status of the selectAll CheckBox If a service type 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
    • switchToSelectStatus

      private void switchToSelectStatus() throws IOException
      Switches scene to the "selectStatus" one. This method also tracks down the selected service types via checking the status of the CheckBoxes and sets selectedServicesByType in TrustedListFacade's Query. If no service type was selected, a warning alert is set to inform the user of his mistake.
      Throws:
      IOException
    • switchToSelectProviders

      private void switchToSelectProviders() throws IOException
      Switches scene to the "selectProviders" one
      Throws:
      IOException