Package net.officefloor.gef.item
Class AbstractSectionItem<R extends Model,RE extends java.lang.Enum<RE>,O,M extends Model,E extends java.lang.Enum<E>,I extends AbstractSectionItem<R,RE,O,M,E,I>>
- java.lang.Object
-
- net.officefloor.gef.ide.editor.AbstractItem<R,O,R,RE,M,E>
-
- net.officefloor.gef.ide.editor.AbstractConfigurableItem<R,RE,O,M,E,I>
-
- net.officefloor.gef.item.AbstractSectionItem<R,RE,O,M,E,I>
-
- All Implemented Interfaces:
ConfigurableItem<I>
- Direct Known Subclasses:
ActivitySectionItem,WoofSectionItem
public abstract class AbstractSectionItem<R extends Model,RE extends java.lang.Enum<RE>,O,M extends Model,E extends java.lang.Enum<E>,I extends AbstractSectionItem<R,RE,O,M,E,I>> extends AbstractConfigurableItem<R,RE,O,M,E,I>
Configuration for the abstractSubSection/OfficeSection.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.officefloor.gef.ide.editor.AbstractConfigurableItem
AbstractConfigurableItem.ConfigurableModelContext<O,M>, AbstractConfigurableItem.IdeConfiguration<O,M extends Model,I>, AbstractConfigurableItem.IdeConfigurer, AbstractConfigurableItem.ItemActioner<O,M>, AbstractConfigurableItem.ItemConfigurer<O,M,I>
-
Nested classes/interfaces inherited from class net.officefloor.gef.ide.editor.AbstractItem
AbstractItem.ConfigurableContext<R extends Model,O>, AbstractItem.IdeChildrenGroup, AbstractItem.IdeConnection<C extends ConnectionModel>, AbstractItem.IdeConnectionTarget<C extends ConnectionModel,T extends Model,TE extends java.lang.Enum<TE>>, AbstractItem.IdeExtractor, AbstractItem.IdeLabeller, AbstractItem.IdeStyle, AbstractItem.PreferenceListener
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.IntegerchoiceChoice.protected java.util.Map<java.lang.String,java.lang.String>inputNameMappingSectionInputTypename mapping.protected java.lang.StringlocationLocation.protected java.lang.StringnameName.protected java.util.Map<java.lang.String,java.lang.String>outputNameMappingSectionOutputTypename mapping.protected PropertyListpropertiesprotected SectionTypesectionTypeprotected java.lang.StringsourceClassNameSectionSourceClassname.-
Fields inherited from class net.officefloor.gef.ide.editor.AbstractItem
builder
-
-
Constructor Summary
Constructors Constructor Description AbstractSectionItem()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Change<M>addSection(O operations, java.lang.String name, java.lang.String sourceClassName, java.lang.String location, PropertyList properties, SectionType sectionType)protected voidchildren(java.util.List<AbstractItem.IdeChildrenGroup> childGroups)Loads theAbstractItem.IdeChildrenGroupinstances.AbstractConfigurableItem.IdeConfigurerconfigure()Obtains the item configuration.protected abstract AbstractItem<R,O,M,E,?,?>createInputItem()Creates theSectionInputAbstractItemimplementation.protected abstract IcreateItem()Creates theAbstractSectionItemimplementation.protected abstract AbstractItem<R,O,M,E,?,?>createOutputItem()Creates theSectionOutputAbstractItemimplementation.protected abstract java.lang.StringgetSectionLocation(M model)Obtains the location from theModel.protected abstract java.lang.StringgetSectionName(M model)Obtains the name from theModel.protected abstract PropertyListgetSectionProperties(M model)Obtains thePropertyListfrom theModel.protected abstract java.lang.StringgetSectionSourceClassName(M model)Iitem(M model)Creates an item from theModel.static SectionTypeloadSectionType(AbstractSectionItem<?,?,?,?,?,?> item, EnvironmentBridge envBridge)Loads theSectionTypefor theAbstractSectionItem.protected voidloadStyles(java.util.List<AbstractItem.IdeStyle> styles)Default implementation ofAbstractItem.style()will invoke this to load styles.protected abstract Change<M>refactorSection(O operations, M model, java.lang.String name, java.lang.String sourceClassName, java.lang.String location, PropertyList properties, SectionType sectionType, java.util.Map<java.lang.String,java.lang.String> inputNameMapping, java.util.Map<java.lang.String,java.lang.String> outputNameMapping)protected abstract Change<M>removeSection(O operations, M model)javafx.scene.layout.Panevisual(M model, AdaptedChildVisualFactoryContext<M> context)Creates the visual for theModel.-
Methods inherited from class net.officefloor.gef.ide.editor.AbstractConfigurableItem
createAdaptedParent, extractIdeConfiguration, furtherAdapt
-
Methods inherited from class net.officefloor.gef.ide.editor.AbstractItem
connections, createChild, extract, furtherAdapt, getBuilder, getChildrenGroups, getConfigurableContext, getConnections, getPreferenceStyleId, init, label, loadToParent, prototype, style, translateFromCommaSeparatedList, translateToCommaSeparateList, translateToNameMappings, translateToPropertyList
-
-
-
-
Field Detail
-
name
protected java.lang.String name
Name.
-
choice
protected java.lang.Integer choice
Choice.
-
sourceClassName
protected java.lang.String sourceClassName
SectionSourceClassname.
-
location
protected java.lang.String location
Location.
-
properties
protected PropertyList properties
-
sectionType
protected SectionType sectionType
-
inputNameMapping
protected java.util.Map<java.lang.String,java.lang.String> inputNameMapping
SectionInputTypename mapping.
-
outputNameMapping
protected java.util.Map<java.lang.String,java.lang.String> outputNameMapping
SectionOutputTypename mapping.
-
-
Method Detail
-
loadSectionType
public static SectionType loadSectionType(AbstractSectionItem<?,?,?,?,?,?> item, EnvironmentBridge envBridge) throws java.lang.Exception
Loads theSectionTypefor theAbstractSectionItem.- Parameters:
item-AbstractSectionItem.envBridge-EnvironmentBridge.- Returns:
SectionType.- Throws:
java.lang.Exception- If fails to load theSectionType.
-
createItem
protected abstract I createItem()
Creates theAbstractSectionItemimplementation.- Returns:
AbstractSectionItemimplementation.
-
getSectionName
protected abstract java.lang.String getSectionName(M model)
Obtains the name from theModel.- Parameters:
model-Model.- Returns:
- Name.
-
getSectionSourceClassName
protected abstract java.lang.String getSectionSourceClassName(M model)
- Parameters:
model-Model.- Returns:
SectionSourceClassname.
-
getSectionLocation
protected abstract java.lang.String getSectionLocation(M model)
Obtains the location from theModel.- Parameters:
model-Model.- Returns:
- Location.
-
getSectionProperties
protected abstract PropertyList getSectionProperties(M model)
Obtains thePropertyListfrom theModel.- Parameters:
model-Model.- Returns:
PropertyListfrom theModel.
-
createInputItem
protected abstract AbstractItem<R,O,M,E,?,?> createInputItem()
Creates theSectionInputAbstractItemimplementation.- Returns:
SectionInputAbstractItemimplementation.
-
createOutputItem
protected abstract AbstractItem<R,O,M,E,?,?> createOutputItem()
Creates theSectionOutputAbstractItemimplementation.- Returns:
SectionOutputAbstractItemimplementation.
-
addSection
protected abstract Change<M> addSection(O operations, java.lang.String name, java.lang.String sourceClassName, java.lang.String location, PropertyList properties, SectionType sectionType)
- Parameters:
operations- Operations.name- Name.sourceClassName-SectionSourceClassname.location- Location.properties-PropertyList.sectionType-SectionType.- Returns:
Changeto addSubSection/OfficeSection.
-
refactorSection
protected abstract Change<M> refactorSection(O operations, M model, java.lang.String name, java.lang.String sourceClassName, java.lang.String location, PropertyList properties, SectionType sectionType, java.util.Map<java.lang.String,java.lang.String> inputNameMapping, java.util.Map<java.lang.String,java.lang.String> outputNameMapping)
- Parameters:
operations- Operations.model-Modelto refactor.name- Name.sourceClassName-SectionSourceClassname.location- Location.properties-PropertyList.sectionType-SectionType.inputNameMapping-SectionInputname mapping.outputNameMapping-SectionOutputname mapping.- Returns:
Changeto refactorSubSection/OfficeSection.
-
removeSection
protected abstract Change<M> removeSection(O operations, M model)
- Parameters:
operations- Operations.model-Modelto remove.- Returns:
Changeto removeSubSection/OfficeSection.
-
visual
public javafx.scene.layout.Pane visual(M model, AdaptedChildVisualFactoryContext<M> context)
Description copied from class:AbstractItemCreates the visual for theModel.
-
loadStyles
protected void loadStyles(java.util.List<AbstractItem.IdeStyle> styles)
Description copied from class:AbstractItemDefault implementation ofAbstractItem.style()will invoke this to load styles.- Overrides:
loadStylesin classAbstractItem<R extends Model,O,R extends Model,RE extends java.lang.Enum<RE>,M extends Model,E extends java.lang.Enum<E>>- Parameters:
styles-Listto be loaded with theAbstractItem.IdeStyleinstances.
-
item
public I item(M model)
Description copied from class:AbstractConfigurableItemCreates an item from theModel.
-
children
protected void children(java.util.List<AbstractItem.IdeChildrenGroup> childGroups)
Description copied from class:AbstractItemLoads theAbstractItem.IdeChildrenGroupinstances.
-
configure
public AbstractConfigurableItem.IdeConfigurer configure()
Description copied from class:AbstractConfigurableItemObtains the item configuration.
-
-