Class SelectionController<T extends java.lang.Comparable<T>>

java.lang.Object
bayern.steinbrecher.wizard.WizardableController<java.util.Optional<java.util.Set<T>>>
bayern.steinbrecher.wizard.pages.SelectionController<T>
Type Parameters:
T - The type of the objects being able to select.

public class SelectionController<T extends java.lang.Comparable<T>>
extends WizardableController<java.util.Optional<java.util.Set<T>>>
Represents controller for Selection.fxml.
Since:
1.4
Author:
Stefan Huber
  • Property Summary

    Properties 
    Type Property Description
    javafx.beans.property.ReadOnlyBooleanProperty allSelected
    Returns the property representing a boolean indicating whether every entry is currently selected.
    javafx.beans.property.ReadOnlyBooleanProperty nothingSelected
    Returns the property representing a boolean indicating whether no entry is currently selected.
    javafx.beans.property.ReadOnlyIntegerProperty selectedCount
    Returns the property representing the number of currently selected fields.
    javafx.beans.property.ReadOnlyIntegerProperty totalCount
    Returns the property representing the total number of entries to select.

    Properties inherited from class bayern.steinbrecher.wizard.WizardableController

    stage, valid
  • Constructor Summary

    Constructors 
    Constructor Description
    SelectionController()  
  • Method Summary

    Modifier and Type Method Description
    javafx.beans.property.ReadOnlyBooleanProperty allSelectedProperty()
    Returns the property representing a boolean indicating whether every entry is currently selected.
    protected java.util.Optional<java.util.Set<T>> calculateResult()
    Calculates the actual result if any.
    protected java.util.Optional<java.util.ResourceBundle> getResourceBundle()
    Returns the resource bundle which contains the resources that the content of the WizardPage requires.
    int getSelectedCount()
    Returns the number of currently selected fields.
    int getTotalCount()
    The total number of entries to select.
    boolean isAllSelected()
    Checks whether currently every entry is selected.
    boolean isNothingSelected()
    Checks whether currently no entry is selected.
    javafx.beans.property.ReadOnlyBooleanProperty nothingSelectedProperty()
    Returns the property representing a boolean indicating whether no entry is currently selected.
    javafx.beans.property.ReadOnlyIntegerProperty selectedCountProperty()
    Returns the property representing the number of currently selected fields.
    void setOptions​(java.util.Set<T> options)
    Removes all options and replaces them with the new list of options.
    javafx.beans.property.ReadOnlyIntegerProperty totalCountProperty()
    Returns the property representing the total number of entries to select.

    Methods inherited from class java.lang.Object

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

    • selectedCount

      public javafx.beans.property.ReadOnlyIntegerProperty selectedCountProperty
      Returns the property representing the number of currently selected fields.
      See Also:
      getSelectedCount()
    • totalCount

      public javafx.beans.property.ReadOnlyIntegerProperty totalCountProperty
      Returns the property representing the total number of entries to select.
      See Also:
      getTotalCount()
    • nothingSelected

      public javafx.beans.property.ReadOnlyBooleanProperty nothingSelectedProperty
      Returns the property representing a boolean indicating whether no entry is currently selected.
      See Also:
      isNothingSelected()
    • allSelected

      public javafx.beans.property.ReadOnlyBooleanProperty allSelectedProperty
      Returns the property representing a boolean indicating whether every entry is currently selected.
      See Also:
      isAllSelected()
  • Constructor Details

  • Method Details

    • setOptions

      public void setOptions​(java.util.Set<T> options)
      Removes all options and replaces them with the new list of options.
      Parameters:
      options - The list of new options.
    • calculateResult

      protected java.util.Optional<java.util.Set<T>> calculateResult()
      Calculates the actual result if any. It does not recognize any criteria about whether to return a result or not. This is handled by WizardableController.getResult().
      Specified by:
      calculateResult in class WizardableController<java.util.Optional<java.util.Set<T extends java.lang.Comparable<T>>>>
      Returns:
      The actual result if any.
      See Also:
      WizardableController.getResult()
    • selectedCountProperty

      public javafx.beans.property.ReadOnlyIntegerProperty selectedCountProperty()
      Returns the property representing the number of currently selected fields.
      See Also:
      getSelectedCount()
    • getSelectedCount

      public int getSelectedCount()
      Returns the number of currently selected fields.
      Returns:
      The number of currently selected fields.
    • totalCountProperty

      public javafx.beans.property.ReadOnlyIntegerProperty totalCountProperty()
      Returns the property representing the total number of entries to select.
      See Also:
      getTotalCount()
    • getTotalCount

      public int getTotalCount()
      The total number of entries to select.
      Returns:
      The total number of entries to select.
    • nothingSelectedProperty

      public javafx.beans.property.ReadOnlyBooleanProperty nothingSelectedProperty()
      Returns the property representing a boolean indicating whether no entry is currently selected.
      See Also:
      isNothingSelected()
    • isNothingSelected

      public boolean isNothingSelected()
      Checks whether currently no entry is selected.
      Returns:
      true only if no entry is selected.
    • allSelectedProperty

      public javafx.beans.property.ReadOnlyBooleanProperty allSelectedProperty()
      Returns the property representing a boolean indicating whether every entry is currently selected.
      See Also:
      isAllSelected()
    • isAllSelected

      public boolean isAllSelected()
      Checks whether currently every entry is selected.
      Returns:
      true only if every entry is selected.
    • getResourceBundle

      protected java.util.Optional<java.util.ResourceBundle> getResourceBundle()
      Returns the resource bundle which contains the resources that the content of the WizardPage requires.
      Specified by:
      getResourceBundle in class WizardableController<java.util.Optional<java.util.Set<T extends java.lang.Comparable<T>>>>
      Returns:
      The resource bundle which contains the resources that the content of the WizardPage requires.