Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » change position of nodes when resizing
change position of nodes when resizing [message #150793] Tue, 14 September 2004 12:39 Go to next message
Eclipse UserFriend
Originally posted by: roman.korf.web.de

Hi, I am new to GEF.

I want to draw connections from one side of a GraphicalViewer to another
one. As start and end point I have a node. This is done so far.

When resizing the GraphicalViewer I want to change the position of the
nodes on the right side to be still seen. This means I don't want to use
scroll bars. The connections should be visible all the time.

Would look like this:

before:

----------
| |
|o----->o|
| |
|o----->o|
| |
----------


after resizing:

-------------
| |
|o-------->o|
| |
|o-------->o|
| |
-------------

and back again:

--------
| |
|o--->o|
| |
|o--->o|
| |
--------


I know that there are listeners to listen to the resizing of the
GraphicalViewer's control.

Do I have to add all the nodes to listen to this event? I was trying to do
it
with the parent EditPart of the node editparts and call refreshChildren()
but this does not update the children.

Is there some easy way to do this?

Thanks Roman
Re: change position of nodes when resizing [message #150831 is a reply to message #150793] Tue, 14 September 2004 18:40 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

It seems like you just need to move the nodes, and the connection will
follow.

"Roman Korf" <roman.korf@web.de> wrote in message
news:ci6oq0$6el$1@eclipse.org...
> Hi, I am new to GEF.
>
> I want to draw connections from one side of a GraphicalViewer to another
> one. As start and end point I have a node. This is done so far.
>
> When resizing the GraphicalViewer I want to change the position of the
> nodes on the right side to be still seen. This means I don't want to use
> scroll bars. The connections should be visible all the time.
>
> Would look like this:
>
> before:
>
> ----------
> | |
> |o----->o|
> | |
> |o----->o|
> | |
> ----------
>
>
> after resizing:
>
> -------------
> | |
> |o-------->o|
> | |
> |o-------->o|
> | |
> -------------
>
> and back again:
>
> --------
> | |
> |o--->o|
> | |
> |o--->o|
> | |
> --------
>
>
> I know that there are listeners to listen to the resizing of the
> GraphicalViewer's control.
>
> Do I have to add all the nodes to listen to this event? I was trying to do
> it
> with the parent EditPart of the node editparts and call refreshChildren()
> but this does not update the children.
>
> Is there some easy way to do this?
>
> Thanks Roman
>
Previous Topic:open wizard on a specified page
Next Topic:External Selection Listeners
Goto Forum:
  


Current Time: Thu Apr 25 00:04:31 GMT 2024

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

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

Back to the top