Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Zest - GraphContainer with Custom Nodes
Zest - GraphContainer with Custom Nodes [message #1277784] Wed, 26 March 2014 13:15 Go to next message
Mikael Stolpe is currently offline Mikael StolpeFriend
Messages: 7
Registered: March 2014
Junior Member
Greetings,

I'm currently working on a project where I have a need to segment a graph into different groups of nodes. Each group of node should be tightly knitted together and be able to connect to the other groups nodes. I found that Graph Containers would be able to do this for me.

Another part of this project is that each node should be able to be customized with a specific image, thus I am using Custom Nodes.

Now the problem I'm having is when populating the Graph Container with Custom Nodes the nodes get odd characteristics i.e. some nodes become unusually large and none of the custom nodes seem to become part of the Graph Container but rather float freely outside the container.

Is this a known issue or could there be a problem with my code?
Re: Zest - GraphContainer with Custom Nodes [message #1278298 is a reply to message #1277784] Thu, 27 March 2014 06:22 Go to previous messageGo to next message
Mikael Stolpe is currently offline Mikael StolpeFriend
Messages: 7
Registered: March 2014
Junior Member
My first issue was caused by a problem with my own code, simple mistake.

The second however I have tracked down to being caused in one of the constructors of GraphNode. The one I'm using is the one which takes IContainer, Style and IFugure. CGraphNode delegates this up to GraphNode which in turn delegates this up as well. But, GraphNode, instead of passing the graph (IContainer object) it takes container.getGraph() and thus use the underlying graph instead of the container. This would explain my behavior, the custom graph node becomes a part of the graph not the container .

I find this a bit odd however, is there a bug which this works around or is there some other issue which would explain this implementation?

Thanks,
Mikael
Re: Zest - GraphContainer with Custom Nodes [message #1278359 is a reply to message #1278298] Thu, 27 March 2014 08:16 Go to previous messageGo to next message
Zoltan Ujhelyi is currently offline Zoltan UjhelyiFriend
Messages: 392
Registered: July 2015
Senior Member
Hi Mikael,

I don't know the exact answer to your question (I was not too much connected to Zest when the containers were implemented), but I know this implementation dates to much later than the rest of Zest, and was about halfway to finish (e.g., the JFace Viewers only supported a *single* level of containment nesting).

I would guess, in some places to code assumed its container was the Graph itself, and this assumption was not thoroughly removed from the system.

I am sorry I cannot help you anymore about this,
Zoltán
Re: Zest - GraphContainer with Custom Nodes [message #1278525 is a reply to message #1278359] Thu, 27 March 2014 13:01 Go to previous message
Mikael Stolpe is currently offline Mikael StolpeFriend
Messages: 7
Registered: March 2014
Junior Member
Thanks for the quick reply,

I suppose it is not important as to the why, just got me curious once I found it I guess.
Anyway, I managed to get this working by migrating to Zest 2.0. The CGraphNode's are now displayed properly but this led to realize I probably can't use the GraphContainer for my intended use.

I want to be able to hold a group of GraphNodes at a fixed position in relation to each others but still be affected by the Graphs' LayoutAlgorithm as one object. This is why I felt GraphContainers would do well for me.
The problem is the GraphContainer adds a lot of things which cause problems for my needs.

All I really want in terms of displaying the nodes is a fixed object which the nodes relate to, perhaps a rectangle. And the could perhaps be a CGraphNode or Container as a part of the Graph.

I get a feeling I need to create a custom GraphContainer but I am fairly new to Zest and perhaps there is a much simple way that I'm unaware of.


With Regards,
Mikael
Previous Topic:about font size control on Draw2d TextFlow
Next Topic:SpaceTreeLayoutAlgorithm performance issue
Goto Forum:
  


Current Time: Tue Mar 19 11:52:24 GMT 2024

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

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

Back to the top