Class MultipleBuilderImpl<M,V>
- java.lang.Object
-
- net.officefloor.gef.configurer.internal.AbstractBuilder<M,java.util.List<V>,ValueInput,MultipleBuilder<M,V>>
-
- net.officefloor.gef.configurer.internal.inputs.MultipleBuilderImpl<M,V>
-
- All Implemented Interfaces:
Builder<M,java.util.List<V>,MultipleBuilder<M,V>>
,InputBuilder<V>
,ColumnRenderer<M,java.util.List<V>>
,ValueRendererFactory<M,ValueInput>
,ItemBuilder<V>
,MultipleBuilder<M,V>
public class MultipleBuilderImpl<M,V> extends AbstractBuilder<M,java.util.List<V>,ValueInput,MultipleBuilder<M,V>> implements MultipleBuilder<M,V>
MultipleBuilder
implementation.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description MultipleBuilderImpl(java.lang.String label, EnvironmentBridge envBridge)
Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChoiceBuilder<V>
choices(java.lang.String label)
Builds choices in configuration.ClassBuilder<V>
clazz(java.lang.String label)
Adds aClass
property to be configured.protected ValueInput
createInput(ValueInputContext<M,java.util.List<V>> context)
Creates the inputValueInput
for theObservableValue
.FlagBuilder<V>
flag(java.lang.String label)
Adds flag property to be configured.void
itemLabel(java.util.function.Function<V,java.lang.String> getItemLabel)
Configures obtaining the label for the particular item.<I> ListBuilder<V,I>
list(java.lang.String label, java.lang.Class<I> itemType)
Configures creating a list of items.MappingBuilder<V>
map(java.lang.String label, java.util.function.Function<V,javafx.collections.ObservableList<java.lang.String>> getSources, java.util.function.Function<V,javafx.collections.ObservableList<java.lang.String>> getTargets)
Configures a mapping of name to name.<I> MultipleBuilder<V,I>
multiple(java.lang.String label, java.lang.Class<I> itemType)
Configures multiple items.OptionalBuilder<V>
optional(java.util.function.Predicate<V> isShow)
Configures optional configuration.PropertiesBuilder<V>
properties(java.lang.String label)
ConfiguresPropertyList
.ResourceBuilder<V>
resource(java.lang.String label)
Adds a resource property to be configured.<I> SelectBuilder<V,I>
select(java.lang.String label, java.util.function.Function<V,javafx.collections.ObservableList<I>> getItems)
Configures selecting from a list of items.TextBuilder<V>
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
-
MultipleBuilderImpl
public MultipleBuilderImpl(java.lang.String label, EnvironmentBridge envBridge)
Instantiate.- Parameters:
label
- Label.envBridge
-EnvironmentBridge
.
-
-
Method Detail
-
itemLabel
public void itemLabel(java.util.function.Function<V,java.lang.String> getItemLabel)
Description copied from interface:MultipleBuilder
Configures obtaining the label for the particular item.- Specified by:
itemLabel
in interfaceMultipleBuilder<M,V>
- Parameters:
getItemLabel
-Function
to obtain the label for a particular item.
-
createInput
protected ValueInput createInput(ValueInputContext<M,java.util.List<V>> context)
Description copied from class:AbstractBuilder
Creates the inputValueInput
for theObservableValue
.- Specified by:
createInput
in classAbstractBuilder<M,java.util.List<V>,ValueInput,MultipleBuilder<M,V>>
- Parameters:
context
-ValueInputContext
.- Returns:
ValueInput
to configure theObservableValue
.
-
choices
public ChoiceBuilder<V> 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<V,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<V,I> select(java.lang.String label, java.util.function.Function<V,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<V> optional(java.util.function.Predicate<V> 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<V,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<V> 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<V> map(java.lang.String label, java.util.function.Function<V,javafx.collections.ObservableList<java.lang.String>> getSources, java.util.function.Function<V,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<V> 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<V> 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<V> 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<V> 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
.
-
-