Skip to main content



      Home
Home » Eclipse Projects » GEF » [ZEST] using a Composite as GraphNode
[ZEST] using a Composite as GraphNode [message #674810] Sat, 28 May 2011 12:50 Go to next message
Eclipse UserFriend
GraphNode has the general aspect of a Button (by default).
I saw I can use arbitrary shapes instead (using implements IFigureProvider).
Is there a(n easy) way to use a generic Widget (like an SWT Container)
as shape?

I would like to create a Composite (filled with whatever I need) as part
of my model/LabelProvider and use that to display the node.

Any hint?
TiA
Mauro
Re: [ZEST] using a Composite as GraphNode [message #675772 is a reply to message #674810] Wed, 01 June 2011 09:15 Go to previous messageGo to next message
Eclipse UserFriend
No answer?
Does it mean it can't be done?

Mauro

Il 28/05/2011 18:50, Mauro Condarelli ha scritto:
> GraphNode has the general aspect of a Button (by default).
> I saw I can use arbitrary shapes instead (using implements IFigureProvider).
> Is there a(n easy) way to use a generic Widget (like an SWT Container)
> as shape?
>
> I would like to create a Composite (filled with whatever I need) as part
> of my model/LabelProvider and use that to display the node.
>
> Any hint?
> TiA
> Mauro
Re: [ZEST] using a Composite as GraphNode [message #713728 is a reply to message #674810] Mon, 08 August 2011 18:54 Go to previous messageGo to next message
Eclipse UserFriend
I was looking for something similar to this. Now I have drawn the conclusion that it is not possible.

Zest is built on GEF; GEF is based on Draw2D. SWT is not compatible with any of them and therefore can not be used inside (turned into IFigure). SWT, however, can use a canvas widget to render GEF/ZEST/Draw2D.

Please correct me if my understanding is wrong.
Re: [ZEST] using a Composite as GraphNode [message #717983 is a reply to message #713728] Mon, 22 August 2011 18:26 Go to previous message
Eclipse UserFriend
if your IGraphContentProvider implements IFigureProvider it can return any arbitrary IFigure which is build up quite similar to SWT Composite as you can stack them as you like. But you have to handle the selection state and maybe recalculate your LayoutAlgorithm to handle the size of your custom node.

If you google for "zest graph custom nodes" you will find some hints of other people who had the same problem.

Regards
Johan
Previous Topic:Gef Vertical Label
Next Topic:Adding Sequence Flow to BPMN2 Editor
Goto Forum:
  


Current Time: Thu Apr 24 04:11:15 EDT 2025

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

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

Back to the top