Package cz.masci.springfx.mvci.util
Class BuilderUtils
java.lang.Object
cz.masci.springfx.mvci.util.BuilderUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringImplicit style class of the validation supported textstatic final javafx.css.PseudoClassPseudo class added to invalid node. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic javafx.util.Builder<javafx.scene.layout.Region> createDetailWithCommandViewBuilder(javafx.scene.layout.Region detailView, javafx.scene.layout.Region commandView) javafx.scene.control.LabelCreates validation supporting text label with set style class error.<T extends javafx.scene.Node & io.github.palexdev.materialfx.validation.Validated>
javafx.scene.layout.RegionenhanceValidatedNodeWithSupportingText(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.RegionenhanceValidatedNodeWithSupportingText(T validatedNode, javafx.scene.control.Label supportingText, Consumer<javafx.beans.value.ChangeListener<? super Boolean>> revalidateFlagListener, io.github.palexdev.materialfx.validation.Constraint... inputConstraints) Creates a region with node and supporting text which appears when the node is invalid.
-
Field Details
-
INVALID_PSEUDO_CLASS
public static final javafx.css.PseudoClass INVALID_PSEUDO_CLASSPseudo class added to invalid node. -
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 theConstraint. 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 extendsNodeand implementsValidated- Parameters:
validatedNode- Node with validator to be validatedrevalidateFlagListener- Boolean property listener. Whenever value changes fromfalsetotruethe 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 a 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 theConstraint. The supporting text disappears when the node is valid again. The constraint is validated based on the change coming from revalidateFlagListener.- Type Parameters:
T- Type of Node to validate extendsNodeand implementsValidated- Parameters:
validatedNode- Node with validator to be validatedrevalidateFlagListener- Boolean property listener. Whenever value changes fromfalsetotruethe 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
-
createDetailWithCommandViewBuilder
public static javafx.util.Builder<javafx.scene.layout.Region> createDetailWithCommandViewBuilder(javafx.scene.layout.Region detailView, javafx.scene.layout.Region commandView)
-