Home » Eclipse Projects » GEF » understanding connection invalidation
understanding connection invalidation [message #81212] |
Tue, 27 May 2003 17:52  |
Eclipse User |
|
|
|
I had a scenario that worked, and then I changed it and it doesn't
work
Here is the scenario that worked
Parent object with FlowLayout
Editpart A with FlowLayout
child EditPart B with FlowLayout
children of EditPart B have Connections between them
If I insert a part before A, everything works as expected:
- A moves over on the screen
- B moves over
- children of B move over
- connections in children move over.
Now:
I changed child EditPart B to have a FreeFormLayer and XYLayout (I had
to override FreeFormLayer to use LocalCoordinates) so that the
children can be manually placed.
Now if I insert a part before A, everything but the connections inside
B moves over.
The connectionparts in the first scenario get invalidated and
re-layout but this doesn't happen anymore in B.
How do I force the connections to reLayout in the second case?
thanks
Ray
|
|
| | | |
Re: understanding connection invalidation [message #81355 is a reply to message #81326] |
Wed, 28 May 2003 10:32   |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
If you are really useing the Freeform layer as intended, then restoring the
notification may cause an infinite loop. Why do you need a FreeFormLayer?
Have you placed it inside a ScrollPane figure?
"Ray Tsui" <Raymond_Tsui@ca.ibm.com> wrote in message
news:jfc9dvgo83a51kajq3du5r59k7t7jmjmq1@4ax.com...
> It seems to me that the freeformlayer "breaks" the notification chain
> by overriding FireMoved(). Normally, it seems that the figures pass on
The FreeformLayer never moves. Only its children move. Firing figure moved
is used in two ways. It may indicate that the figure itself moved. But it
is also used to indicate that the coordinate system in which the children
"live" has changed. AncestorListeners, such as connection anchors, are
interested in whether their source figure, or *any* of its ancestors move or
otherwise change the absolute coordinate of the connection anchor.
> this notification to allow the connections to lay out themselves, but
> I guess since the Freeformlayer is not normally placed inside a
> Flowlayout, this was intentional.
>
> I can get it to work by cloning the Freeformlayer class and removing
> the override. I don't know if this is a bad approach though.
>
> thanks
> Ray
>
>
>
> On Wed, 28 May 2003 01:15:45 -0400, "Randy Hudson" <none@us.ibm.com>
> wrote:
>
> >You probably can call setBounds(), but the children will not get
translated
> >as a result of doing so. This is by design, since setting the bounds
comes
> >after the children are layed out.
> >
>
|
|
|
Re: understanding connection invalidation [message #81410 is a reply to message #81355] |
Wed, 28 May 2003 10:56   |
Eclipse User |
|
|
|
Maybe you can suggest the proper approach?
I have an contaner editpart (I call XYContainer) which contains other
objects with x,y relative coordiantes and connections. This container
can be inside other editparts with FlowLayouts or itself be contained
inside XYContainer.
What kind of figure and layout would you suggest I use? The
XYContainer should automatically grow to enclose all its XY children,
but move all its contents automatically when its parent FlowLayout
causes it to move.
Ray
On Wed, 28 May 2003 10:32:57 -0400, "Randy Hudson" <none@us.ibm.com>
wrote:
>If you are really useing the Freeform layer as intended, then restoring the
>notification may cause an infinite loop. Why do you need a FreeFormLayer?
>Have you placed it inside a ScrollPane figure?
>
>"Ray Tsui" <Raymond_Tsui@ca.ibm.com> wrote in message
>news:jfc9dvgo83a51kajq3du5r59k7t7jmjmq1@4ax.com...
>> It seems to me that the freeformlayer "breaks" the notification chain
>> by overriding FireMoved(). Normally, it seems that the figures pass on
>
>The FreeformLayer never moves. Only its children move. Firing figure moved
>is used in two ways. It may indicate that the figure itself moved. But it
>is also used to indicate that the coordinate system in which the children
>"live" has changed. AncestorListeners, such as connection anchors, are
>interested in whether their source figure, or *any* of its ancestors move or
>otherwise change the absolute coordinate of the connection anchor.
>
>> this notification to allow the connections to lay out themselves, but
>> I guess since the Freeformlayer is not normally placed inside a
>> Flowlayout, this was intentional.
>>
>> I can get it to work by cloning the Freeformlayer class and removing
>> the override. I don't know if this is a bad approach though.
>>
>> thanks
>> Ray
>>
>>
>>
>> On Wed, 28 May 2003 01:15:45 -0400, "Randy Hudson" <none@us.ibm.com>
>> wrote:
>>
>> >You probably can call setBounds(), but the children will not get
>translated
>> >as a result of doing so. This is by design, since setting the bounds
>comes
>> >after the children are layed out.
>> >
>>
>
|
|
|
Re: understanding connection invalidation [message #81439 is a reply to message #81410] |
Wed, 28 May 2003 14:56  |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
"Ray Tsui" <Raymond_Tsui@ca.ibm.com> wrote in message
news:d4j9dvcp7l5obpdtjinvs2s4bgt9rofu3o@4ax.com...
>
> Maybe you can suggest the proper approach?
>
> I have an contaner editpart (I call XYContainer) which contains other
> objects with x,y relative coordiantes and connections. This container
> can be inside other editparts with FlowLayouts or itself be contained
> inside XYContainer.
>
> What kind of figure and layout would you suggest I use? The
> XYContainer should automatically grow to enclose all its XY children,
> but move all its contents automatically when its parent FlowLayout
> causes it to move.
A Figure in XYLayout will do this.
> Ray
>
> On Wed, 28 May 2003 10:32:57 -0400, "Randy Hudson" <none@us.ibm.com>
> wrote:
>
> >If you are really useing the Freeform layer as intended, then restoring
the
> >notification may cause an infinite loop. Why do you need a
FreeFormLayer?
> >Have you placed it inside a ScrollPane figure?
> >
> >"Ray Tsui" <Raymond_Tsui@ca.ibm.com> wrote in message
> >news:jfc9dvgo83a51kajq3du5r59k7t7jmjmq1@4ax.com...
> >> It seems to me that the freeformlayer "breaks" the notification chain
> >> by overriding FireMoved(). Normally, it seems that the figures pass on
> >
> >The FreeformLayer never moves. Only its children move. Firing figure
moved
> >is used in two ways. It may indicate that the figure itself moved. But
it
> >is also used to indicate that the coordinate system in which the children
> >"live" has changed. AncestorListeners, such as connection anchors, are
> >interested in whether their source figure, or *any* of its ancestors move
or
> >otherwise change the absolute coordinate of the connection anchor.
> >
> >> this notification to allow the connections to lay out themselves, but
> >> I guess since the Freeformlayer is not normally placed inside a
> >> Flowlayout, this was intentional.
> >>
> >> I can get it to work by cloning the Freeformlayer class and removing
> >> the override. I don't know if this is a bad approach though.
> >>
> >> thanks
> >> Ray
> >>
> >>
> >>
> >> On Wed, 28 May 2003 01:15:45 -0400, "Randy Hudson" <none@us.ibm.com>
> >> wrote:
> >>
> >> >You probably can call setBounds(), but the children will not get
> >translated
> >> >as a result of doing so. This is by design, since setting the bounds
> >comes
> >> >after the children are layed out.
> >> >
> >>
> >
>
|
|
|
Goto Forum:
Current Time: Wed Jul 16 21:36:20 EDT 2025
Powered by FUDForum. Page generated in 0.06100 seconds
|