Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » FlyoutPalette in DiagramComposite
FlyoutPalette in DiagramComposite [message #1731717] Mon, 09 May 2016 13:39 Go to next message
Kristine Jetzke is currently offline Kristine JetzkeFriend
Messages: 8
Registered: May 2016
Junior Member
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());	
	}
Re: FlyoutPalette in DiagramComposite [message #1732031 is a reply to message #1731717] Thu, 12 May 2016 06:55 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Kristine,

I have not tried that myself, but it sounds as if only a refresh on the composite may be missing.

Another thing: the editing domain is initialized in the setInput method of the composite. You may overwrite that method, get your own editing domain there and continue with tghe standard implementation. Have you tried that?

HTH,
Michael
Re: FlyoutPalette in DiagramComposite [message #1732037 is a reply to message #1732031] Thu, 12 May 2016 07:44 Go to previous messageGo to next message
Kristine Jetzke is currently offline Kristine JetzkeFriend
Messages: 8
Registered: May 2016
Junior Member
Hi Michael,

thanks for the reply.

Quote:

I have not tried that myself, but it sounds as if only a refresh on the composite may be missing.


I already tried calling layout but it didn't do anything.

Quote:

Another thing: the editing domain is initialized in the setInput method of the composite. You may overwrite that method, get your own editing domain there and continue with tghe standard implementation. Have you tried that?


What do you mean with the standard implemetation? It doesn't have the palette...

Cheers,

Kristine
Re: FlyoutPalette in DiagramComposite [message #1732837 is a reply to message #1732037] Fri, 20 May 2016 15:21 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Kristine,

sorry, forget about the comment with the standard implementation.

About the refresh: you should not call layout but teh method refresh on the DiagramBehoavior class, that should do it.

Michael
Re: FlyoutPalette in DiagramComposite [message #1732926 is a reply to message #1732837] Mon, 23 May 2016 07:15 Go to previous message
Kristine Jetzke is currently offline Kristine JetzkeFriend
Messages: 8
Registered: May 2016
Junior Member
Michael Wenz wrote on Fri, 20 May 2016 15:21

About the refresh: you should not call layout but teh method refresh on the DiagramBehoavior class, that should do it.


I tried it, but it didn't help Sad I will just use a regular palette viewer, without th flyout behavior.
Previous Topic:Scrollable figures
Next Topic:Eclispse Neon Graphiti v0.13 Line Width
Goto Forum:
  


Current Time: Thu Oct 10 20:38:09 GMT 2024

Powered by FUDForum. Page generated in 0.03642 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top