Package net.officefloor.gef.section
Class SectionEditor
- java.lang.Object
-
- net.officefloor.gef.ide.editor.AbstractAdaptedIdeEditor<SectionModel,SectionModel.SectionEvent,SectionChanges>
-
- net.officefloor.gef.section.SectionEditor
-
public class SectionEditor extends AbstractAdaptedIdeEditor<SectionModel,SectionModel.SectionEvent,SectionChanges>
SectionModel
editor.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.officefloor.gef.ide.editor.AbstractAdaptedIdeEditor
AbstractAdaptedIdeEditor.ViewManager<R extends Model>
-
-
Constructor Summary
Constructors Constructor Description SectionEditor(EnvironmentBridge envBridge)
Default instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
editorStyle()
Allows overriding the editor styling.java.lang.String
fileName()
Obtains the default file name for the editor.protected void
init(AbstractItem.ConfigurableContext<SectionModel,SectionChanges> context)
Allows overriding to initialise theAbstractAdaptedIdeEditor
.protected void
loadParents(java.util.List<AbstractConfigurableItem<SectionModel,SectionModel.SectionEvent,SectionChanges,?,?,?>> parents)
Loads theAbstractConfigurableItem
instances.protected SectionModel
loadRootModel(ConfigurationItem configurationItem)
Creates the rootModel
from theConfigurationItem
.SectionModel
newFileRoot()
Provides rootModel
for new file.java.lang.String
paletteIndicatorStyle()
Allows overriding the palette indicator styling.java.lang.String
paletteStyle()
Allows overriding the palette styling.SectionModel
prototype()
Obtains root prototype.void
saveRootModel(SectionModel model, WritableConfigurationItem configurationItem)
Writes the rootModel
to theWritableConfigurationItem
.-
Methods inherited from class net.officefloor.gef.ide.editor.AbstractAdaptedIdeEditor
createOperations, getConfigurableContext, getEditorStyleId, getPaletteIndicatorStyleId, getPaletteStyleId, getParents, init, initNonOsgiEnvironment, loadView, newFileContent, setConfigurationItem, setDragLatency, setModel, setSelectOnly, translateStyle
-
-
-
-
Constructor Detail
-
SectionEditor
public SectionEditor(EnvironmentBridge envBridge)
Default instantiate.- Parameters:
envBridge
-EnvironmentBridge
.
-
-
Method Detail
-
init
protected void init(AbstractItem.ConfigurableContext<SectionModel,SectionChanges> context)
Description copied from class:AbstractAdaptedIdeEditor
Allows overriding to initialise theAbstractAdaptedIdeEditor
.- Overrides:
init
in classAbstractAdaptedIdeEditor<SectionModel,SectionModel.SectionEvent,SectionChanges>
- Parameters:
context
-AbstractItem.ConfigurableContext
.
-
paletteStyle
public java.lang.String paletteStyle()
Description copied from class:AbstractAdaptedIdeEditor
Allows overriding the palette styling.- Overrides:
paletteStyle
in classAbstractAdaptedIdeEditor<SectionModel,SectionModel.SectionEvent,SectionChanges>
- Returns:
- Palette styling. May be
null
for default styling.
-
paletteIndicatorStyle
public java.lang.String paletteIndicatorStyle()
Description copied from class:AbstractAdaptedIdeEditor
Allows overriding the palette indicator styling.- Overrides:
paletteIndicatorStyle
in classAbstractAdaptedIdeEditor<SectionModel,SectionModel.SectionEvent,SectionChanges>
- Returns:
- Palette indicator styling. May be
null
for default styling.
-
editorStyle
public java.lang.String editorStyle()
Description copied from class:AbstractAdaptedIdeEditor
Allows overriding the editor styling.- Overrides:
editorStyle
in classAbstractAdaptedIdeEditor<SectionModel,SectionModel.SectionEvent,SectionChanges>
- Returns:
- Editor styling. May be
null
for defaulting styling.
-
fileName
public java.lang.String fileName()
Description copied from class:AbstractAdaptedIdeEditor
Obtains the default file name for the editor.- Specified by:
fileName
in classAbstractAdaptedIdeEditor<SectionModel,SectionModel.SectionEvent,SectionChanges>
- Returns:
- Default file name for the editor.
-
newFileRoot
public SectionModel newFileRoot()
Description copied from class:AbstractAdaptedIdeEditor
Provides rootModel
for new file.- Specified by:
newFileRoot
in classAbstractAdaptedIdeEditor<SectionModel,SectionModel.SectionEvent,SectionChanges>
- Returns:
- Root
Model
for new file.
-
prototype
public SectionModel prototype()
Description copied from class:AbstractAdaptedIdeEditor
Obtains root prototype.- Specified by:
prototype
in classAbstractAdaptedIdeEditor<SectionModel,SectionModel.SectionEvent,SectionChanges>
- Returns:
- Root prototype.
-
loadParents
protected void loadParents(java.util.List<AbstractConfigurableItem<SectionModel,SectionModel.SectionEvent,SectionChanges,?,?,?>> parents)
Description copied from class:AbstractAdaptedIdeEditor
Loads theAbstractConfigurableItem
instances.- Specified by:
loadParents
in classAbstractAdaptedIdeEditor<SectionModel,SectionModel.SectionEvent,SectionChanges>
- Parameters:
parents
-List
to be populated with theAbstractConfigurableItem
instances.
-
loadRootModel
protected SectionModel loadRootModel(ConfigurationItem configurationItem) throws java.lang.Exception
Description copied from class:AbstractAdaptedIdeEditor
Creates the rootModel
from theConfigurationItem
.- Specified by:
loadRootModel
in classAbstractAdaptedIdeEditor<SectionModel,SectionModel.SectionEvent,SectionChanges>
- Parameters:
configurationItem
-ConfigurationItem
containing the configuration of theModel
.- Returns:
- Root
Model
within theConfigurationItem
. - Throws:
java.lang.Exception
- If fails to load the rootModel
from theConfigurationItem
.
-
saveRootModel
public void saveRootModel(SectionModel model, WritableConfigurationItem configurationItem) throws java.lang.Exception
Description copied from class:AbstractAdaptedIdeEditor
Writes the rootModel
to theWritableConfigurationItem
.- Specified by:
saveRootModel
in classAbstractAdaptedIdeEditor<SectionModel,SectionModel.SectionEvent,SectionChanges>
- Parameters:
model
- RootModel
to be saved.configurationItem
-WritableConfigurationItem
.- Throws:
java.lang.Exception
- If fails to save the rootModel
into theWritableConfigurationItem
.
-
-