Class AdaptedChildFactory<R extends Model,O,M extends Model,E extends java.lang.Enum<E>,A extends AdaptedChild<M>>
- java.lang.Object
-
- net.officefloor.gef.editor.internal.models.AbstractAdaptedFactory<R,O,M,E,A>
-
- net.officefloor.gef.editor.internal.models.AbstractAdaptedConnectableFactory<R,O,M,E,A>
-
- net.officefloor.gef.editor.internal.models.AdaptedChildFactory<R,O,M,E,A>
-
- All Implemented Interfaces:
AdaptedChildBuilder<R,O,M,E>
,AdaptedConnectableBuilder<R,O,M,E>
- Direct Known Subclasses:
AdaptedParentFactory
public class AdaptedChildFactory<R extends Model,O,M extends Model,E extends java.lang.Enum<E>,A extends AdaptedChild<M>> extends AbstractAdaptedConnectableFactory<R,O,M,E,A> implements AdaptedChildBuilder<R,O,M,E>
Factory for anAdaptedChild
.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AdaptedChildFactory.AdaptedChildImpl<R extends Model,O,M extends Model,E extends java.lang.Enum<E>,A extends AdaptedChild<M>>
AdaptedChild
implementation.-
Nested classes/interfaces inherited from class net.officefloor.gef.editor.internal.models.AbstractAdaptedConnectableFactory
AbstractAdaptedConnectableFactory.AbstractAdaptedConnectable<R extends Model,O,M extends Model,E extends java.lang.Enum<E>,A extends AdaptedConnectable<M>,F extends AbstractAdaptedConnectableFactory<R,O,M,E,A>>
-
Nested classes/interfaces inherited from class net.officefloor.gef.editor.internal.models.AbstractAdaptedFactory
AbstractAdaptedFactory.AbstractAdaptedModel<R extends Model,O,M extends Model,E extends java.lang.Enum<E>,A extends AdaptedModel<M>,F extends AbstractAdaptedFactory<R,O,M,E,A>>
-
Nested classes/interfaces inherited from interface net.officefloor.gef.editor.AdaptedChildBuilder
AdaptedChildBuilder.LabelChange<M extends Model>
-
-
Field Summary
-
Fields inherited from class net.officefloor.gef.editor.internal.models.AbstractAdaptedConnectableFactory
connectionFactories, connections, modelPrototype, stylesheetContent, stylesheetUrl
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AdaptedChildFactory(java.lang.String configurationPathPrefix, M modelPrototype, java.util.function.Supplier<A> newAdaptedModel, AdaptedChildVisualFactory<M> viewFactory, OfficeFloorContentPartFactory<R,O> contentPartFactory)
AllowAdaptedParentBuilder
inheritance.AdaptedChildFactory(java.lang.String configurationPathPrefix, M modelPrototype, AdaptedChildVisualFactory<M> viewFactory, AbstractAdaptedFactory<R,O,?,?,?> parentAdaptedModel)
Instantiate asAdaptedChild
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChildrenGroupBuilder<R,O>
children(java.lang.String childGroupName, java.util.function.Function<M,java.util.List<? extends Model>> getChildren, E... childrenEvents)
Registers children for theModel
.void
label(java.util.function.Function<M,java.lang.String> getLabel, E... labelChangeEvents)
Registers a read-only label for theModel
.void
label(java.util.function.Function<M,java.lang.String> getLabel, AdaptedChildBuilder.LabelChange<M> setLabel, E... labelChangeEvents)
Registers a mutable label for theModel
.-
Methods inherited from class net.officefloor.gef.editor.internal.models.AbstractAdaptedConnectableFactory
connectMany, connectOne, loadModelToConnection, style, validate
-
Methods inherited from class net.officefloor.gef.editor.internal.models.AbstractAdaptedFactory
getAdaptedModel, getConfigurationPath, getContentPartFactory, getInjector, getModelClass, getModelFactory, init, newAdaptedModel, registerEventListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.officefloor.gef.editor.AdaptedConnectableBuilder
connectMany, connectOne, getConfigurationPath, getModelClass, style
-
-
-
-
Constructor Detail
-
AdaptedChildFactory
public AdaptedChildFactory(java.lang.String configurationPathPrefix, M modelPrototype, AdaptedChildVisualFactory<M> viewFactory, AbstractAdaptedFactory<R,O,?,?,?> parentAdaptedModel)
Instantiate asAdaptedChild
.- Parameters:
configurationPathPrefix
- Prefix on the configuration path.modelPrototype
-Model
prototype.viewFactory
-AdaptedChildVisualFactory
.parentAdaptedModel
- ParentAbstractAdaptedFactory
.
-
AdaptedChildFactory
protected AdaptedChildFactory(java.lang.String configurationPathPrefix, M modelPrototype, java.util.function.Supplier<A> newAdaptedModel, AdaptedChildVisualFactory<M> viewFactory, OfficeFloorContentPartFactory<R,O> contentPartFactory)
AllowAdaptedParentBuilder
inheritance.- Parameters:
configurationPathPrefix
- Prefix on the configuration path.modelPrototype
-Model
prototype.newAdaptedModel
-Supplier
for theAdaptedModel
.viewFactory
-AdaptedChildVisualFactory
.contentPartFactory
-OfficeFloorContentPartFactory
.
-
-
Method Detail
-
label
@SafeVarargs public final void label(java.util.function.Function<M,java.lang.String> getLabel, E... labelChangeEvents)
Description copied from interface:AdaptedChildBuilder
Registers a read-only label for theModel
.
-
label
@SafeVarargs public final void label(java.util.function.Function<M,java.lang.String> getLabel, AdaptedChildBuilder.LabelChange<M> setLabel, E... labelChangeEvents)
Description copied from interface:AdaptedChildBuilder
Registers a mutable label for theModel
.
-
children
@SafeVarargs public final ChildrenGroupBuilder<R,O> children(java.lang.String childGroupName, java.util.function.Function<M,java.util.List<? extends Model>> getChildren, E... childrenEvents)
Description copied from interface:AdaptedChildBuilder
Registers children for theModel
.- Specified by:
children
in interfaceAdaptedChildBuilder<R extends Model,O,M extends Model,E extends java.lang.Enum<E>>
- Parameters:
childGroupName
- Name of child group.getChildren
-Function
to get the children from theModel
.childrenEvents
-Enum
events fired by theModel
for children changes.- Returns:
ChildrenGroupBuilder
.
-
-