Class OptionalBuilderImpl<M>
- java.lang.Object
-
- net.officefloor.gef.configurer.internal.AbstractBuilder<M,M,ValueInput,OptionalBuilder<M>>
-
- net.officefloor.gef.configurer.internal.inputs.OptionalBuilderImpl<M>
-
- All Implemented Interfaces:
Builder<M,M,OptionalBuilder<M>>,InputBuilder<M>,ColumnRenderer<M,M>,ValueRendererFactory<M,ValueInput>,ItemBuilder<M>,OptionalBuilder<M>
public class OptionalBuilderImpl<M> extends AbstractBuilder<M,M,ValueInput,OptionalBuilder<M>> implements OptionalBuilder<M>
OptionalBuilderimplementation.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description OptionalBuilderImpl(java.util.function.Predicate<M> isShow, EnvironmentBridge envBridge)Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChoiceBuilder<M>choices(java.lang.String label)Builds choices in configuration.ClassBuilder<M>clazz(java.lang.String label)Adds aClassproperty to be configured.protected OptionalValueInput<M>createInput(ValueInputContext<M,M> context)Creates the inputValueInputfor theObservableValue.FlagBuilder<M>flag(java.lang.String label)Adds flag property to be configured.<I> ListBuilder<M,I>list(java.lang.String label, java.lang.Class<I> itemType)Configures creating a list of items.MappingBuilder<M>map(java.lang.String label, java.util.function.Function<M,javafx.collections.ObservableList<java.lang.String>> getSources, java.util.function.Function<M,javafx.collections.ObservableList<java.lang.String>> getTargets)Configures a mapping of name to name.<I> MultipleBuilder<M,I>multiple(java.lang.String label, java.lang.Class<I> itemType)Configures multiple items.OptionalBuilder<M>optional(java.util.function.Predicate<M> isShow)Configures optional configuration.PropertiesBuilder<M>properties(java.lang.String label)ConfiguresPropertyList.ResourceBuilder<M>resource(java.lang.String label)Adds a resource property to be configured.<I> SelectBuilder<M,I>select(java.lang.String label, java.util.function.Function<M,javafx.collections.ObservableList<I>> getItems)Configures selecting from a list of items.TextBuilder<M>text(java.lang.String label)Adds text property to be configured.-
Methods inherited from class net.officefloor.gef.configurer.internal.AbstractBuilder
configureTableColumn, createCellProperty, createCellRenderer, createErrorFeedback, createLabel, createTableColumn, createValueRenderer, getError, getLabel, init, isEditable, setValue, validate
-
-
-
-
Constructor Detail
-
OptionalBuilderImpl
public OptionalBuilderImpl(java.util.function.Predicate<M> isShow, EnvironmentBridge envBridge)
Instantiate.- Parameters:
isShow- Indicates whether to show optional.envBridge-EnvironmentBridge.
-
-
Method Detail
-
createInput
protected OptionalValueInput<M> createInput(ValueInputContext<M,M> context)
Description copied from class:AbstractBuilderCreates the inputValueInputfor theObservableValue.- Specified by:
createInputin classAbstractBuilder<M,M,ValueInput,OptionalBuilder<M>>- Parameters:
context-ValueInputContext.- Returns:
ValueInputto configure theObservableValue.
-
choices
public ChoiceBuilder<M> choices(java.lang.String label)
Description copied from interface:InputBuilderBuilds choices in configuration.- Specified by:
choicesin interfaceInputBuilder<M>- Parameters:
label- Label for the choices.- Returns:
ChoiceBuilder.
-
list
public <I> ListBuilder<M,I> list(java.lang.String label, java.lang.Class<I> itemType)
Description copied from interface:InputBuilderConfigures creating a list of items.- Specified by:
listin interfaceInputBuilder<M>- Type Parameters:
I- Item type.- Parameters:
label- Label for the items.itemType- Item type.- Returns:
ListBuilder.
-
select
public <I> SelectBuilder<M,I> select(java.lang.String label, java.util.function.Function<M,javafx.collections.ObservableList<I>> getItems)
Description copied from interface:InputBuilderConfigures selecting from a list of items.- Specified by:
selectin interfaceInputBuilder<M>- Type Parameters:
I- Item type.- Parameters:
label- Label for the selection.getItems- Function to extract the items.- Returns:
SelectBuilder.
-
optional
public OptionalBuilder<M> optional(java.util.function.Predicate<M> isShow)
Description copied from interface:InputBuilderConfigures optional configuration.- Specified by:
optionalin interfaceInputBuilder<M>- Parameters:
isShow-Predicateon whether to show the optional configuration.- Returns:
OptionalBuilder.
-
multiple
public <I> MultipleBuilder<M,I> multiple(java.lang.String label, java.lang.Class<I> itemType)
Description copied from interface:InputBuilderConfigures multiple items.- Specified by:
multiplein interfaceInputBuilder<M>- Type Parameters:
I- Item type.- Parameters:
label- Label for the items.itemType- Item type.- Returns:
MultipleBuilder.
-
properties
public PropertiesBuilder<M> properties(java.lang.String label)
Description copied from interface:InputBuilderConfiguresPropertyList.- Specified by:
propertiesin interfaceInputBuilder<M>- Parameters:
label- Label for theProperties.- Returns:
PropertiesBuilder.
-
map
public MappingBuilder<M> map(java.lang.String label, java.util.function.Function<M,javafx.collections.ObservableList<java.lang.String>> getSources, java.util.function.Function<M,javafx.collections.ObservableList<java.lang.String>> getTargets)
Description copied from interface:InputBuilderConfigures a mapping of name to name.- Specified by:
mapin interfaceInputBuilder<M>- Parameters:
label- Label for the mapping.getSources-Functionto extract the sources.getTargets-Functionto extract the targets.- Returns:
MappingBuilder.
-
clazz
public ClassBuilder<M> clazz(java.lang.String label)
Description copied from interface:InputBuilderAdds aClassproperty to be configured.- Specified by:
clazzin interfaceInputBuilder<M>- Parameters:
label- Label.- Returns:
ClassBuilder.
-
resource
public ResourceBuilder<M> resource(java.lang.String label)
Description copied from interface:InputBuilderAdds a resource property to be configured.- Specified by:
resourcein interfaceInputBuilder<M>- Parameters:
label- Label.- Returns:
ResourceBuilder.
-
text
public TextBuilder<M> text(java.lang.String label)
Description copied from interface:ItemBuilderAdds text property to be configured.- Specified by:
textin interfaceItemBuilder<M>- Parameters:
label- Label.- Returns:
TextBuilder.
-
flag
public FlagBuilder<M> flag(java.lang.String label)
Description copied from interface:ItemBuilderAdds flag property to be configured.- Specified by:
flagin interfaceItemBuilder<M>- Parameters:
label- Label.- Returns:
FlagBuilder.
-
-