|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.ui.part.WorkbenchPart | +--org.eclipse.ui.part.EditorPart | +--org.eclipse.gef.ui.parts.GraphicalEditor | +--org.eclipse.gef.ui.parts.GraphicalEditorWithPalette
This class serves as a quick starting point for clients who are new to GEF. It will create an Editor containing a Split composite, with one side contianing a PaletteViewer, and the other a GraphicalViewer.
IMPORTANTThis class should only be used as a reference for creating your own EditorPart implementation. This class will not suit everyone's needs, and may change in the future. Clients may copy the implementation.
Field Summary |
Fields inherited from interface org.eclipse.ui.IEditorPart |
PROP_DIRTY, PROP_INPUT |
Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
PROP_TITLE |
Constructor Summary | |
GraphicalEditorWithPalette()
|
Method Summary | |
protected void |
configurePaletteViewer()
Called to configure the viewer before it receives its contents. |
protected void |
createPaletteViewer(Composite parent)
Creates the palette on the given composite. |
void |
createPartControl(Composite parent)
Realizes the Editor by creating it's Control. |
protected int |
getInitialPaletteSize()
Returns the initial palette size in pixels. |
protected abstract PaletteRoot |
getPaletteRoot()
Returns the PaletteRoot for the palette viewer. |
protected PaletteViewer |
getPaletteViewer()
Returns the PaletteViewer. |
protected void |
handlePaletteResized(int newSize)
Called whenever the user resizes the palette. |
protected void |
hookPaletteViewer()
Called when the palette viewer is set. |
protected void |
initializePaletteViewer()
Called to populate the palette viewer. |
protected void |
setPaletteViewer(PaletteViewer paletteViewer)
Sets the palette viewer |
Methods inherited from class org.eclipse.ui.part.EditorPart |
doSave, doSaveAs, getEditorInput, getEditorSite, getTitleToolTip, gotoMarker, isDirty, isSaveAsAllowed, isSaveOnCloseNeeded, setInput |
Methods inherited from class org.eclipse.ui.part.WorkbenchPart |
addPropertyListener, getConfigurationElement, getDefaultImage, getSite, getTitle, getTitleImage, removePropertyListener, setInitializationData, setSite, 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 |
public GraphicalEditorWithPalette()
Method Detail |
protected void configurePaletteViewer()
protected void createPaletteViewer(Composite parent)
parent
- the compositepublic void createPartControl(Composite parent)
GraphicalEditor
WARNING: This method may or may not be called by the workbench prior to GraphicalEditor.dispose()
.
createPartControl
in interface IWorkbenchPart
createPartControl
in class GraphicalEditor
parent
- the parent compositeIWorkbenchPart.createPartControl(org.eclipse.swt.widgets.Composite)
protected abstract PaletteRoot getPaletteRoot()
protected int getInitialPaletteSize()
handlePaletteResized(int)
protected PaletteViewer getPaletteViewer()
protected void handlePaletteResized(int newSize)
newSize
- the new size in pixelsprotected void hookPaletteViewer()
protected void initializePaletteViewer()
protected void setPaletteViewer(PaletteViewer paletteViewer)
paletteViewer
- the palette viewer
|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |