|Re: [Zest] Follow-Up Question on Domain Objects [message #481384 is a reply to message #481319]
||Thu, 20 August 2009 17:24
| Philip Mayer
Registered: July 2009
yes, there is: call .getGraphData() on LayoutEntity or LayoutConnection.
Cast the result to GraphNode or GraphConnection, then use .getData() to
access the domain model.
Philip Mayer wrote:
> 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)?
> Philip Mayer wrote:
>> 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());
>> 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?
Powered by FUDForum
. Page generated in 0.01746 seconds