Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » GEF4 - Zest 4 - A few questions
GEF4 - Zest 4 - A few questions [message #1741496] Thu, 25 August 2016 14:22 Go to next message
Marc M is currently offline Marc MFriend
Messages: 5
Registered: June 2014
Location: France
Junior Member
Hi there,
I am experimenting with Zest and have a few questions.
It would be really cool if s.o. could say s.th about this.
1) Is it possible to get diamond head's for directed graphs when using the ZestContentViewer? Maybe via Edge attributes? Is there anything predefined there?
2) Although I am specifing the size of the node according to the label content:

@Override
public Map<String, Object> getNodeAttributes(Object node) {
final Map<String, Object> attributes = new HashMap<>();
String text = node.toString();
Text atext = new Text();
atext.setText(text);
attributes.put(ZestProperties.SIZE__N, new Dimension((int)atext.getBoundsInLocal().getWidth(), (int)atext.getBoundsInLocal().getHeight()));
}
It seems that SugiyamaLayoutAlgorithm does not respect the size: It places the nodes too adjacent.
3) Is it possible to always render nested nodes? It seems they are only rendered when I zoom in, but I want to be able to see (and possibly move) the nested nodes as well.

Thank you very much in advance Smile

[Updated on: Thu, 25 August 2016 19:01]

Report message to a moderator

Re: GEF4 - Zest 4 - A few questions [message #1741572 is a reply to message #1741496] Thu, 25 August 2016 21:54 Go to previous messageGo to next message
Marc M is currently offline Marc MFriend
Messages: 5
Registered: June 2014
Location: France
Junior Member
Found out the first one on my own:
See https://github.com/eclipse/gef/blob/master/org.eclipse.gef.zest.examples.jface/src/org/eclipse/gef/zest/examples/jface/JFaceEdgeDecorationExample.java for the sample I found.

Although the other two questions are still open. Glad for any help Smile Thanks a lot.
Re: GEF4 - Zest 4 - A few questions [message #1741605 is a reply to message #1741572] Fri, 26 August 2016 09:06 Go to previous messageGo to next message
Marc M is currently offline Marc MFriend
Messages: 5
Registered: June 2014
Location: France
Junior Member
It seems that SugiyamaLayoutAlgorithm does not take the size of the nodes into account, which can turn layouts for larger nodes pretty much unusable.
Nodes can overlap and edges cross nodes pretty often... Is there anything one can do to avoid this?
Re: GEF4 - Zest 4 - A few questions [message #1742607 is a reply to message #1741605] Tue, 06 September 2016 07:18 Go to previous message
Alexander Nyssen is currently offline Alexander NyssenFriend
Messages: 235
Registered: July 2009
Location: L√ľnen
Senior Member
Sorry for not having responded, we were all on vacation. As you have already answered your first question, let me say something to the remaining two:

2) I think the implementation of SugiyamaLayoutAlgorithm still needs some improvement (also technically). Please file a Bugzilla for the missing size evaluation.
3) The current behavior evaluates the zoom level to enable that nested nodes are visualized. You can overwrite NodePart#doGetContentChildren() to return the nested graph children independent of the zoom level. If doing so, you should probably also replace SemanticZoomPolicy by a simple FXChangeViewportPolicy to prevent unnecessary children synchronization upon zooming.
Previous Topic:Handle on Mouse event for gef.graph.Node
Next Topic:news.eclipse.org is shutting down.
Goto Forum:
  


Current Time: Sat Nov 17 00:28:47 GMT 2018

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

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

Back to the top