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>
MultipleBuilderimplementation.- 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 aClassproperty to be configured.protected ValueInputcreateInput(ValueInputContext<M,java.util.List<V>> context)Creates the inputValueInputfor theObservableValue.FlagBuilder<V>flag(java.lang.String label)Adds flag property to be configured.voiditemLabel(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:MultipleBuilderConfigures obtaining the label for the particular item.- Specified by:
itemLabelin interfaceMultipleBuilder<M,V>- Parameters:
getItemLabel-Functionto obtain the label for a particular item.
-
createInput
protected ValueInput createInput(ValueInputContext<M,java.util.List<V>> context)
Description copied from class:AbstractBuilderCreates the inputValueInputfor theObservableValue.- Specified by:
createInputin classAbstractBuilder<M,java.util.List<V>,ValueInput,MultipleBuilder<M,V>>- Parameters:
context-ValueInputContext.- Returns:
ValueInputto configure theObservableValue.
-
choices
public ChoiceBuilder<V> 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<V,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<V,I> select(java.lang.String label, java.util.function.Function<V,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<V> optional(java.util.function.Predicate<V> 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<V,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<V> 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<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: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<V> 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<V> 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<V> 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<V> 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.
-
-