Package org.eclipse.gef.ui.parts
Class GraphicalEditorWithPalette
java.lang.Object
org.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.GraphicalEditorWithPalette
- All Implemented Interfaces:
- EventListener,- IAdaptable,- IExecutableExtension,- CommandStackEventListener,- CommandStackListener,- IEditorPart,- ISaveablePart,- ISelectionListener,- IWorkbenchPart,- IWorkbenchPart2,- IWorkbenchPart3,- IWorkbenchPartOrientation
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.
- 
Field SummaryFields inherited from interface org.eclipse.ui.IEditorPartPROP_DIRTY, PROP_INPUTFields inherited from interface org.eclipse.ui.IWorkbenchPartPROP_TITLE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidCalled to configure the viewer before it receives its contents.protected voidcreatePaletteViewer(Composite parent) Creates the palette on the given composite.voidcreatePartControl(Composite parent) Realizes the Editor by creating it's Control.protected intReturns the initial palette size in pixels.protected abstract PaletteRootReturns the PaletteRoot for the palette viewer.protected PaletteViewerReturns the PaletteViewer.protected voidhandlePaletteResized(int newSize) Called whenever the user resizes the palette.protected voidCalled when the palette viewer is set.protected voidCalled to populate the palette viewer.protected voidSets thepalette rootof the edit domainprotected voidsetPaletteViewer(PaletteViewer paletteViewer) Sets the palette viewerMethods inherited from class org.eclipse.gef.ui.parts.GraphicalEditorcommandStackChanged, configureGraphicalViewer, createActions, createGraphicalViewer, dispose, doSaveAs, firePropertyChange, getActionRegistry, getAdapter, getCommandStack, getEditDomain, getGraphicalViewer, getPropertyActions, getSelectionActions, getSelectionSynchronizer, getStackActions, hookGraphicalViewer, init, initializeActionRegistry, initializeGraphicalViewer, isDirty, isSaveAsAllowed, selectionChanged, setActionRegistry, setFocus, setGraphicalViewer, stackChanged, updateActionsMethods inherited from class org.eclipse.ui.part.EditorPartcheckSite, doSave, getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInput, setInputWithNotify, setPartNameMethods inherited from class org.eclipse.ui.part.WorkbenchPartaddPartPropertyListener, addPropertyListener, firePartPropertyChanged, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusyMethods inherited from class org.eclipse.core.commands.common.EventManageraddListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.ui.IWorkbenchPartaddPropertyListener, getSite, getTitle, getTitleImage, removePropertyListener
- 
Constructor Details- 
GraphicalEditorWithPalettepublic GraphicalEditorWithPalette()
 
- 
- 
Method Details- 
configurePaletteViewerprotected void configurePaletteViewer()Called to configure the viewer before it receives its contents.
- 
createPaletteViewerCreates the palette on the given composite.- Parameters:
- parent- the composite
 
- 
createPartControlDescription copied from class:GraphicalEditorRealizes the Editor by creating it's Control.WARNING: This method may or may not be called by the workbench prior to GraphicalEditor.dispose().- Specified by:
- createPartControlin interface- IWorkbenchPart
- Overrides:
- createPartControlin class- GraphicalEditor
- Parameters:
- parent- the parent composite
- See Also:
 
- 
getPaletteRootReturns the PaletteRoot for the palette viewer.- Returns:
- the palette root
 
- 
getInitialPaletteSizeprotected int getInitialPaletteSize()Returns the initial palette size in pixels. Subclasses may override this method to return a persisted value.- Returns:
- the initial size of the palette in pixels.
- See Also:
 
- 
getPaletteViewerReturns the PaletteViewer.- Returns:
- the palette viewer
 
- 
handlePaletteResizedprotected void handlePaletteResized(int newSize) Called whenever the user resizes the palette.- Parameters:
- newSize- the new size in pixels
 
- 
hookPaletteViewerprotected void hookPaletteViewer()Called when the palette viewer is set. By default, the EditDomain is given the palette viewer.
- 
initializePaletteViewerprotected void initializePaletteViewer()Called to populate the palette viewer.
- 
setPaletteViewerSets the palette viewer- Parameters:
- paletteViewer- the palette viewer
 
- 
setEditDomainSets thepalette rootof the edit domain- Overrides:
- setEditDomainin class- GraphicalEditor
- Parameters:
- ed- the domain
- See Also:
 
 
-