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.Integer
choice
Choice.protected java.util.Map<java.lang.String,java.lang.String>
inputNameMapping
SectionInputType
name mapping.protected java.lang.String
location
Location.protected java.lang.String
name
Name.protected java.util.Map<java.lang.String,java.lang.String>
outputNameMapping
SectionOutputType
name mapping.protected PropertyList
properties
protected SectionType
sectionType
protected java.lang.String
sourceClassName
SectionSource
Class
name.-
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 void
children(java.util.List<AbstractItem.IdeChildrenGroup> childGroups)
Loads theAbstractItem.IdeChildrenGroup
instances.AbstractConfigurableItem.IdeConfigurer
configure()
Obtains the item configuration.protected abstract AbstractItem<R,O,M,E,?,?>
createInputItem()
Creates theSectionInput
AbstractItem
implementation.protected abstract I
createItem()
Creates theAbstractSectionItem
implementation.protected abstract AbstractItem<R,O,M,E,?,?>
createOutputItem()
Creates theSectionOutput
AbstractItem
implementation.protected abstract java.lang.String
getSectionLocation(M model)
Obtains the location from theModel
.protected abstract java.lang.String
getSectionName(M model)
Obtains the name from theModel
.protected abstract PropertyList
getSectionProperties(M model)
Obtains thePropertyList
from theModel
.protected abstract java.lang.String
getSectionSourceClassName(M model)
I
item(M model)
Creates an item from theModel
.static SectionType
loadSectionType(AbstractSectionItem<?,?,?,?,?,?> item, EnvironmentBridge envBridge)
Loads theSectionType
for theAbstractSectionItem
.protected void
loadStyles(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.Pane
visual(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
SectionSource
Class
name.
-
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
SectionInputType
name mapping.
-
outputNameMapping
protected java.util.Map<java.lang.String,java.lang.String> outputNameMapping
SectionOutputType
name mapping.
-
-
Method Detail
-
loadSectionType
public static SectionType loadSectionType(AbstractSectionItem<?,?,?,?,?,?> item, EnvironmentBridge envBridge) throws java.lang.Exception
Loads theSectionType
for theAbstractSectionItem
.- Parameters:
item
-AbstractSectionItem
.envBridge
-EnvironmentBridge
.- Returns:
SectionType
.- Throws:
java.lang.Exception
- If fails to load theSectionType
.
-
createItem
protected abstract I createItem()
Creates theAbstractSectionItem
implementation.- Returns:
AbstractSectionItem
implementation.
-
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:
SectionSource
Class
name.
-
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 thePropertyList
from theModel
.- Parameters:
model
-Model
.- Returns:
PropertyList
from theModel
.
-
createInputItem
protected abstract AbstractItem<R,O,M,E,?,?> createInputItem()
Creates theSectionInput
AbstractItem
implementation.- Returns:
SectionInput
AbstractItem
implementation.
-
createOutputItem
protected abstract AbstractItem<R,O,M,E,?,?> createOutputItem()
Creates theSectionOutput
AbstractItem
implementation.- Returns:
SectionOutput
AbstractItem
implementation.
-
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
-SectionSource
Class
name.location
- Location.properties
-PropertyList
.sectionType
-SectionType
.- Returns:
Change
to 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
-Model
to refactor.name
- Name.sourceClassName
-SectionSource
Class
name.location
- Location.properties
-PropertyList
.sectionType
-SectionType
.inputNameMapping
-SectionInput
name mapping.outputNameMapping
-SectionOutput
name mapping.- Returns:
Change
to refactorSubSection
/OfficeSection
.
-
removeSection
protected abstract Change<M> removeSection(O operations, M model)
- Parameters:
operations
- Operations.model
-Model
to remove.- Returns:
Change
to removeSubSection
/OfficeSection
.
-
visual
public javafx.scene.layout.Pane visual(M model, AdaptedChildVisualFactoryContext<M> context)
Description copied from class:AbstractItem
Creates the visual for theModel
.
-
loadStyles
protected void loadStyles(java.util.List<AbstractItem.IdeStyle> styles)
Description copied from class:AbstractItem
Default implementation ofAbstractItem.style()
will invoke this to load styles.- Overrides:
loadStyles
in 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
-List
to be loaded with theAbstractItem.IdeStyle
instances.
-
item
public I item(M model)
Description copied from class:AbstractConfigurableItem
Creates an item from theModel
.
-
children
protected void children(java.util.List<AbstractItem.IdeChildrenGroup> childGroups)
Description copied from class:AbstractItem
Loads theAbstractItem.IdeChildrenGroup
instances.
-
configure
public AbstractConfigurableItem.IdeConfigurer configure()
Description copied from class:AbstractConfigurableItem
Obtains the item configuration.
-
-