Package net.officefloor.gef.woof
Class WoofEditor
- java.lang.Object
-
- net.officefloor.gef.ide.editor.AbstractAdaptedIdeEditor<WoofModel,WoofModel.WoofEvent,WoofChanges>
-
- net.officefloor.gef.woof.WoofEditor
-
public class WoofEditor extends AbstractAdaptedIdeEditor<WoofModel,WoofModel.WoofEvent,WoofChanges>
Web on OfficeFloor (WoOF) 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 WoofEditor(EnvironmentBridge envBridge)
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
loadParents(java.util.List<AbstractConfigurableItem<WoofModel,WoofModel.WoofEvent,WoofChanges,?,?,?>> parents)
Loads theAbstractConfigurableItem
instances.protected WoofModel
loadRootModel(ConfigurationItem configurationItem)
Creates the rootModel
from theConfigurationItem
.WoofModel
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.WoofModel
prototype()
Obtains root prototype.void
saveRootModel(WoofModel 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, init, initNonOsgiEnvironment, loadView, newFileContent, setConfigurationItem, setDragLatency, setModel, setSelectOnly, translateStyle
-
-
-
-
Constructor Detail
-
WoofEditor
public WoofEditor(EnvironmentBridge envBridge)
Instantiate.- Parameters:
envBridge
-EnvironmentBridge
.
-
-
Method Detail
-
fileName
public java.lang.String fileName()
Description copied from class:AbstractAdaptedIdeEditor
Obtains the default file name for the editor.- Specified by:
fileName
in classAbstractAdaptedIdeEditor<WoofModel,WoofModel.WoofEvent,WoofChanges>
- Returns:
- Default file name for the editor.
-
newFileRoot
public WoofModel newFileRoot()
Description copied from class:AbstractAdaptedIdeEditor
Provides rootModel
for new file.- Specified by:
newFileRoot
in classAbstractAdaptedIdeEditor<WoofModel,WoofModel.WoofEvent,WoofChanges>
- Returns:
- Root
Model
for new file.
-
prototype
public WoofModel prototype()
Description copied from class:AbstractAdaptedIdeEditor
Obtains root prototype.- Specified by:
prototype
in classAbstractAdaptedIdeEditor<WoofModel,WoofModel.WoofEvent,WoofChanges>
- Returns:
- Root prototype.
-
paletteStyle
public java.lang.String paletteStyle()
Description copied from class:AbstractAdaptedIdeEditor
Allows overriding the palette styling.- Overrides:
paletteStyle
in classAbstractAdaptedIdeEditor<WoofModel,WoofModel.WoofEvent,WoofChanges>
- 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<WoofModel,WoofModel.WoofEvent,WoofChanges>
- 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<WoofModel,WoofModel.WoofEvent,WoofChanges>
- Returns:
- Editor styling. May be
null
for defaulting styling.
-
loadParents
protected void loadParents(java.util.List<AbstractConfigurableItem<WoofModel,WoofModel.WoofEvent,WoofChanges,?,?,?>> parents)
Description copied from class:AbstractAdaptedIdeEditor
Loads theAbstractConfigurableItem
instances.- Specified by:
loadParents
in classAbstractAdaptedIdeEditor<WoofModel,WoofModel.WoofEvent,WoofChanges>
- Parameters:
parents
-List
to be populated with theAbstractConfigurableItem
instances.
-
loadRootModel
protected WoofModel loadRootModel(ConfigurationItem configurationItem) throws java.lang.Exception
Description copied from class:AbstractAdaptedIdeEditor
Creates the rootModel
from theConfigurationItem
.- Specified by:
loadRootModel
in classAbstractAdaptedIdeEditor<WoofModel,WoofModel.WoofEvent,WoofChanges>
- 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(WoofModel model, WritableConfigurationItem configurationItem) throws java.lang.Exception
Description copied from class:AbstractAdaptedIdeEditor
Writes the rootModel
to theWritableConfigurationItem
.- Specified by:
saveRootModel
in classAbstractAdaptedIdeEditor<WoofModel,WoofModel.WoofEvent,WoofChanges>
- Parameters:
model
- RootModel
to be saved.configurationItem
-WritableConfigurationItem
.- Throws:
java.lang.Exception
- If fails to save the rootModel
into theWritableConfigurationItem
.
-
-