Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » FigureCanvas and layouts
FigureCanvas and layouts [message #246183] Wed, 12 November 2008 14:03 Go to next message
Eclipse UserFriend
Originally posted by: victor.conesa.justinmind.com

Hello All,

I'd like to synchronize the FigureCanvas bounds with the layout of the root
figure specially with the FlowLayout. I'd like that, when the FigureCanvas
size is decreased, the FlowLayout apply the wrap system on the figures and
not to show the scrollbars.

I've been surfing through the gef source code and didn't found any option to
configure the FigureCanvas that way. Is there any option to do so?

Thanks in advance!
Re: FigureCanvas and layouts [message #246199 is a reply to message #246183] Sun, 16 November 2008 04:17 Go to previous messageGo to next message
Felix L J Mayer is currently offline Felix L J MayerFriend
Messages: 202
Registered: July 2009
Senior Member
I am not sure that will help you, but I once had a problem that sounded a
little like yours. A crucial thing I had to do was
Viewport.setContentsTracksHeight(true) (or width), otherwise layouts would
not be notified if the editor size changed.
Re: FigureCanvas and layouts [message #246205 is a reply to message #246183] Mon, 17 November 2008 05:16 Go to previous message
Eclipse UserFriend
Originally posted by: shady_86.sify.com

put a control listener to your viewers control which is the canvas.
now in the controlResized method call getClientArea() of the canvas.
This will return you a rectangle which you can use to set the size of your diagram edit part and further its children by maintaining the size ratio.
So the scroll bar will never be visible and the figures will wrapped..,
Previous Topic:Scrollbars ignore connections and their labels
Next Topic:Direct edit question
Goto Forum:
  


Current Time: Fri Apr 19 06:57:00 GMT 2024

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

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

Back to the top