org.eclipse.gef.ui.parts
Class GraphicalEditor
java.lang.Object
|
+--org.eclipse.ui.part.WorkbenchPart
|
+--org.eclipse.ui.part.EditorPart
|
+--org.eclipse.gef.ui.parts.GraphicalEditor
- All Implemented Interfaces:
- IAdaptable, IEditorPart, IExecutableExtension, IWorkbenchPart
- Direct Known Subclasses:
- GraphicalEditorWithPalette
- public abstract class GraphicalEditor
- extends EditorPart
| Methods inherited from class org.eclipse.ui.part.EditorPart |
doSave, doSaveAs, getEditorInput, getEditorSite, getTitleToolTip, gotoMarker, init, isDirty, isSaveAsAllowed, isSaveOnCloseNeeded, setInput |
| Methods inherited from class org.eclipse.ui.part.WorkbenchPart |
addPropertyListener, firePropertyChange, getConfigurationElement, getDefaultImage, getSite, getTitle, getTitleImage, removePropertyListener, setInitializationData, setTitle, setTitleImage, setTitleToolTip |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GraphicalEditor
public GraphicalEditor()
configureGraphicalViewer
protected void configureGraphicalViewer()
createGraphicalViewer
protected void createGraphicalViewer(Composite parent)
- Creates the GraphicalViewer on the specified
Composite.
createPartControl
public void createPartControl(Composite parent)
- Realizes the Editor by creating it's Control.
WARNING: This method may or may not be called by Eclipse prior to dispose().
- Overrides:
createPartControl in class WorkbenchPart
dispose
public void dispose()
- Overrides:
dispose in class WorkbenchPart
getActionRegistry
protected ActionRegistry getActionRegistry()
getAdapter
public Object getAdapter(Class type)
- Returns the adapter for the specified key.
getAdapter may be called before createPartControl(Composite).
The order is unspecified in JFace.
- Overrides:
getAdapter in class WorkbenchPart
getCommandStack
protected CommandStack getCommandStack()
getEditDomain
protected DefaultEditDomain getEditDomain()
getGraphicalViewer
protected GraphicalViewer getGraphicalViewer()
getSelectionSynchronizer
protected SelectionSynchronizer getSelectionSynchronizer()
hookGraphicalViewer
protected void hookGraphicalViewer()
- Hooks the GraphicalViewer to the rest of the Editor. By default, the viewer
is added to the SelectionSynchronizer, which can be used to keep 2 or more
EditPartViewers in sync. The viewer is also registered as the ISelectionProvider
for the Editor's PartSite.
initializeActionRegistry
protected void initializeActionRegistry()
- initializes the ActionRegistry. Subclasses may extend this method to register additional
Actions. This registry may be used by
ActionBarContributors
and/or ContextMenuProviders.
This method may be called on Editor creation, or lazily
the first time getActionRegistry() is called.
initializeGraphicalViewer
protected abstract void initializeGraphicalViewer()
- Override to set the contents of the GraphicalViewer after it has been created.
- See Also:
createGraphicalViewer(Composite)
setActionRegistry
protected void setActionRegistry(ActionRegistry registry)
- Sets the ActionRegistry for this EditorPart.
setEditDomain
protected void setEditDomain(DefaultEditDomain ed)
- Sets the EditDomain for this EditorPart.
setFocus
public void setFocus()
- Overrides:
setFocus in class WorkbenchPart
setGraphicalViewer
protected void setGraphicalViewer(GraphicalViewer viewer)
- Sets the graphicalViewer for this EditorPart.
setSite
protected void setSite(IWorkbenchPartSite site)
- Overrides:
setSite in class WorkbenchPart