Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » [ZEST] using a Composite as GraphNode
[ZEST] using a Composite as GraphNode [message #674810] Sat, 28 May 2011 16:50 Go to next message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 424
Registered: September 2009
Senior Member
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 13:15 Go to previous messageGo to next message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 424
Registered: September 2009
Senior Member
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 22:54 Go to previous messageGo to next message
Kent Xu is currently offline Kent XuFriend
Messages: 7
Registered: August 2011
Junior Member
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 22:26 Go to previous message
Johan Schulz is currently offline Johan SchulzFriend
Messages: 20
Registered: November 2010
Junior Member
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: Sat Dec 20 13:54:04 GMT 2014

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

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