|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.EditorPart
org.eclipse.gef.ui.parts.GraphicalEditor
org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette
net.officefloor.eclipse.common.editor.AbstractOfficeFloorEditor<M,C>
public abstract class AbstractOfficeFloorEditor<M extends Model,C>
Provides an abstract GraphicalEditor for the Office Floor items to
edit.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette |
|---|
org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette.CustomPalettePage |
| Field Summary | |
|---|---|
protected org.eclipse.gef.palette.PaletteRoot |
paletteRoot
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 | |
|---|---|
AbstractOfficeFloorEditor()
Initiate the edit domain and the command stack. |
|
| Method Summary | |
|---|---|
org.eclipse.gef.EditPart |
createEditPart(org.eclipse.gef.EditPart context,
Object model)
Use the model type to EditPart map to create the appropriate
EditPart via its default constructor. |
org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy |
createGraphicalEditPolicy()
Creates the GraphicalEditPolicy to be installed. |
org.eclipse.gef.editpolicies.LayoutEditPolicy |
createLayoutEditPolicy()
Creates the LayoutEditPolicy to be installed. |
protected abstract C |
createModelChanges(M model)
Creates the Model change functionality. |
void |
doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
|
void |
doSaveAs()
|
M |
getCastedModel()
Obtains the Model. |
C |
getModelChanges()
Obtains the Model change functionality. |
protected org.eclipse.gef.ui.palette.FlyoutPaletteComposite.FlyoutPreferences |
getPalettePreferences()
|
protected org.eclipse.gef.palette.PaletteRoot |
getPaletteRoot()
|
org.eclipse.gef.RootEditPart |
getRootEditPart()
Obtains the RootEditPart. |
protected void |
initialiseContextMenu()
Initialises the context menu. |
protected void |
initialisePaletteRoot()
Override to initialise the PaletteRoot. |
protected void |
initializeGraphicalViewer()
|
boolean |
isSaveAsAllowed()
|
protected void |
loadEditPartTypes()
Allows sub classes to trigger the population of the EditPart
types. |
void |
messageError(org.eclipse.core.runtime.IStatus status)
Displays the IStatus error. |
void |
messageError(String message)
Displays the message as an error MessageDialog. |
void |
messageError(String message,
Throwable cause)
Displays the message and its cause as an error MessageDialog. |
void |
messageError(Throwable error)
Displays the Throwable error details as an error
MessageDialog. |
void |
messageStatus(org.eclipse.core.runtime.IStatus status,
String title)
Displays a Dialog for the IStatus. |
void |
messageWarning(String message)
Displays the message as a warning MessageDialog. |
protected abstract void |
populateEditPartTypes(Map<Class<?>,Class<? extends org.eclipse.gef.EditPart>> map)
Populates the EditPart types for their respective model. |
protected abstract void |
populateGraphicalEditPolicy(OfficeFloorGraphicalNodeEditPolicy policy)
Populates the OfficeFloorGraphicalNodeEditPolicy. |
protected abstract void |
populateLayoutEditPolicy(OfficeFloorLayoutEditPolicy policy)
Populates the OfficeFloorLayoutEditPolicy. |
protected abstract void |
populateOperations(List<Operation> list)
Populates the listing of Operation instances. |
protected abstract M |
retrieveModel(ConfigurationItem configuration)
Retrieves the Model. |
protected void |
setCastedModel(M model)
Specifies the Model. |
protected void |
setInput(org.eclipse.ui.IEditorInput input)
|
protected abstract void |
storeModel(M model,
ConfigurationItem configuration)
Stores the Model. |
| 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 |
|---|
protected org.eclipse.gef.palette.PaletteRoot paletteRoot
PaletteRoot.
| Constructor Detail |
|---|
public AbstractOfficeFloorEditor()
| Method Detail |
|---|
protected void setCastedModel(M model)
model - Model.public M getCastedModel()
Model.
Model.public org.eclipse.gef.RootEditPart getRootEditPart()
RootEditPart.
RootEditPart.public C getModelChanges()
Model change functionality.
Model change functionality.public void messageError(Throwable error)
Throwable error details as an error
MessageDialog.
error - Error.public void messageError(String message)
MessageDialog.
message - Error message.
public void messageError(String message,
Throwable cause)
MessageDialog.
message - Error message.cause - Cause of error.public void messageWarning(String message)
MessageDialog.
message - Warning messagepublic void messageError(org.eclipse.core.runtime.IStatus status)
IStatus error.
status - IStatus error.
public void messageStatus(org.eclipse.core.runtime.IStatus status,
String title)
Dialog for the IStatus.
status - IStatus.title - Title for Dialog.public org.eclipse.gef.editpolicies.LayoutEditPolicy createLayoutEditPolicy()
LayoutEditPolicy to be installed.
LayoutEditPolicy to be installed.protected abstract void populateLayoutEditPolicy(OfficeFloorLayoutEditPolicy policy)
OfficeFloorLayoutEditPolicy.
policy - OfficeFloorLayoutEditPolicy.public org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy createGraphicalEditPolicy()
GraphicalEditPolicy to be installed.
GraphicalEditPolicy to be installed.protected abstract void populateGraphicalEditPolicy(OfficeFloorGraphicalNodeEditPolicy policy)
OfficeFloorGraphicalNodeEditPolicy.
policy - OfficeFloorGraphicalNodeEditPolicy.protected void initializeGraphicalViewer()
initializeGraphicalViewer in class org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPaletteprotected void initialiseContextMenu()
protected abstract void populateOperations(List<Operation> list)
Operation instances.
list - Listing to add Operation instances.
public org.eclipse.gef.EditPart createEditPart(org.eclipse.gef.EditPart context,
Object model)
EditPart map to create the appropriate
EditPart via its default constructor.
createEditPart in interface org.eclipse.gef.EditPartFactoryprotected void loadEditPartTypes()
EditPart
types.
protected abstract void populateEditPartTypes(Map<Class<?>,Class<? extends org.eclipse.gef.EditPart>> map)
EditPart types for their respective model.
mapping - Registry to load the mappings.protected void setInput(org.eclipse.ui.IEditorInput input)
setInput in class org.eclipse.ui.part.EditorPartprotected abstract C createModelChanges(M model)
Model change functionality.
model - Root Model.
Model change functionality.
protected abstract M retrieveModel(ConfigurationItem configuration)
throws Exception
configuration - Configuration of the Model.
Exception - If fails to obtain the Model.public void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
doSave in interface org.eclipse.ui.ISaveablePartdoSave in class org.eclipse.ui.part.EditorPart
protected abstract void storeModel(M model,
ConfigurationItem configuration)
throws Exception
model - Model to be stored.configuration - Configuration of the Model.
Exception - If fails to store the Model.public void doSaveAs()
doSaveAs in interface org.eclipse.ui.ISaveablePartdoSaveAs in class org.eclipse.gef.ui.parts.GraphicalEditorpublic boolean isSaveAsAllowed()
isSaveAsAllowed in interface org.eclipse.ui.ISaveablePartisSaveAsAllowed in class org.eclipse.gef.ui.parts.GraphicalEditorprotected org.eclipse.gef.ui.palette.FlyoutPaletteComposite.FlyoutPreferences getPalettePreferences()
getPalettePreferences in class org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPaletteprotected org.eclipse.gef.palette.PaletteRoot getPaletteRoot()
getPaletteRoot in class org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPaletteprotected void initialisePaletteRoot()
PaletteRoot.
getPaletteRoot()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||