Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » [ZEST] Nested elements in container
[ZEST] Nested elements in container [message #895209] Thu, 12 July 2012 01:48 Go to next message
Leonid Ripeynih is currently offline Leonid Ripeynih
Messages: 91
Registered: February 2012
Member
Hi there! Is there possibility to have nested elements in a container element? Like on the attached picture, Component 4 is inside Component 3.

(here is link to image: i.msdn.microsoft.com/dynimg/IC5297.png)
Re: [ZEST] Nested elements in container [message #895345 is a reply to message #895209] Thu, 12 July 2012 10:11 Go to previous messageGo to next message
Zoltan Ujhelyi is currently offline Zoltan Ujhelyi
Messages: 200
Registered: July 2009
Senior Member
Hi!

Zest support hierarchic graphs of a limited degree. See the example http://git.eclipse.org/c/gef/org.eclipse.zest.git/tree/org.eclipse.zest.examples/src/org/eclipse/zest/examples/swt/NestedGraphSnippet.java and your graphcontentprovider can also extend INestedContentProvider (however, this content provider limits you to a single level of nesting - aka. no nesting is possible in nested nodes).

However, the built-in layout algorithms don't support especially well these nested scenarios - they cope with it, but expect to see some issues.

Cheers,
Zoltán
Re: [ZEST] Nested elements in container [message #912263 is a reply to message #895345] Thu, 13 September 2012 04:12 Go to previous messageGo to next message
Andre Specht is currently offline Andre Specht
Messages: 3
Registered: September 2012
Junior Member
Using Zest what I am trying is to render nodes as containers using INesteContentProvider.
But what I want is to put additional Informations (list of strings or smth) into these Containers. NOT Graphs.
Is there a way of doing this?
Re: [ZEST] Nested elements in container [message #912265 is a reply to message #912263] Thu, 13 September 2012 04:14 Go to previous messageGo to next message
Zoltan Ujhelyi is currently offline Zoltan Ujhelyi
Messages: 200
Registered: July 2009
Senior Member
Hi, Andre!

Then you could make your LabelProvider implement an IFigureProvider, and then you can write your own, custom Draw2D figure. See http://git.eclipse.org/c/gef/org.eclipse.zest.git/tree/org.eclipse.zest.examples/src/org/eclipse/zest/examples/jface/CustomFigureJFaceSnippet.java as an example.

Cheers,
Zoltán
Re: [ZEST] Nested elements in container [message #912272 is a reply to message #912265] Thu, 13 September 2012 04:38 Go to previous messageGo to next message
Andre Specht is currently offline Andre Specht
Messages: 3
Registered: September 2012
Junior Member
Thank you Zoltan,
I am able to implement a custom Figure this way. But I havn't got a clue how to implement the expand and collapse feature like in container mode into the new figure.
Is that something on side of draw2d?

Thank you.
Re: [ZEST] Nested elements in container [message #922711 is a reply to message #895209] Tue, 25 September 2012 04:58 Go to previous messageGo to next message
Magnus Sjöstrand is currently offline Magnus Sjöstrand
Messages: 16
Registered: June 2012
Junior Member
thanks, big help!

[Updated on: Tue, 25 September 2012 04:59]

Report message to a moderator

Re: [ZEST] Nested elements in container [message #987355 is a reply to message #912272] Mon, 26 November 2012 04:31 Go to previous message
Zoltan Ujhelyi is currently offline Zoltan Ujhelyi
Messages: 200
Registered: July 2009
Senior Member
Hi,

sorry for the late answer. Yes, you have to implement collapse on the Draw2d figure by reacting to clicks, etc.

Zoltán
Previous Topic:draw2d.text question
Next Topic:[Zest] Combining LayoutStyles and ZestStyles
Goto Forum:
  


Current Time: Thu Jul 31 23:58:55 EDT 2014

Powered by FUDForum. Page generated in 0.01833 seconds