Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to nest clusters with Zest
How to nest clusters with Zest [message #1236355] Mon, 27 January 2014 02:15 Go to next message
keynne Belle is currently offline keynne BelleFriend
Messages: 30
Registered: January 2013
Member
Hello.
I would like to know how to write a Zest graph with nested clusters. For instance, how can I modify the code below so that the nested clusters can be visualized using Zest? I would also like to know if it is possible to customize graphs created with Zest i.e, specify the size of the clusters, the shape of the nodes or even the color of the node.

digraph zestGraph {

node [
fontsize="10"
shape = tab
]

subgraph cluster3{
label ="Cluster3"

rankdir = TB

subgraph cluster3_1{
label ="NestedCluster3_1"


node_2[
label="package2"
]

node_1[
label="package1"
]
}
subgraph cluster3_2{
label ="NestedCluster3_2"


node_3[
label="package3"
]
}

}

subgraph cluster2{
label ="Cluster2"
rankdir = TB

node_4[
label="package4"
]

node_5[
label="package5"
]

}

subgraph cluster1{
label ="Cluster1"
rankdir = TB

node_6[
label="package6"
]

}

node_2 -> node_3[ penwidth = 1, fontsize = 8, label="1" ]
node_2 -> node_4[ penwidth = 1, fontsize = 8, label="3" ]
node_1 -> node_3[ penwidth = 1, fontsize = 8, label="2" ]
node_3 -> node_5[ penwidth = 1, fontsize = 8, label="3" ]
node_3 -> node_4[ penwidth = 1, fontsize = 8, label="2" ]
node_4 -> node_3[ penwidth = 1, fontsize = 8, label="1" ]
node_4 -> node_5[ penwidth = 1, fontsize = 8, label="3" ]
node_5 -> node_3[ penwidth = 1, fontsize = 8, label="1" ]
node_5 -> node_6[ penwidth = 1, fontsize = 8, label="4" ]

}
Re: How to nest clusters with Zest [message #1236448 is a reply to message #1236355] Mon, 27 January 2014 08:45 Go to previous messageGo to next message
Zoltan Ujhelyi is currently offline Zoltan UjhelyiFriend
Messages: 392
Registered: July 2015
Senior Member
Hi,

Zest has limited support for nested subgraphs. For example, see the following code from the examples repository: http://git.eclipse.org/c/gef/org.eclipse.gef4.git/tree/org.eclipse.gef4.zest.examples/src/org/eclipse/gef4/zest/examples/swt/NestedGraphSnippet.java

The main shortcomings of the support are:

* The built-in layout algorithms offer very limited support for laying out clusters - it is quite possible that the end results will be unusable for practical purposes.
* The JFace API (Content and LabelProviders) only support a single level of nesting. I don't remember whether an exception is thrown after a second level is initialized, or it is simply not possible to add the third level, but I do remember it is not working.

I hope this helps a bit; if not, feel free to ask for clarification.

Zoltán
Re: How to nest clusters with Zest [message #1238920 is a reply to message #1236448] Sun, 02 February 2014 22:05 Go to previous message
keynne Belle is currently offline keynne BelleFriend
Messages: 30
Registered: January 2013
Member
Hi. Thank you for your answer. I've tried it and the result is quite interesting. However, i can not get nested clusters from it. This led me to two further questions:
1) since it is possible to generate a text file written in dot and describing nested clusters,how can i change that file to generate another file visualizable by Zest and that have the same content?
2)Zest generate clusters that are not resizable and it is kind of hard to visualize their content if they comprise a lot of nodes. Therefore, i would like to know how to specify the size of my clusters in a text file visualizable by Zest and describing my graph.
Previous Topic:Custom window properties
Next Topic:Problem With Draw2d Examples
Goto Forum:
  


Current Time: Sat Apr 20 02:40:34 GMT 2024

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

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

Back to the top