- 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.ChildrenGroupImplfor the parentAdaptedChild.java.lang.StringgetConfigurationPath()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-Functionto get the childrenModelinstances from theModel.childrenEvents-Enumevents fired by theModelfor outputModelchanges.parentAdaptedModel- ParentAbstractAdaptedFactory.
-
-
Method Detail
-
createChildrenGroup
public ChildrenGroup<M,E> createChildrenGroup(AdaptedChild<M> parent)
Creates theChildrenGroupFactory.ChildrenGroupImplfor the parentAdaptedChild.- Parameters:
parent- ParentAdaptedChild.- Returns:
ChildrenGroupFactory.ChildrenGroupImpl.
-
getConfigurationPath
public java.lang.String getConfigurationPath()
Description copied from interface:ChildrenGroupBuilderObtains the configuration path.- Specified by:
getConfigurationPathin 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:ChildrenGroupBuilderAdds a childModel.- Specified by:
addChildin interfaceChildrenGroupBuilder<R extends Model,O>- Type Parameters:
CM-Modeltype.CE-Modelevent type.- Parameters:
modelPrototype-Modelprototype to determineClassof theModeland used in visual validation.viewFactory-AdaptedChildVisualFactoryto create the view for theAdaptedChild.- Returns:
AdaptedParentBuilderto build the adapter over theModel.
-
-