GEF v2.0

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


Fields inherited from interface org.eclipse.ui.IEditorPart
PROP_DIRTY, PROP_INPUT
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
GraphicalEditor()
           
 
Method Summary
protected  void configureGraphicalViewer()
           
protected  void createGraphicalViewer(Composite parent)
          Creates the GraphicalViewer on the specified Composite.
 void createPartControl(Composite parent)
          Realizes the Editor by creating it's Control.
 void dispose()
           
protected  ActionRegistry getActionRegistry()
           
 Object getAdapter(Class type)
          Returns the adapter for the specified key.
protected  CommandStack getCommandStack()
           
protected  DefaultEditDomain getEditDomain()
           
protected  GraphicalViewer getGraphicalViewer()
           
protected  SelectionSynchronizer getSelectionSynchronizer()
           
protected  void hookGraphicalViewer()
          Hooks the GraphicalViewer to the rest of the Editor.
protected  void initializeActionRegistry()
          initializes the ActionRegistry.
protected abstract  void initializeGraphicalViewer()
          Override to set the contents of the GraphicalViewer after it has been created.
protected  void setActionRegistry(ActionRegistry registry)
          Sets the ActionRegistry for this EditorPart.
protected  void setEditDomain(DefaultEditDomain ed)
          Sets the EditDomain for this EditorPart.
 void setFocus()
           
protected  void setGraphicalViewer(GraphicalViewer viewer)
          Sets the graphicalViewer for this EditorPart.
protected  void setSite(IWorkbenchPartSite site)
           
 
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
 
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, getSite, getTitle, getTitleImage, removePropertyListener
 

Constructor Detail

GraphicalEditor

public GraphicalEditor()
Method Detail

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

GEF v2.0