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