DirectedGraph connection routing [message #208666] |
Tue, 07 February 2006 16:31  |
Eclipse User |
|
|
|
Originally posted by: mromijn.remove_this_seagull.nl
I want to create a GEF editor for hierarchical information, i.e. information
that has a parent-child relationship. The number of nodes is in the range of
10 to 100.
I'd like to use the DirectedGraph for representing the model and
DirectedGraphLayout to layout the nodes and the connections.
I looked at the "Database Schema Diagram Editor" article of Phil Zoio and at
the "org.eclipse.gef.examples.pde.PluginDependenciesView" example in the
"org.eclipse.gef.examples.flow" plugin. Both examples use a DirectedGraph,
the Database Schema editor uses the DirectedGraphLayout and the
PluginDependenciesView uses a combination of GraphVisitors for the layout.
However, both examples suffer from the same problem: when the number of
nodes and connections increase, the routing of the connections gets rather
messy.
This is easiest seen by the PluginDependenciesView, since that uses, in my
current workspace, about 80 nodes and 140 edges (for the
PluginDependenciesView to run, I had to comment out lines 153 to 157, since
the HorizontalPlacement has problems otherwise).
Is there another (better?) layout available for showing hierarchical data,
for instance with orthogonal routing of connection?
Is there a good source of information about graph theory and diagram
layouts, so maybe I can write my own?
Note, I know my way around in hierarchical data and such, but I'm not a
mathematician ;-)
Marcel Romijn
|
|
|
Re: DirectedGraph connection routing [message #208839 is a reply to message #208666] |
Thu, 09 February 2006 09:30   |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
plug-ins are too connected to be displayed in any readable way. I don't
think it's the fault of the algorithm. The best thing to do is try it out on
your own data. See DirectedGraphDemo in org.eclipse.draw2d.example project,
in CVS.
"Marcel Romijn" <mromijn@remove_this_seagull.nl> wrote in message
news:dsb3j8$fr0$1@utils.eclipse.org...
>I want to create a GEF editor for hierarchical information, i.e.
>information
> that has a parent-child relationship. The number of nodes is in the range
> of
> 10 to 100.
>
>
>
> I'd like to use the DirectedGraph for representing the model and
> DirectedGraphLayout to layout the nodes and the connections.
>
>
>
> I looked at the "Database Schema Diagram Editor" article of Phil Zoio and
> at
> the "org.eclipse.gef.examples.pde.PluginDependenciesView" example in the
> "org.eclipse.gef.examples.flow" plugin. Both examples use a DirectedGraph,
> the Database Schema editor uses the DirectedGraphLayout and the
> PluginDependenciesView uses a combination of GraphVisitors for the layout.
>
>
>
> However, both examples suffer from the same problem: when the number of
> nodes and connections increase, the routing of the connections gets rather
> messy.
>
> This is easiest seen by the PluginDependenciesView, since that uses, in my
> current workspace, about 80 nodes and 140 edges (for the
> PluginDependenciesView to run, I had to comment out lines 153 to 157,
> since
> the HorizontalPlacement has problems otherwise).
>
>
>
> Is there another (better?) layout available for showing hierarchical data,
> for instance with orthogonal routing of connection?
>
> Is there a good source of information about graph theory and diagram
> layouts, so maybe I can write my own?
>
> Note, I know my way around in hierarchical data and such, but I'm not a
> mathematician ;-)
>
>
>
> Marcel Romijn
>
>
|
|
|
Re: DirectedGraph connection routing [message #208856 is a reply to message #208839] |
Thu, 09 February 2006 10:53   |
Eclipse User |
|
|
|
Hi Randy,
Thanks for your pointer!
I see that the examples in org.eclipse.draw2d.example indeed have less
connectivity than the plug-in hierarchy.
The complexity of my model resembles that of the plug-in hierarchy, so it
looks like the DirectedGraphLayout is unfortunately not suited for me.
I still like to base my solution on GEF, so it looks like I have to look
into creating a layout myself.
Can you tell me where the GEF team got the information for the design of the
DirectedGraphLayout?
Maybe I can find a good startingpoint there...
Thanks,
Marcel
"Randy Hudson" <none@us.ibm.com> wrote in message
news:dsfjlr$g6d$1@utils.eclipse.org...
> plug-ins are too connected to be displayed in any readable way. I don't
> think it's the fault of the algorithm. The best thing to do is try it out
> on your own data. See DirectedGraphDemo in org.eclipse.draw2d.example
> project, in CVS.
>
> "Marcel Romijn" <mromijn@remove_this_seagull.nl> wrote in message
> news:dsb3j8$fr0$1@utils.eclipse.org...
>>I want to create a GEF editor for hierarchical information, i.e.
>>information
>> that has a parent-child relationship. The number of nodes is in the range
>> of
>> 10 to 100.
>>
>>
>>
>> I'd like to use the DirectedGraph for representing the model and
>> DirectedGraphLayout to layout the nodes and the connections.
>>
>>
>>
>> I looked at the "Database Schema Diagram Editor" article of Phil Zoio and
>> at
>> the "org.eclipse.gef.examples.pde.PluginDependenciesView" example in the
>> "org.eclipse.gef.examples.flow" plugin. Both examples use a
>> DirectedGraph,
>> the Database Schema editor uses the DirectedGraphLayout and the
>> PluginDependenciesView uses a combination of GraphVisitors for the
>> layout.
>>
>>
>>
>> However, both examples suffer from the same problem: when the number of
>> nodes and connections increase, the routing of the connections gets
>> rather
>> messy.
>>
>> This is easiest seen by the PluginDependenciesView, since that uses, in
>> my
>> current workspace, about 80 nodes and 140 edges (for the
>> PluginDependenciesView to run, I had to comment out lines 153 to 157,
>> since
>> the HorizontalPlacement has problems otherwise).
>>
>>
>>
>> Is there another (better?) layout available for showing hierarchical
>> data,
>> for instance with orthogonal routing of connection?
>>
>> Is there a good source of information about graph theory and diagram
>> layouts, so maybe I can write my own?
>>
>> Note, I know my way around in hierarchical data and such, but I'm not a
>> mathematician ;-)
>>
>>
>>
>> Marcel Romijn
>>
>>
>
>
|
|
|
|
|
|
|
|
|
Re: DirectedGraph connection routing [message #209166 is a reply to message #209037] |
Sun, 12 February 2006 12:08   |
Eclipse User |
|
|
|
Originally posted by: mromijn.remove_this_seagull.nl
> We used the same algorithm documented by North et. al. If you have a
> specific graph that looks better in graphviz, feel free to open a bugzilla
> and attach the graph. thanks.
>
I have found the reason why my graph connections looks 'messy'...
I used the code from the "Database Schema Diagram Editor" and the
DummyEdgeCreator/DummyEdgePart classes.
My graph has disconnected nodes and the Dummy* classes should create dummy
nodes to make the graph connected.
However, when I hane disconnected nodes, the graph layut tends to draw some
edge bottom-to-top, instead of to-to-bottom. The edges are always segmented
top-to-bottom, which causes weird, crossed edges.
You can see this in the Schema Diagram editor:
- Create a new schema, using the 'Pre-created Sample Schema Model'
- Select the toolbar button 'Automatic Layout'
- Select the 'Create a new table' tool in the palette
- Click in the top-left corner of the diagram.
- There is now an edge from table 'DEPT' at the bottom to 'DESK' on the
second rank. On the left hand, an edge segment, spanning 6 ranks is still
drawn top-to-bottom, resulting in a weird crossing.
My graph is quite more complex and has numerous of these upside-down
crossings, hence it looks very messy.
Is there a way around this? Should I not use the
DummyEdgeCreator/DummyEdgePart classes, but use another technique for my
disconnected nodes?
Thanks.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: DirectedGraph connection routing [message #209602 is a reply to message #209553] |
Thu, 16 February 2006 18:20  |
Eclipse User |
|
|
|
Grappa (http://www.research.att.com/~john/Grappa/) has java code to parse
dot files. You may be able to take advantage of it.
I'm looking forward to not using dot and instead using
CompoundDirectedGraphLayout.
Rick
"Marcel Romijn" <CallCatcher@hotmail.com> wrote in message
news:dt1b2v$40n$1@utils.eclipse.org...
>
> "Rick Kissh" <richbk@hotmail.com> wrote in message
> news:dt0ac4$3i7$1@utils.eclipse.org...
>>I have some old notes re using the output of dot to place nodes and create
>>splines.
>>
>> From dotguide.pdf: "Every edge is assigned a pos attribute, which
>> consists of a list of 3n + 1 locations. These are B-spline control
>> points: points p0; p1; p2; p3 are the first Bezier spline, p3; p4; p5; p6
>> are the second, etc. Currently, edge points are listed top-to-bottom (or
>> left-to-right) regardless of the orientation of the edge. This may
>> change."
>
> So what you mean is that I could do the following with my graph:
> - Create a dot input-file from it
> - Run it through dot
> - Parse the dot output-file to extract the locations of the nodes and the
> control points of the spline edges
> - Use this information to layout GEF with a normal XYLayout
>
> It's not the shortest route, but it is a possibility :-)
>
|
|
|
Powered by
FUDForum. Page generated in 0.60248 seconds