change position of nodes when resizing [message #150793] |
Tue, 14 September 2004 12:39 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
>
|
|
|
Powered by
FUDForum. Page generated in 0.02691 seconds