public abstract class GraphicalEditorWithPalette extends GraphicalEditor
PROP_DIRTY, PROP_INPUT
PROP_TITLE
Constructor and Description |
---|
GraphicalEditorWithPalette() |
Modifier and Type | Method and Description |
---|---|
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 |
setEditDomain(DefaultEditDomain ed)
Sets the
palette root of the edit domain |
protected void |
setPaletteViewer(PaletteViewer paletteViewer)
Sets the palette viewer
|
commandStackChanged, 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, updateActions
checkSite, doSave, getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInput, setInputWithNotify, setPartName
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyListener, getSite, getTitle, getTitleImage, removePropertyListener
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 viewerprotected void setEditDomain(DefaultEditDomain ed)
palette root
of the edit domainsetEditDomain
in class GraphicalEditor
ed
- the domainGraphicalEditor.setEditDomain(org.eclipse.gef.DefaultEditDomain)
Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.