Package io.github.factoryfx.factory
Class FactoryBase.DataConfiguration
- java.lang.Object
-
- io.github.factoryfx.factory.FactoryBase.DataConfiguration
-
- Enclosing class:
- FactoryBase<L,R extends FactoryBase<?,R>>
public static class FactoryBase.DataConfiguration extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description DataConfiguration(FactoryBase<?,?> factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> voidaddValidation(Validation<T> validation, Attribute<?,?>... dependencies)factory validationvoidsetAttributeListGroupedSupplier(java.util.function.Function<java.util.List<Attribute<?,?>>,java.util.List<AttributeGroup>> attributeListGroupedSupplier)grouped iteration over attributes e.g.voidsetDisplayTextDependencies(Attribute<?,?>... attributes)set the attributes that affect the display text
used for live update in guivoidsetDisplayTextDependencies(java.util.List<Attribute<?,?>> attributes)voidsetDisplayTextProvider(java.util.function.Supplier<java.lang.String> displayTextProvider)short readable text describing the factoryvoidsetDisplayTextProvider(java.util.function.Supplier<java.lang.String> displayTextProvider, Attribute<?,?>... dependencies)short readable text describing the factoryvoidsetMatchSearchTextFunction(java.util.function.Function<java.lang.String,java.lang.Boolean> matchSearchTextFunction)define match logic for full-text search e.g.
-
-
-
Constructor Detail
-
DataConfiguration
public DataConfiguration(FactoryBase<?,?> factory)
-
-
Method Detail
-
setDisplayTextProvider
public void setDisplayTextProvider(java.util.function.Supplier<java.lang.String> displayTextProvider)
short readable text describing the factory- Parameters:
displayTextProvider- displayTextProvider
-
setDisplayTextProvider
public void setDisplayTextProvider(java.util.function.Supplier<java.lang.String> displayTextProvider, Attribute<?,?>... dependencies)short readable text describing the factory- Parameters:
displayTextProvider- custom displayText functiondependencies- attributes which affect the display text
-
setDisplayTextDependencies
public void setDisplayTextDependencies(java.util.List<Attribute<?,?>> attributes)
- Parameters:
attributes- the attributes affecting the display text- See Also:
setDisplayTextDependencies(Attribute[])
-
setDisplayTextDependencies
public void setDisplayTextDependencies(Attribute<?,?>... attributes)
set the attributes that affect the display text
used for live update in gui- Parameters:
attributes- the attributes affecting the display text
-
setAttributeListGroupedSupplier
public void setAttributeListGroupedSupplier(java.util.function.Function<java.util.List<Attribute<?,?>>,java.util.List<AttributeGroup>> attributeListGroupedSupplier)
grouped iteration over attributes e.g. used in gui editor where each group is a new Tab- Parameters:
attributeListGroupedSupplier- function with parameter containing all attributes
-
setMatchSearchTextFunction
public void setMatchSearchTextFunction(java.util.function.Function<java.lang.String,java.lang.Boolean> matchSearchTextFunction)
define match logic for full-text search e.g. in tables- Parameters:
matchSearchTextFunction- matchSearchTextFunction
-
addValidation
public <T> void addValidation(Validation<T> validation, Attribute<?,?>... dependencies)
factory validation- Type Parameters:
T- this- Parameters:
validation- validation functiondependencies- attributes which affect the validation
-
-