public class DefaultPaletteBehavior
extends java.lang.Object
GraphicalEditorWithFlyoutPalette for more information on that. To
exchange the default implementation you have to return an instance of your
subclass in the method DiagramBehavior.createPaletteBehaviour().DiagramBehavior.| Constructor and Description |
|---|
DefaultPaletteBehavior(DiagramBehavior diagramBehavior)
Creates a new standard palette behaviour for a Graphiti diagram editor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Disposes this instance.
|
org.eclipse.gef.ui.palette.FlyoutPaletteComposite.FlyoutPreferences |
getPalettePreferences()
Returns the Graphiti specific preferences for the palette.
|
org.eclipse.gef.palette.PaletteRoot |
getPaletteRoot()
Returns the already existing
PaletteRoot instance for the
DiagramBehavior associated the this palette behavior or creates a
new PaletteRoot instance in case none exists. |
void |
initializeViewer()
Initializes the used GEF palette viewer to display the palette as
defined.
|
void |
refreshPalette()
Refreshes the palette.
|
public DefaultPaletteBehavior(DiagramBehavior diagramBehavior)
DiagramBehavior is closely linked to this instance (1:1
relation) and both instances will have a common lifecycle.diagramEditor - The associated DiagramBehavior.public org.eclipse.gef.palette.PaletteRoot getPaletteRoot()
PaletteRoot instance for the
DiagramBehavior associated the this palette behavior or creates a
new PaletteRoot instance in case none exists.PaletteRoot instancepublic void initializeViewer()
DefaultPaletteViewerPreferences and triggers a refresh of
the palette.public org.eclipse.gef.ui.palette.FlyoutPaletteComposite.FlyoutPreferences getPalettePreferences()
GraphicalEditorWithFlyoutPalette during
initialization.FlyoutPaletteComposite.FlyoutPreferences.public void refreshPalette()
public void dispose()
paletteRoot reference.