Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Zest updating and layouts
Zest updating and layouts [message #244450] Sun, 20 July 2008 18:52 Go to next message
David Goodenough is currently offline David GoodenoughFriend
Messages: 157
Registered: July 2009
Senior Member
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 20:15 Go to previous messageGo to next message
Eclipse UserFriend
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 10:08 Go to previous messageGo to next message
Eclipse UserFriend
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 .... :-)
Re: Zest updating and layouts [message #245154 is a reply to message #245149] Tue, 26 August 2008 12:17 Go to previous message
Eclipse UserFriend
Originally posted by: as.webxcerpt.com

I just tried it out, and its all wrong what i wrote :-(
Previous Topic:Marquee right-click contextual menu
Next Topic:Populate Wizard from a CreationTool
Goto Forum:
  


Current Time: Fri Apr 26 16:11:03 GMT 2024

Powered by FUDForum. Page generated in 0.03036 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top