Dear all,
Wrote my own algorithm now.
Another question: Is there a "legal" way for finding out the underlying
domain object of a LayoutRelationship from the layouting classes (or at
all from outside the graph classes)?
Thanks,
Philip
Philip Mayer wrote:
Hi,
I am trying to use the ZEST DirectedGraphLayoutAlgorithm for a typical
Labelled Transition System with a few loops. I have a couple of nodes
and connections in-between, which are provided by an
IGraphContentProvider; labels are provided by a LabelProvider.
The problem is that the nodes do not show up at all; all I see are
connections. Is the algorithm complete? (There are a lot of TODOs in
the code).
viewer= new GraphViewer(parent, SWT.NONE);
viewer.setContentProvider(new MyContentProvider());
viewer.setLabelProvider(new MyLabelProvider());
viewer.setLayoutAlgorithm(new
DirectedGraphLayoutAlgorithm(SWT.VERTICAL));
viewer.setConnectionStyle(ZestStyles.CONNECTIONS_DIRECTED);
On a related note, can I use the SpringLayout for such a layout, too?
It seems to randomly distribute the nodes; I'd like to have it loosely
from top to bottom. Can this be done?
Thanks.
Philip