Zest updating and layouts [message #244450] |
Sun, 20 July 2008 14:52  |
Eclipse User |
|
|
|
I am writing a program using zest, and I have a question about what I need
to do to tell zest to update the screen if after I have made changes to
things like GraphConnection width and colour (sorry, I am english). Do I
just call the set method on the GraphConnection object or is there anything
else I need to do?
The second question concerns Layout Algorithms. The algorithm that best
seems to fit my needs is the SpringLayoutAlgorithm, but it does not seem to
do quite what I want. In particular I can not get it to force non-overlap
of all GraphConnection and GraphNode objects. By default it seems to allow
some limited overlap, in particular of GraphConnection objects. I am
not fixated on the SpringLayoutAlgorithm, its just the one that seems to
work best - I found relatively little documentation on the relative
attributes of the various algorithms.
David
|
|
|
Re: Zest updating and layouts [message #245043 is a reply to message #244450] |
Wed, 20 August 2008 16:15   |
Eclipse User |
|
|
|
Originally posted by: samer_alamir2.yahoo.com
Hello
Am new to Zest but i faced a problem similar to your first problem
>I am writing a program using zest, and I have a question about what I need
> to do to tell zest to update the screen if after I have made changes to
> things like GraphConnection width and colour (sorry, I am english). Do I
> just call the set method on the GraphConnection object or is there
> anything
> else I need to do?
i was trying to refrsh the GraphViewer using the refresh(), which u can try
after doing the changes. you can also try to reapply that layout which as i
noticed forces rebuilding the graph, you can do that by calling the
applyLayout() on ur GraphViewer instance after doing ur changes.
Hope this will help
Samer
"David Goodenough" <david.goodenough@btconnect.com> wrote in message
news:g601hp$qqq$1@build.eclipse.org...
>I am writing a program using zest, and I have a question about what I need
> to do to tell zest to update the screen if after I have made changes to
> things like GraphConnection width and colour (sorry, I am english). Do I
> just call the set method on the GraphConnection object or is there
> anything
> else I need to do?
>
> The second question concerns Layout Algorithms. The algorithm that best
> seems to fit my needs is the SpringLayoutAlgorithm, but it does not seem
> to
> do quite what I want. In particular I can not get it to force non-overlap
> of all GraphConnection and GraphNode objects. By default it seems to allow
> some limited overlap, in particular of GraphConnection objects. I am
> not fixated on the SpringLayoutAlgorithm, its just the one that seems to
> work best - I found relatively little documentation on the relative
> attributes of the various algorithms.
>
> David
|
|
|
Re: Zest updating and layouts [message #245149 is a reply to message #245043] |
Tue, 26 August 2008 06:08   |
Eclipse User |
|
|
|
Originally posted by: as.webxcerpt.com
Samer wrote:
> Hello
> Am new to Zest but i faced a problem similar to your first problem
>>I am writing a program using zest, and I have a question about what I need
>> to do to tell zest to update the screen if after I have made changes to
>> things like GraphConnection width and colour (sorry, I am english). Do I
>> just call the set method on the GraphConnection object or is there
>> anything
>> else I need to do?
> i was trying to refrsh the GraphViewer using the refresh(), which u can try
> after doing the changes. you can also try to reapply that layout which as i
> noticed forces rebuilding the graph, you can do that by calling the
> applyLayout() on ur GraphViewer instance after doing ur changes.
> Hope this will help
> Samer
> "David Goodenough" <david.goodenough@btconnect.com> wrote in message
> news:g601hp$qqq$1@build.eclipse.org...
>>I am writing a program using zest, and I have a question about what I need
>> to do to tell zest to update the screen if after I have made changes to
>> things like GraphConnection width and colour (sorry, I am english). Do I
>> just call the set method on the GraphConnection object or is there
>> anything
>> else I need to do?
>>
>> The second question concerns Layout Algorithms. The algorithm that best
>> seems to fit my needs is the SpringLayoutAlgorithm, but it does not seem
>> to
>> do quite what I want. In particular I can not get it to force non-overlap
>> of all GraphConnection and GraphNode objects. By default it seems to allow
>> some limited overlap, in particular of GraphConnection objects. I am
>> not fixated on the SpringLayoutAlgorithm, its just the one that seems to
>> work best - I found relatively little documentation on the relative
>> attributes of the various algorithms.
>>
>> David
Hi David !
I have also the problem with overlappig nodes ...
I think that the reason is the fixed size of the Composite where the Graph
lies. You have to recompute the size of your Composite each time the
content changes.
Look at the "Plug-in Dependency Visualization" example :
- The Graph lies on a ScrolledComposite.
- On each "Focus on" action the method "setFocusedNodeName" of the
class VisualizationForm is called.
- This method contains the statement "form.reflow(true)", which is
responsible for the calculation of the new size of the Composite.
I hope it's right and will help .... :-)
|
|
|
|
Powered by
FUDForum. Page generated in 0.04570 seconds