- java.lang.Object
-
- net.officefloor.gef.editor.internal.models.ChildrenGroupFactory<R,O,M,E>
-
- All Implemented Interfaces:
ChildrenGroupBuilder<R,O>
public class ChildrenGroupFactory<R extends Model,O,M extends Model,E extends java.lang.Enum<E>> extends java.lang.Object implements ChildrenGroupBuilder<R,O>
Factory to create a- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description ChildrenGroupFactory(java.lang.String configurationPathPrefix, java.lang.String childGroupName, java.util.function.Function<M,java.util.List<? extends Model>> getChildren, E[] childrenEvents, AbstractAdaptedFactory<R,O,?,?,?> parentAdaptedModel)
Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <CM extends Model,CE extends java.lang.Enum<CE>>
AdaptedChildBuilder<R,O,CM,CE>addChild(CM modelPrototype, AdaptedChildVisualFactory<CM> viewFactory)
Adds a childModel
.ChildrenGroup<M,E>
createChildrenGroup(AdaptedChild<M> parent)
Creates theChildrenGroupFactory.ChildrenGroupImpl
for the parentAdaptedChild
.java.lang.String
getConfigurationPath()
Obtains the configuration path.
-
-
-
Constructor Detail
-
ChildrenGroupFactory
public ChildrenGroupFactory(java.lang.String configurationPathPrefix, java.lang.String childGroupName, java.util.function.Function<M,java.util.List<? extends Model>> getChildren, E[] childrenEvents, AbstractAdaptedFactory<R,O,?,?,?> parentAdaptedModel)
Instantiate.- Parameters:
configurationPathPrefix
- Prefix to the configuration path.childGroupName
- Child grouping name.getChildren
-Function
to get the childrenModel
instances from theModel
.childrenEvents
-Enum
events fired by theModel
for outputModel
changes.parentAdaptedModel
- ParentAbstractAdaptedFactory
.
-
-
Method Detail
-
createChildrenGroup
public ChildrenGroup<M,E> createChildrenGroup(AdaptedChild<M> parent)
Creates theChildrenGroupFactory.ChildrenGroupImpl
for the parentAdaptedChild
.- Parameters:
parent
- ParentAdaptedChild
.- Returns:
ChildrenGroupFactory.ChildrenGroupImpl
.
-
getConfigurationPath
public java.lang.String getConfigurationPath()
Description copied from interface:ChildrenGroupBuilder
Obtains the configuration path.- Specified by:
getConfigurationPath
in interfaceChildrenGroupBuilder<R extends Model,O>
- Returns:
- Configuration path.
-
addChild
public <CM extends Model,CE extends java.lang.Enum<CE>> AdaptedChildBuilder<R,O,CM,CE> addChild(CM modelPrototype, AdaptedChildVisualFactory<CM> viewFactory)
Description copied from interface:ChildrenGroupBuilder
Adds a childModel
.- Specified by:
addChild
in interfaceChildrenGroupBuilder<R extends Model,O>
- Type Parameters:
CM
-Model
type.CE
-Model
event type.- Parameters:
modelPrototype
-Model
prototype to determineClass
of theModel
and used in visual validation.viewFactory
-AdaptedChildVisualFactory
to create the view for theAdaptedChild
.- Returns:
AdaptedParentBuilder
to build the adapter over theModel
.
-
-