Class WizardStateDependencyValidator<T>

java.lang.Object
docking.wizard.WizardStateDependencyValidator<T>

public class WizardStateDependencyValidator<T> extends Object
  • Constructor Details

    • WizardStateDependencyValidator

      public WizardStateDependencyValidator()
  • Method Details

    • addDependency

      public void addDependency(T dependent, T predecessor)
      Registers a dependency from one property state to another. If the predecessor is null, then the dependent is registered such that a call to findAffectedDependants(WizardState) will include that property key only if its cached value is null. (i.e. the first time it is called.)
      Parameters:
      dependent - the property key that depends on a previous property being set.
      predecessor - the property key of the property that affects the dependent property.
    • findAffectedDependants

      public Set<T> findAffectedDependants(WizardState<T> globalState)
      Returns a set of all property keys that need to have their values set because a predecessor property has been changed that may affect the valid values for this property. Also, any property keys that don't have a value in the local cache will be returned.
      Parameters:
      globalState - the global WizardState that is passed from one wizard panel to the next.
      Returns:
      the set of property keys whose values should be (re)computed.
    • updatePropertyValues

      public void updatePropertyValues(WizardState<T> globalState)
      Updates the local cache values for all the relevant properties. This method should be called from a wizard panel when the "next" action is invoked (i.e. the user values have been accepted).
      Parameters:
      globalState - The WizardState containing all the property values.