Home » Eclipse Projects » GEF » zooming support endless loop
zooming support endless loop [message #70371] |
Fri, 14 March 2003 14:15 |
Eclipse User |
|
|
|
Originally posted by: Raymond_Tsui.ca.ibm.co
Randy Can you look at the attached stack trace?
I'm trying to add zoom support and followed the logic example to add a free
form editpart to do so. It works great some of the time but other times, the
code gets into an endless loop after a change in zoom. I suspended the
program in the middle of one of these loops. Can you look at the stack trace
and see if that looks about right?
How would you diagnose this problem?
Ray
|
|
|
Re: zooming support endless loop [message #70414 is a reply to message #70371] |
Fri, 14 March 2003 15:25 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
Do you have a FlowLayout set as the Layout for a Freeform layer? This
doesn't work, only FreeformXYLayout works. The reason is that a freeform
figure can extend in all directions, as needed by the location of its
children. So, the top-left corner of a freeform figure is a function of the
location of the children. But, with flowlayout, the locations of the
children are a function of the top-left corner of the container (the
freeform layer).
Do you currently allow the user to drag things into negative x or y
coordinates? Or, does you automatic layout ever place things in negative x
coordinates (for really large flows, perhaps). If not, you don't need
freeform anything.
"Ray Tsui" <Raymond_Tsui@ca.ibm.co> wrote in message
news:b4so8a$h37$1@rogue.oti.com...
> Randy Can you look at the attached stack trace?
>
> I'm trying to add zoom support and followed the logic example to add a
free
> form editpart to do so. It works great some of the time but other times,
the
> code gets into an endless loop after a change in zoom. I suspended the
> program in the middle of one of these loops. Can you look at the stack
trace
> and see if that looks about right?
>
> How would you diagnose this problem?
>
> Ray
>
>
>
>
|
|
|
Re: zooming support endless loop [message #70564 is a reply to message #70414] |
Fri, 14 March 2003 17:40 |
Eclipse User |
|
|
|
Originally posted by: Raymond_Tsui.ca.ibm.co
Ahh, that could explain things. We *are* using FlowLayouts in the parent
part that has a FreeformLayer as its figure. But I'm not sure what to do
now.
I tried changing the figure to a regular Layer but then all the children
objects disappear. Why does it work in the case of a FreeformLayout and not
a regular Layout?
Thanks
Ray
"Randy Hudson" <none@us.ibm.com> wrote in message
news:b4sscm$l4m$1@rogue.oti.com...
> Do you have a FlowLayout set as the Layout for a Freeform layer? This
> doesn't work, only FreeformXYLayout works. The reason is that a freeform
> figure can extend in all directions, as needed by the location of its
> children. So, the top-left corner of a freeform figure is a function of
the
> location of the children. But, with flowlayout, the locations of the
> children are a function of the top-left corner of the container (the
> freeform layer).
>
> Do you currently allow the user to drag things into negative x or y
> coordinates? Or, does you automatic layout ever place things in negative
x
> coordinates (for really large flows, perhaps). If not, you don't need
> freeform anything.
>
> "Ray Tsui" <Raymond_Tsui@ca.ibm.co> wrote in message
> news:b4so8a$h37$1@rogue.oti.com...
> > Randy Can you look at the attached stack trace?
> >
> > I'm trying to add zoom support and followed the logic example to add a
> free
> > form editpart to do so. It works great some of the time but other times,
> the
> > code gets into an endless loop after a change in zoom. I suspended the
> > program in the middle of one of these loops. Can you look at the stack
> trace
> > and see if that looks about right?
> >
> > How would you diagnose this problem?
> >
> > Ray
> >
> >
> >
> >
>
>
|
|
|
Re: zooming support endless loop [message #70582 is a reply to message #70564] |
Fri, 14 March 2003 17:42 |
Eclipse User |
|
|
|
Originally posted by: Raymond_Tsui.ca.ibm.co
Typos...the last sentence should read this way
Why does it work in the case of a FreeformLayer and not
a regular Layer?
"Ray Tsui" <Raymond_Tsui@ca.ibm.co> wrote in message
news:b4t487$sb9$1@rogue.oti.com...
> Ahh, that could explain things. We *are* using FlowLayouts in the parent
> part that has a FreeformLayer as its figure. But I'm not sure what to do
> now.
>
> I tried changing the figure to a regular Layer but then all the children
> objects disappear. Why does it work in the case of a FreeformLayout and
not
> a regular Layout?
>
> Thanks
> Ray
>
> "Randy Hudson" <none@us.ibm.com> wrote in message
> news:b4sscm$l4m$1@rogue.oti.com...
> > Do you have a FlowLayout set as the Layout for a Freeform layer? This
> > doesn't work, only FreeformXYLayout works. The reason is that a
freeform
> > figure can extend in all directions, as needed by the location of its
> > children. So, the top-left corner of a freeform figure is a function of
> the
> > location of the children. But, with flowlayout, the locations of the
> > children are a function of the top-left corner of the container (the
> > freeform layer).
> >
> > Do you currently allow the user to drag things into negative x or y
> > coordinates? Or, does you automatic layout ever place things in
negative
> x
> > coordinates (for really large flows, perhaps). If not, you don't need
> > freeform anything.
> >
|
|
|
Re: zooming support endless loop [message #70632 is a reply to message #70582] |
Fri, 14 March 2003 20:57 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
If you look at the difference between XYLayout and FreeformXYLayout, you
will get an idea.
Basically, you want a FlowLayout which, instead of position children
relative to its getClientArea().getLocation(), you position them relative to
0,0, all the time.
But then this begs the question, why use Freeform at all? It sounds like
you are just using it for its Zoom support.
"Ray Tsui" <Raymond_Tsui@ca.ibm.co> wrote in message
news:b4t4db$sha$1@rogue.oti.com...
> Typos...the last sentence should read this way
>
> Why does it work in the case of a FreeformLayer and not
> a regular Layer?
>
> "Ray Tsui" <Raymond_Tsui@ca.ibm.co> wrote in message
> news:b4t487$sb9$1@rogue.oti.com...
> > Ahh, that could explain things. We *are* using FlowLayouts in the parent
> > part that has a FreeformLayer as its figure. But I'm not sure what to do
> > now.
> >
> > I tried changing the figure to a regular Layer but then all the children
> > objects disappear. Why does it work in the case of a FreeformLayout and
> not
> > a regular Layout?
> >
> > Thanks
> > Ray
> >
> > "Randy Hudson" <none@us.ibm.com> wrote in message
> > news:b4sscm$l4m$1@rogue.oti.com...
> > > Do you have a FlowLayout set as the Layout for a Freeform layer? This
> > > doesn't work, only FreeformXYLayout works. The reason is that a
> freeform
> > > figure can extend in all directions, as needed by the location of its
> > > children. So, the top-left corner of a freeform figure is a function
of
> > the
> > > location of the children. But, with flowlayout, the locations of the
> > > children are a function of the top-left corner of the container (the
> > > freeform layer).
> > >
> > > Do you currently allow the user to drag things into negative x or y
> > > coordinates? Or, does you automatic layout ever place things in
> negative
> > x
> > > coordinates (for really large flows, perhaps). If not, you don't need
> > > freeform anything.
> > >
>
>
|
|
|
Re: zooming support endless loop [message #70648 is a reply to message #70632] |
Fri, 14 March 2003 21:19 |
Eclipse User |
|
|
|
Originally posted by: Raymond_Tsui.ca.ibm.co
Zooming support is the whole reason I got into this mess in the first place
:-) We do need zooming support.
The way I added zooming support is to set the root edit part to be
ScaleableFreeformRootEditPart as per logic example. As I said, that was
enough to cause the infinite loops in our otherwise well behaved editor.
So if I can extropolate, I should then modify/subclass FlowLayout to force
the position of them to relative to 0,0????? That would be enough to solve
the problem? Please say yes :)
Ray
"Randy Hudson" <none@us.ibm.com> wrote in message
news:b4tfq7$65t$1@rogue.oti.com...
> If you look at the difference between XYLayout and FreeformXYLayout, you
> will get an idea.
> Basically, you want a FlowLayout which, instead of position children
> relative to its getClientArea().getLocation(), you position them relative
to
> 0,0, all the time.
>
> But then this begs the question, why use Freeform at all? It sounds like
> you are just using it for its Zoom support.
>
> "Ray Tsui" <Raymond_Tsui@ca.ibm.co> wrote in message
> news:b4t4db$sha$1@rogue.oti.com...
> > Typos...the last sentence should read this way
> >
> > Why does it work in the case of a FreeformLayer and not
> > a regular Layer?
> >
> > "Ray Tsui" <Raymond_Tsui@ca.ibm.co> wrote in message
> > news:b4t487$sb9$1@rogue.oti.com...
> > > Ahh, that could explain things. We *are* using FlowLayouts in the
parent
> > > part that has a FreeformLayer as its figure. But I'm not sure what to
do
> > > now.
> > >
> > > I tried changing the figure to a regular Layer but then all the
children
> > > objects disappear. Why does it work in the case of a FreeformLayout
and
> > not
> > > a regular Layout?
> > >
> > > Thanks
> > > Ray
> > >
> > > "Randy Hudson" <none@us.ibm.com> wrote in message
> > > news:b4sscm$l4m$1@rogue.oti.com...
> > > > Do you have a FlowLayout set as the Layout for a Freeform layer?
This
> > > > doesn't work, only FreeformXYLayout works. The reason is that a
> > freeform
> > > > figure can extend in all directions, as needed by the location of
its
> > > > children. So, the top-left corner of a freeform figure is a
function
> of
> > > the
> > > > location of the children. But, with flowlayout, the locations of
the
> > > > children are a function of the top-left corner of the container (the
> > > > freeform layer).
> > > >
> > > > Do you currently allow the user to drag things into negative x or y
> > > > coordinates? Or, does you automatic layout ever place things in
> > negative
> > > x
> > > > coordinates (for really large flows, perhaps). If not, you don't
need
> > > > freeform anything.
> > > >
> >
> >
>
>
|
|
| |
Re: zooming support endless loop [message #196189 is a reply to message #70414] |
Fri, 16 September 2005 19:52 |
Nick Allen Messages: 23 Registered: July 2009 |
Junior Member |
|
|
Randy Hudson wrote:
> Do you have a FlowLayout set as the Layout for a Freeform layer? This
> doesn't work, only FreeformXYLayout works. The reason is that a freeform
> figure can extend in all directions, as needed by the location of its
> children. So, the top-left corner of a freeform figure is a function of the
> location of the children. But, with flowlayout, the locations of the
> children are a function of the top-left corner of the container (the
> freeform layer).
>
I now have a similar problem. I am using FreeformLayout in a
FreeformLayer and the system goes into an endless loop when I try to
zoom. I believe since the previous post FreeformLayout has replaced
FreeformXYLayout, but I could be wrong.
By not setting the layout manager, I avoid this problem, but of course,
nothing is positioned properly within the diagram. I have tried also
using XYLayout, but I fall into the same endless loop.
Any thoughts?
Thanks
Nick
|
|
| | | | |
Goto Forum:
Current Time: Thu Jan 02 13:41:01 GMT 2025
Powered by FUDForum. Page generated in 0.04006 seconds
|