Skip to main content


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 05:48 Go to next message
Leonid Ripeynih is currently offline Leonid RipeynihFriend
Messages: 150
Registered: February 2012
Senior 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 14:11 Go to previous messageGo to next message
Zoltan Ujhelyi is currently offline Zoltan UjhelyiFriend
Messages: 392
Registered: July 2015
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 08:12 Go to previous messageGo to next message
Andre Specht is currently offline Andre SpechtFriend
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 08:14 Go to previous messageGo to next message
Zoltan Ujhelyi is currently offline Zoltan UjhelyiFriend
Messages: 392
Registered: July 2015
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 08:38 Go to previous messageGo to next message
Andre Specht is currently offline Andre SpechtFriend
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 08:58 Go to previous messageGo to next message
Magnus Sjöstrand is currently offline Magnus SjöstrandFriend
Messages: 16
Registered: June 2012
Junior Member
thanks, big help!

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

Report message to a moderator

Re: [ZEST] Nested elements in container [message #987355 is a reply to message #912272] Mon, 26 November 2012 09:31 Go to previous message
Zoltan Ujhelyi is currently offline Zoltan UjhelyiFriend
Messages: 392
Registered: July 2015
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: Tue Mar 19 06:04:24 GMT 2024

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

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

Back to the top