public abstract class AbstractItem<R extends net.officefloor.model.Model,O,P extends net.officefloor.model.Model,PE extends java.lang.Enum<PE>,M extends net.officefloor.model.Model,E extends java.lang.Enum<E>> extends AbstractConfigurerRunnable
ConfigurationItem.| Modifier and Type | Class and Description |
|---|---|
static interface |
AbstractItem.ConfigurableContext<R extends net.officefloor.model.Model,O>
Context for the configurable parent.
|
class |
AbstractItem.IdeChildrenGroup
IDE
ChildrenGroup. |
class |
AbstractItem.IdeConnection<C extends net.officefloor.model.ConnectionModel>
|
class |
AbstractItem.IdeConnectionTarget<C extends net.officefloor.model.ConnectionModel,T extends net.officefloor.model.Model,TE extends java.lang.Enum<TE>>
IDE target
AdaptedConnectionBuilder. |
class |
AbstractItem.IdeExtractor
Extracts the
Model instances. |
class |
AbstractItem.IdeLabeller
Labels the configuration item.
|
class |
AbstractItem.IdeStyle
Convenience
Class to build style. |
static interface |
AbstractItem.PreferenceListener
Listener to change of a preference.
|
| Modifier and Type | Field and Description |
|---|---|
protected AdaptedChildBuilder<R,O,M,E> |
builder
|
| Constructor and Description |
|---|
AbstractItem() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
children(java.util.List<AbstractItem.IdeChildrenGroup> childGroups)
Loads the
AbstractItem.IdeChildrenGroup instances. |
protected void |
connections(java.util.List<AbstractItem.IdeConnectionTarget<? extends net.officefloor.model.ConnectionModel,?,?>> connections)
Loads the
AbstractItem.IdeConnectionTarget instances (created from
AbstractItem.IdeConnection instances). |
AdaptedChildBuilder<R,O,M,E> |
createChild(ChildrenGroupBuilder<R,O> childrenGroup)
Creates the
AdaptedChildBuilder. |
abstract AbstractItem.IdeExtractor |
extract()
|
protected void |
furtherAdapt(AdaptedChildBuilder<R,O,M,E> builder)
Further adapt the
AdaptedChildBuilder. |
AdaptedChildBuilder<R,O,M,E> |
getBuilder()
Obtains the
AdaptedChildBuilder for the AbstractItem. |
AbstractItem.IdeChildrenGroup[] |
getChildrenGroups()
Obtains the
AbstractItem.IdeChildrenGroup instances. |
AbstractItem.ConfigurableContext<R,O> |
getConfigurableContext()
Obtains the
AbstractItem.ConfigurableContext. |
AbstractItem.IdeConnectionTarget<? extends net.officefloor.model.ConnectionModel,?,?>[] |
getConnections()
Obtains the
AbstractItem.IdeConnection instances. |
java.lang.String |
getPreferenceStyleId()
Obtains the
IPreferenceStore identifier for styling this
AbstractItem. |
void |
init(AbstractItem.ConfigurableContext<R,O> context)
Initialise with
AbstractItem.ConfigurableContext. |
abstract AbstractItem.IdeLabeller |
label()
Obtains the
AbstractItem.IdeLabeller for the Model. |
protected void |
loadConfiguration(org.eclipse.swt.widgets.Shell shell) |
protected void |
loadStyles(java.util.List<AbstractItem.IdeStyle> styles)
Default implementation of
style() will invoke this to load styles. |
abstract void |
loadToParent(P parentModel,
M itemModel)
Loads the
Model to the parent Model. |
abstract M |
prototype()
Creates the prototype for the item.
|
java.lang.String |
style()
Obtains the style for the display of the
Model. |
protected <CSVI> java.util.List<CSVI> |
translateFromCommaSeparatedList(java.lang.String text,
java.util.function.Function<java.lang.String,CSVI> getItem)
Convenience method to translate comma separated text into a list.
|
protected <CSVI> java.lang.String |
translateToCommaSeparateList(java.util.List<CSVI> items,
java.util.function.Function<CSVI,java.lang.String> getValue)
Convenience method to translate list of items to a comma separated list.
|
protected <I> java.util.Map<java.lang.String,java.lang.String> |
translateToNameMappings(I[] items,
java.util.function.Function<I,java.lang.String> getName)
Translate the list of items to name mapping.
|
protected <PI> net.officefloor.compile.properties.PropertyList |
translateToPropertyList(java.util.List<PI> properties,
java.util.function.Function<PI,java.lang.String> getName,
java.util.function.Function<PI,java.lang.String> getValue)
Convenience method to translate list of property items to a
PropertyList. |
abstract javafx.scene.Node |
visual(M model,
AdaptedChildVisualFactoryContext<M> context)
Creates the visual for the
Model. |
runpublic final void init(AbstractItem.ConfigurableContext<R,O> context)
AbstractItem.ConfigurableContext.context - AbstractItem.ConfigurableContext.public final AbstractItem.ConfigurableContext<R,O> getConfigurableContext()
AbstractItem.ConfigurableContext.AbstractItem.ConfigurableContext.protected final <PI> net.officefloor.compile.properties.PropertyList translateToPropertyList(java.util.List<PI> properties,
java.util.function.Function<PI,java.lang.String> getName,
java.util.function.Function<PI,java.lang.String> getValue)
PropertyList.PI - Property item type.properties - Property items.getName - Function to extract the name from the property item.getValue - Function to extract the value from the property item.PropertyList.protected final <CSVI> java.lang.String translateToCommaSeparateList(java.util.List<CSVI> items,
java.util.function.Function<CSVI,java.lang.String> getValue)
CSVI - Comma separated item type.items - Items.getValue - Obtains the value for the comma separate list from the item.protected final <CSVI> java.util.List<CSVI> translateFromCommaSeparatedList(java.lang.String text,
java.util.function.Function<java.lang.String,CSVI> getItem)
CSVI - Comma separated item type.text - Comma separated text.getItem - Creates the item from the comma separated value.protected final <I> java.util.Map<java.lang.String,java.lang.String> translateToNameMappings(I[] items,
java.util.function.Function<I,java.lang.String> getName)
I - Item types.items - Items.getName - Function to extract the name from the item.public abstract M prototype()
public abstract AbstractItem.IdeExtractor extract()
AbstractItem.IdeExtractor.public abstract void loadToParent(P parentModel, M itemModel)
Model to the parent Model. This allows for
constructing a prototype model for editing preferences of the
AbstractIdeEditor.parentModel - Parent Model.itemModel - Item Model.public abstract javafx.scene.Node visual(M model, AdaptedChildVisualFactoryContext<M> context)
Model.model - Model.context - AdaptedChildVisualFactoryContext.Node for the visual.public abstract AbstractItem.IdeLabeller label()
AbstractItem.IdeLabeller for the Model.AbstractItem.IdeLabeller.public java.lang.String style()
Model.Model.protected void loadStyles(java.util.List<AbstractItem.IdeStyle> styles)
style() will invoke this to load styles.styles - List to be loaded with the AbstractItem.IdeStyle instances.protected void furtherAdapt(AdaptedChildBuilder<R,O,M,E> builder)
AdaptedChildBuilder.builder - AdaptedChildBuilder.public final AbstractItem.IdeChildrenGroup[] getChildrenGroups()
AbstractItem.IdeChildrenGroup instances.AbstractItem.IdeChildrenGroup instances.protected void children(java.util.List<AbstractItem.IdeChildrenGroup> childGroups)
AbstractItem.IdeChildrenGroup instances.childGroups - AbstractItem.IdeChildrenGroup instances.public final AbstractItem.IdeConnectionTarget<? extends net.officefloor.model.ConnectionModel,?,?>[] getConnections()
AbstractItem.IdeConnection instances.AbstractItem.IdeConnection instances.protected void connections(java.util.List<AbstractItem.IdeConnectionTarget<? extends net.officefloor.model.ConnectionModel,?,?>> connections)
AbstractItem.IdeConnectionTarget instances (created from
AbstractItem.IdeConnection instances).connections - AbstractItem.IdeConnection instances.public final AdaptedChildBuilder<R,O,M,E> createChild(ChildrenGroupBuilder<R,O> childrenGroup)
AdaptedChildBuilder.childrenGroup - ChildrenGroupBuilder.AdaptedChildBuilder.public final AdaptedChildBuilder<R,O,M,E> getBuilder()
AdaptedChildBuilder for the AbstractItem.AdaptedChildBuilder for the AbstractItem.public final java.lang.String getPreferenceStyleId()
IPreferenceStore identifier for styling this
AbstractItem.IPreferenceStore identifier for styling this
AbstractItem.protected void loadConfiguration(org.eclipse.swt.widgets.Shell shell)
loadConfiguration in class AbstractConfigurerRunnableCopyright © 2005–2018. All rights reserved.