FlyoutPalette in DiagramComposite [message #1731717] |
Mon, 09 May 2016 09:39  |
Eclipse User |
|
|
|
Hi,
I'm trying to create a DiagramComposite with an FlyoutPaletteComposite (I basically want the same behavior as in the DiagramEditor but I can't use the editor since I need to pass my own TransactionalEditingDomain.)
I finally managed to display the diagram next to the palette and have the flyout behavior by overriding createGraphicalViewer in DiagramBehavior, s. below. However, the palette is initially in the wrong position (WEST instead of expected EAST). Only after I click on the expand button does it go to the other side (EAST). Any ideas on how to get it working?
Cheers,
Kristine
@Override
protected void createGraphicalViewer(Composite parent) {
FlyoutPaletteComposite flyoutPaletteComposite = new FlyoutPaletteComposite(parent, SWT.NONE,
swisslabEditor.getActivePageInstance().getSite().getPage(), createPaletteViewerProvider(),
getPalettePreferences());
flyoutPaletteComposite.setLayout(new FillLayout());
getEditDomain().setPaletteRoot(getPaletteRoot());
super.createGraphicalViewer(flyoutPaletteComposite);
flyoutPaletteComposite.setGraphicalControl(getDiagramContainer().getGraphicalViewer().getControl());
}
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05368 seconds