Home » Eclipse Projects » GEF » FlowLayout/ToolbarLayout for diagram contents
FlowLayout/ToolbarLayout for diagram contents [message #89769] |
Tue, 05 August 2003 23:35  |
Eclipse User |
|
|
|
Originally posted by: cagatayk.stop.acm.org
Hi all,
Let me just say first that my hands-on experience with GEF is about
three days old, and it's one of those pieces of software that actually
gives you a thrill when you try it the first time, rather like Eclipse
;-)...
The problem I have is with ordered layouts. I have a diagram that's
composed of a list of figures that should be laid out either with
toolbar or flow layout, vertically centered and extending only to the
right, eventually causing the horizontal scrollbar to appear. I don't
want to use a freeform layer for the main diagram contents since
negative coordinates do not make sense for this application.
Unfortunately, I can't figure out a way to use an ordered layout for the
main diagram and still grab all the available space in the editor.
To my surprise, using FreeformLayer with toolbar or flow layout gives
the appearance I'm looking for, even though it seems to me this
shouldn't be working. However, auto-scroll behavior is wrong in this
case. As soon as I drag a figure to negative coordinates diagram size
rapidly starts to increase (scroll thumbs getting smaller) and it
doesn't return back to its original state when I drop or cancel.
How can I use flow or toolbar layout for the main diagram with all
available space usable and auto-scroll working correctly?
|
|
|
Re: FlowLayout/ToolbarLayout for diagram contents [message #89784 is a reply to message #89769] |
Wed, 06 August 2003 00:17   |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
"Cagatay Kavukcuoglu" <cagatayk@stop.acm.org> wrote in message
news:bgpt03$tot$1@eclipse.org...
> Hi all,
>
> Let me just say first that my hands-on experience with GEF is about
> three days old, and it's one of those pieces of software that actually
> gives you a thrill when you try it the first time, rather like Eclipse
> ;-)...
>
> The problem I have is with ordered layouts. I have a diagram that's
> composed of a list of figures that should be laid out either with
> toolbar or flow layout, vertically centered and extending only to the
> right, eventually causing the horizontal scrollbar to appear. I don't
> want to use a freeform layer for the main diagram contents since
> negative coordinates do not make sense for this application.
> Unfortunately, I can't figure out a way to use an ordered layout for the
> main diagram and still grab all the available space in the editor.
What is your diagram doing that is incorrect? The Layered pane(s) in
ScalableRootEditPart (which is what you should use, even if you don't want
zoom) have a StackLayout. The Viewport gives the layered panes all
available space (Actually it does a union of the viewport's client area and
the "preferredSize" of the panes), which in turn should give your diagram
the available area.
>
> To my surprise, using FreeformLayer with toolbar or flow layout gives
> the appearance I'm looking for, even though it seems to me this
> shouldn't be working. However, auto-scroll behavior is wrong in this
> case. As soon as I drag a figure to negative coordinates diagram size
> rapidly starts to increase (scroll thumbs getting smaller) and it
> doesn't return back to its original state when I drop or cancel.
This sounds like you have a container somewhere without a layout manager?
So it doesn't calculate preferred size correctly, it just uses its current
size.
>
> How can I use flow or toolbar layout for the main diagram with all
> available space usable and auto-scroll working correctly?
>
|
|
|
Re: FlowLayout/ToolbarLayout for diagram contents [message #89860 is a reply to message #89784] |
Wed, 06 August 2003 12:23   |
Eclipse User |
|
|
|
Originally posted by: cagatayk.stop.acm.org
Randy Hudson wrote:
> "Cagatay Kavukcuoglu" <cagatayk@stop.acm.org> wrote in message
> news:bgpt03$tot$1@eclipse.org...
> > Hi all,
> >
> > Let me just say first that my hands-on experience with GEF is about
> > three days old, and it's one of those pieces of software that actually
> > gives you a thrill when you try it the first time, rather like Eclipse
> > ;-)...
> >
> > The problem I have is with ordered layouts. I have a diagram that's
> > composed of a list of figures that should be laid out either with
> > toolbar or flow layout, vertically centered and extending only to the
> > right, eventually causing the horizontal scrollbar to appear. I don't
> > want to use a freeform layer for the main diagram contents since
> > negative coordinates do not make sense for this application.
> > Unfortunately, I can't figure out a way to use an ordered layout for the
> > main diagram and still grab all the available space in the editor.
> What is your diagram doing that is incorrect? The Layered pane(s) in
> ScalableRootEditPart (which is what you should use, even if you don't want
> zoom) have a StackLayout. The Viewport gives the layered panes all
> available space (Actually it does a union of the viewport's client area and
> the "preferredSize" of the panes), which in turn should give your diagram
> the available area.
OK, turns out I was using ScalableFreeformRootEditPart instead, having
lifted the editor code from the Logic example. Everything works out nicely
now.
> >
> > To my surprise, using FreeformLayer with toolbar or flow layout gives
> > the appearance I'm looking for, even though it seems to me this
> > shouldn't be working. However, auto-scroll behavior is wrong in this
> > case. As soon as I drag a figure to negative coordinates diagram size
> > rapidly starts to increase (scroll thumbs getting smaller) and it
> > doesn't return back to its original state when I drop or cancel.
> This sounds like you have a container somewhere without a layout manager?
> So it doesn't calculate preferred size correctly, it just uses its current
> size.
All containers have layout managers. I was thinking that the
DragEditPartsTracker's interaction with the freeform layer (laid out with
flow layout) was causing the trouble but never found out the real reason.
> >
> > How can I use flow or toolbar layout for the main diagram with all
> > available space usable and auto-scroll working correctly?
> >
|
|
|
Re: FlowLayout/ToolbarLayout for diagram contents [message #89875 is a reply to message #89860] |
Wed, 06 August 2003 12:26   |
Eclipse User |
|
|
|
Originally posted by: cagatayk.stop.acm.org
Just remembered this: Freeform and non-freeform scalable root edit parts
don't have a common API, it may be useful to have something like a
ScalableRootEditPart interface that provides access to ZoomManager so the
editor can use freeform and non-freeform root edit parts interchangeably
without much trouble.
Cagatay Kavukcuoglu wrote:
> Randy Hudson wrote:
> > "Cagatay Kavukcuoglu" <cagatayk@stop.acm.org> wrote in message
> > news:bgpt03$tot$1@eclipse.org...
> > > Hi all,
> > >
> > > Let me just say first that my hands-on experience with GEF is about
> > > three days old, and it's one of those pieces of software that actually
> > > gives you a thrill when you try it the first time, rather like Eclipse
> > > ;-)...
> > >
> > > The problem I have is with ordered layouts. I have a diagram that's
> > > composed of a list of figures that should be laid out either with
> > > toolbar or flow layout, vertically centered and extending only to the
> > > right, eventually causing the horizontal scrollbar to appear. I don't
> > > want to use a freeform layer for the main diagram contents since
> > > negative coordinates do not make sense for this application.
> > > Unfortunately, I can't figure out a way to use an ordered layout for the
> > > main diagram and still grab all the available space in the editor.
> > What is your diagram doing that is incorrect? The Layered pane(s) in
> > ScalableRootEditPart (which is what you should use, even if you don't want
> > zoom) have a StackLayout. The Viewport gives the layered panes all
> > available space (Actually it does a union of the viewport's client area and
> > the "preferredSize" of the panes), which in turn should give your diagram
> > the available area.
> OK, turns out I was using ScalableFreeformRootEditPart instead, having
> lifted the editor code from the Logic example. Everything works out nicely
> now.
> > >
> > > To my surprise, using FreeformLayer with toolbar or flow layout gives
> > > the appearance I'm looking for, even though it seems to me this
> > > shouldn't be working. However, auto-scroll behavior is wrong in this
> > > case. As soon as I drag a figure to negative coordinates diagram size
> > > rapidly starts to increase (scroll thumbs getting smaller) and it
> > > doesn't return back to its original state when I drop or cancel.
> > This sounds like you have a container somewhere without a layout manager?
> > So it doesn't calculate preferred size correctly, it just uses its current
> > size.
> All containers have layout managers. I was thinking that the
> DragEditPartsTracker's interaction with the freeform layer (laid out with
> flow layout) was causing the trouble but never found out the real reason.
> > >
> > > How can I use flow or toolbar layout for the main diagram with all
> > > available space usable and auto-scroll working correctly?
> > >
|
|
| |
Re: FlowLayout/ToolbarLayout for diagram contents [message #106918 is a reply to message #89769] |
Tue, 25 November 2003 15:19  |
Eclipse User |
|
|
|
Say -- I have exactly the same set of requirements, and would love to know
how you made this work (I completely don't understand your exchange with
Randy Hudson.) Any clues?
Thanks,
Paul
Cagatay Kavukcuoglu wrote:
> Hi all,
>
> Let me just say first that my hands-on experience with GEF is about
> three days old, and it's one of those pieces of software that actually
> gives you a thrill when you try it the first time, rather like Eclipse
> ;-)...
>
> The problem I have is with ordered layouts. I have a diagram that's
> composed of a list of figures that should be laid out either with
> toolbar or flow layout, vertically centered and extending only to the
> right, eventually causing the horizontal scrollbar to appear. I don't
> want to use a freeform layer for the main diagram contents since
> negative coordinates do not make sense for this application.
> Unfortunately, I can't figure out a way to use an ordered layout for the
> main diagram and still grab all the available space in the editor.
>
> To my surprise, using FreeformLayer with toolbar or flow layout gives
> the appearance I'm looking for, even though it seems to me this
> shouldn't be working. However, auto-scroll behavior is wrong in this
> case. As soon as I drag a figure to negative coordinates diagram size
> rapidly starts to increase (scroll thumbs getting smaller) and it
> doesn't return back to its original state when I drop or cancel.
>
> How can I use flow or toolbar layout for the main diagram with all
> available space usable and auto-scroll working correctly?
|
|
|
Goto Forum:
Current Time: Sat Jul 19 04:02:43 EDT 2025
Powered by FUDForum. Page generated in 0.06386 seconds
|