Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » refresh zest graph on click(refresh a tree view of a zest graph on user click)
refresh zest graph on click [message #975310] Wed, 07 November 2012 19:38 Go to next message
yerko cabello is currently offline yerko cabello
Messages: 2
Registered: November 2012
Junior Member
I want to know if this is possible with zest framework. I mean, first, the results are displayed as a tree view, with the root and the next level children, the rest of the children are displayed when the user clicks on one of the nodes. So my question is, it is possible to create a graph with hidden nodes and making them appear when the user clicks on one of the roots, refreshing the original graph?
Re: refresh zest graph on click [message #975383 is a reply to message #975310] Wed, 07 November 2012 20:55 Go to previous messageGo to next message
Zoltan Ujhelyi is currently offline Zoltan Ujhelyi
Messages: 221
Registered: July 2009
Senior Member
Hi,

there is no direct support for these features, however there are some ways to tackle the issue:

* If you are using a GraphViewer API, you could add org.eclipse.zest.layouts.Filter (in version 1.x) or org.eclipse.zest.core.widgets.LayoutFilter (version 2.x). A GraphViewer supports multiple filters, or your filter could have a switch functionality for selected items. In case of filtering changes you have to refresh the viewer.
* You could define with the GraphViewer API a content provider that reacts to the selection changes. If new elements are to be added, then you have to refresh the input, so the content provider runs again.
* Zest 2 introduces a new functionality called SubGraph handling (see http://wiki.eclipse.org/index.php/Zest#New_subgraph_rendering for details). Although this functionality does not directly support, what you need, but might form a basis to create it.
* All of the previous solutions relied on the creation and removal of nodes. If you want to have a dedicated place for non-visible objects, you would either need a very specific layout algorithm (quite probably custom written). If this is not acceptable, you could implement in your LabelProvider the IFigureProvider interface, and replace the filtered elements with non-visible Figures.

I hope, at least one of the ideas is useful to you.

Cheers,
Zoltán

Re: refresh zest graph on click [message #975483 is a reply to message #975383] Wed, 07 November 2012 22:47 Go to previous messageGo to next message
yerko cabello is currently offline yerko cabello
Messages: 2
Registered: November 2012
Junior Member
if I want to use the new subgraph rendering feature, which version must be installed?
Re: refresh zest graph on click [message #975971 is a reply to message #975483] Thu, 08 November 2012 08:06 Go to previous message
Fabian Steeg is currently offline Fabian Steeg
Messages: 72
Registered: July 2009
Member
You should install the version of Zest in GEF4, available from the update site at http://download.eclipse.org/tools/gef/gef4/updates/integration
Previous Topic:Delete EditPart Policy and DEL Key
Next Topic:Release version and update sites
Goto Forum:
  


Current Time: Wed Oct 22 08:16:02 GMT 2014

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

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