net.officefloor.eclipse.desk
Class DeskEditor

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.ui.part.WorkbenchPart
          extended by org.eclipse.ui.part.EditorPart
              extended by org.eclipse.gef.ui.parts.GraphicalEditor
                  extended by org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette
                      extended by net.officefloor.eclipse.common.editor.AbstractOfficeFloorEditor<DeskModel,DeskChanges>
                          extended by net.officefloor.eclipse.desk.DeskEditor
All Implemented Interfaces:
EventListener, org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.gef.commands.CommandStackListener, org.eclipse.gef.EditPartFactory, org.eclipse.ui.IEditorPart, org.eclipse.ui.ISaveablePart, org.eclipse.ui.ISelectionListener, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.IWorkbenchPart3, org.eclipse.ui.part.IWorkbenchPartOrientation

public class DeskEditor
extends AbstractOfficeFloorEditor<DeskModel,DeskChanges>

Editor for the DeskModel.

Author:
Daniel Sagenschneider

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette
org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette.CustomPalettePage
 
Field Summary
static String EDITOR_ID
          ID for this IEditorPart.
 
Fields inherited from class net.officefloor.eclipse.common.editor.AbstractOfficeFloorEditor
paletteRoot
 
Fields inherited from interface org.eclipse.ui.IEditorPart
PROP_DIRTY, PROP_INPUT
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
DeskEditor()
           
 
Method Summary
protected  DeskChanges createModelChanges(DeskModel model)
          Creates the Model change functionality.
 FlowInstigationStrategyEnum getFlowInstigationStrategy(Object instigationStrategy)
          Obtains the FlowInstigationStrategyEnum.
static FlowInstigationStrategyEnum getFlowInstigationStrategy(String instigationStrategy)
          Obtains the FlowInstigationStrategyEnum.
protected  void initialisePaletteRoot()
          Override to initialise the PaletteRoot.
protected  void populateEditPartTypes(Map<Class<?>,Class<? extends org.eclipse.gef.EditPart>> map)
          Populates the EditPart types for their respective model.
protected  void populateGraphicalEditPolicy(OfficeFloorGraphicalNodeEditPolicy policy)
          Populates the OfficeFloorGraphicalNodeEditPolicy.
protected  void populateLayoutEditPolicy(OfficeFloorLayoutEditPolicy policy)
          Populates the OfficeFloorLayoutEditPolicy.
protected  void populateOperations(List<Operation> list)
          Populates the listing of Operation instances.
protected  DeskModel retrieveModel(ConfigurationItem configuration)
          Retrieves the Model.
protected  void storeModel(DeskModel model, ConfigurationItem configuration)
          Stores the Model.
 
Methods inherited from class net.officefloor.eclipse.common.editor.AbstractOfficeFloorEditor
createEditPart, createGraphicalEditPolicy, createLayoutEditPolicy, doSave, doSaveAs, getCastedModel, getModelChanges, getPalettePreferences, getPaletteRoot, getRootEditPart, initialiseContextMenu, initializeGraphicalViewer, isSaveAsAllowed, loadEditPartTypes, messageError, messageError, messageError, messageError, messageStatus, messageWarning, setCastedModel, setInput
 
Methods inherited from class org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette
createPalettePage, createPaletteViewerProvider, createPartControl, getAdapter, getGraphicalControl, getPaletteViewerProvider, setEditDomain
 
Methods inherited from class org.eclipse.gef.ui.parts.GraphicalEditor
commandStackChanged, configureGraphicalViewer, createActions, createGraphicalViewer, dispose, firePropertyChange, getActionRegistry, getCommandStack, getEditDomain, getGraphicalViewer, getPropertyActions, getSelectionActions, getSelectionSynchronizer, getStackActions, hookGraphicalViewer, init, initializeActionRegistry, isDirty, selectionChanged, setActionRegistry, setFocus, setGraphicalViewer, updateActions
 
Methods inherited from class org.eclipse.ui.part.EditorPart
checkSite, getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInputWithNotify, setPartName
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
 
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, getSite, getTitle, getTitleImage, removePropertyListener
 

Field Detail

EDITOR_ID

public static final String EDITOR_ID
ID for this IEditorPart.

See Also:
Constant Field Values
Constructor Detail

DeskEditor

public DeskEditor()
Method Detail

createModelChanges

protected DeskChanges createModelChanges(DeskModel model)
Description copied from class: AbstractOfficeFloorEditor
Creates the Model change functionality.

Specified by:
createModelChanges in class AbstractOfficeFloorEditor<DeskModel,DeskChanges>
Parameters:
model - Root Model.
Returns:
Model change functionality.

retrieveModel

protected DeskModel retrieveModel(ConfigurationItem configuration)
                           throws Exception
Description copied from class: AbstractOfficeFloorEditor
Retrieves the Model.

Specified by:
retrieveModel in class AbstractOfficeFloorEditor<DeskModel,DeskChanges>
Parameters:
configuration - Configuration of the Model.
Returns:
Model to be edited.
Throws:
Exception - If fails to obtain the Model.

storeModel

protected void storeModel(DeskModel model,
                          ConfigurationItem configuration)
                   throws Exception
Description copied from class: AbstractOfficeFloorEditor
Stores the Model.

Specified by:
storeModel in class AbstractOfficeFloorEditor<DeskModel,DeskChanges>
Parameters:
model - Model to be stored.
configuration - Configuration of the Model.
Throws:
Exception - If fails to store the Model.

populateEditPartTypes

protected void populateEditPartTypes(Map<Class<?>,Class<? extends org.eclipse.gef.EditPart>> map)
Description copied from class: AbstractOfficeFloorEditor
Populates the EditPart types for their respective model.

Specified by:
populateEditPartTypes in class AbstractOfficeFloorEditor<DeskModel,DeskChanges>

populateLayoutEditPolicy

protected void populateLayoutEditPolicy(OfficeFloorLayoutEditPolicy policy)
Description copied from class: AbstractOfficeFloorEditor
Populates the OfficeFloorLayoutEditPolicy.

Specified by:
populateLayoutEditPolicy in class AbstractOfficeFloorEditor<DeskModel,DeskChanges>
Parameters:
policy - OfficeFloorLayoutEditPolicy.

populateGraphicalEditPolicy

protected void populateGraphicalEditPolicy(OfficeFloorGraphicalNodeEditPolicy policy)
Description copied from class: AbstractOfficeFloorEditor
Populates the OfficeFloorGraphicalNodeEditPolicy.

Specified by:
populateGraphicalEditPolicy in class AbstractOfficeFloorEditor<DeskModel,DeskChanges>
Parameters:
policy - OfficeFloorGraphicalNodeEditPolicy.

populateOperations

protected void populateOperations(List<Operation> list)
Description copied from class: AbstractOfficeFloorEditor
Populates the listing of Operation instances.

Specified by:
populateOperations in class AbstractOfficeFloorEditor<DeskModel,DeskChanges>
Parameters:
list - Listing to add Operation instances.

initialisePaletteRoot

protected void initialisePaletteRoot()
Description copied from class: AbstractOfficeFloorEditor
Override to initialise the PaletteRoot.

Overrides:
initialisePaletteRoot in class AbstractOfficeFloorEditor<DeskModel,DeskChanges>
See Also:
AbstractOfficeFloorEditor.getPaletteRoot()

getFlowInstigationStrategy

public FlowInstigationStrategyEnum getFlowInstigationStrategy(Object instigationStrategy)
Obtains the FlowInstigationStrategyEnum.

Parameters:
instigationType - Instigation type.
Returns:
FlowInstigationStrategyEnum or null if unknown instigation strategy.

getFlowInstigationStrategy

public static FlowInstigationStrategyEnum getFlowInstigationStrategy(String instigationStrategy)
Obtains the FlowInstigationStrategyEnum.

Parameters:
instigationStrategy - Text name of the FlowInstigationStrategyEnum.
Returns:
FlowInstigationStrategyEnum or null if unknown.


Copyright © 2005-2013. All Rights Reserved.