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>
OptionalBuilder
implementation.- 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 aClass
property to be configured.protected OptionalValueInput<M>
createInput(ValueInputContext<M,M> context)
Creates the inputValueInput
for 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:AbstractBuilder
Creates the inputValueInput
for theObservableValue
.- Specified by:
createInput
in classAbstractBuilder<M,M,ValueInput,OptionalBuilder<M>>
- Parameters:
context
-ValueInputContext
.- Returns:
ValueInput
to configure theObservableValue
.
-
choices
public ChoiceBuilder<M> choices(java.lang.String label)
Description copied from interface:InputBuilder
Builds choices in configuration.- Specified by:
choices
in 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:InputBuilder
Configures creating a list of items.- Specified by:
list
in 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:InputBuilder
Configures selecting from a list of items.- Specified by:
select
in 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:InputBuilder
Configures optional configuration.- Specified by:
optional
in interfaceInputBuilder<M>
- Parameters:
isShow
-Predicate
on 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:InputBuilder
Configures multiple items.- Specified by:
multiple
in 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:InputBuilder
ConfiguresPropertyList
.- Specified by:
properties
in 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:InputBuilder
Configures a mapping of name to name.- Specified by:
map
in interfaceInputBuilder<M>
- Parameters:
label
- Label for the mapping.getSources
-Function
to extract the sources.getTargets
-Function
to extract the targets.- Returns:
MappingBuilder
.
-
clazz
public ClassBuilder<M> clazz(java.lang.String label)
Description copied from interface:InputBuilder
Adds aClass
property to be configured.- Specified by:
clazz
in interfaceInputBuilder<M>
- Parameters:
label
- Label.- Returns:
ClassBuilder
.
-
resource
public ResourceBuilder<M> resource(java.lang.String label)
Description copied from interface:InputBuilder
Adds a resource property to be configured.- Specified by:
resource
in interfaceInputBuilder<M>
- Parameters:
label
- Label.- Returns:
ResourceBuilder
.
-
text
public TextBuilder<M> text(java.lang.String label)
Description copied from interface:ItemBuilder
Adds text property to be configured.- Specified by:
text
in interfaceItemBuilder<M>
- Parameters:
label
- Label.- Returns:
TextBuilder
.
-
flag
public FlagBuilder<M> flag(java.lang.String label)
Description copied from interface:ItemBuilder
Adds flag property to be configured.- Specified by:
flag
in interfaceItemBuilder<M>
- Parameters:
label
- Label.- Returns:
FlagBuilder
.
-
-