Class BuilderUtils

java.lang.Object
cz.masci.springfx.mvci.util.BuilderUtils

public class BuilderUtils extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Implicit style class of the validation supported text
    static final javafx.css.PseudoClass
    Pseudo class added to invalid node.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    javafx.scene.control.Label
    Creates validation supporting text label with set style class error.
    <T extends javafx.scene.Node & io.github.palexdev.materialfx.validation.Validated>
    javafx.scene.layout.Region
    enhanceValidatedNodeWithSupportingText(T validatedNode, Consumer<javafx.beans.value.ChangeListener<? super Boolean>> revalidateFlagListener, io.github.palexdev.materialfx.validation.Constraint... inputConstraints)
    Creates region with node and supporting text which appears when the node is invalid.
    <T extends javafx.scene.Node & io.github.palexdev.materialfx.validation.Validated>
    javafx.scene.layout.Region
    enhanceValidatedNodeWithSupportingText(T validatedNode, javafx.scene.control.Label supportingText, Consumer<javafx.beans.value.ChangeListener<? super Boolean>> revalidateFlagListener, io.github.palexdev.materialfx.validation.Constraint... inputConstraints)
    Creates region with node and supporting text which appears when the node is invalid.

    Methods inherited from class java.lang.Object

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

    • INVALID_PSEUDO_CLASS

      public static final javafx.css.PseudoClass INVALID_PSEUDO_CLASS
      Pseudo class added to invalid node.
    • ERROR_STYLE_CLASS

      public static final String ERROR_STYLE_CLASS
      Implicit style class of the validation supported text
      See Also:
  • Constructor Details

    • BuilderUtils

      public BuilderUtils()
  • Method Details

    • enhanceValidatedNodeWithSupportingText

      public <T extends javafx.scene.Node & io.github.palexdev.materialfx.validation.Validated> javafx.scene.layout.Region enhanceValidatedNodeWithSupportingText(T validatedNode, Consumer<javafx.beans.value.ChangeListener<? super Boolean>> revalidateFlagListener, io.github.palexdev.materialfx.validation.Constraint... inputConstraints)
         Creates region with node and supporting text which appears when the node is invalid.
         When the node is invalid the supporting text appears with the text from the Constraint.
         The supporting text disappears when the node is valid again.
         The constrain is validated based on the change coming from revalidateFlagListener.
       
      Type Parameters:
      T - Type of Node to validate extends Node and implements Validated
      Parameters:
      validatedNode - Node with validator to be validated
      revalidateFlagListener - Boolean property listener. Whenever value changes from false to true the node is revalidated.
      inputConstraints - Constraints to check
      Returns:
      Region with the Node and supported text
    • enhanceValidatedNodeWithSupportingText

      public <T extends javafx.scene.Node & io.github.palexdev.materialfx.validation.Validated> javafx.scene.layout.Region enhanceValidatedNodeWithSupportingText(T validatedNode, javafx.scene.control.Label supportingText, Consumer<javafx.beans.value.ChangeListener<? super Boolean>> revalidateFlagListener, io.github.palexdev.materialfx.validation.Constraint... inputConstraints)
         Creates region with node and supporting text which appears when the node is invalid.
         When the node is invalid the supporting text appears with the text from the Constraint.
         The supporting text disappears when the node is valid again.
         The constrain is validated based on the change coming from revalidateFlagListener.
       
      Type Parameters:
      T - Type of Node to validate extends Node and implements Validated
      Parameters:
      validatedNode - Node with validator to be validated
      revalidateFlagListener - Boolean property listener. Whenever value changes from false to true the node is revalidated.
      inputConstraints - Constraints to check
      Returns:
      Region with the Node and supported text
    • createValidationSupportingText

      public javafx.scene.control.Label createValidationSupportingText()
         Creates validation supporting text label with set style class error.
         Set the label as not managed to not layout the node.
         Visibility and managing is updated when validating supporting input.
       
      Returns:
      Created label