Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » preferredSize problem
preferredSize problem [message #193632] Fri, 26 August 2005 18:54 Go to next message
Eclipse UserFriend
Originally posted by: gef.oppacher.ca

I'm having a problem with the Figure#preferredSize() call. I want figureA
to snap to the side of figureB. When figureA is first created I set
figureA.x = figureB.x - figureA.width. FigureA's width is set to the
figure's preferred size but still always leaves a small gap. On subsequent
calls the width of figureA is smaller and then snaps perfectly, it is the
propper size. So I was wondering how to calculate the proper preferredSize
before the figure is displayed.

Yandu
Re: preferredSize problem [message #193665 is a reply to message #193632] Fri, 26 August 2005 19:46 Go to previous message
Felix L J Mayer is currently offline Felix L J MayerFriend
Messages: 202
Registered: July 2009
Senior Member
"Yandu" <gef@oppacher.ca> wrote in message
news:16a47a705482bcbbc8dec71d063c1ad4$1@www.eclipse.org...
> I'm having a problem with the Figure#preferredSize() call. I want figureA
> to snap to the side of figureB. When figureA is first created I set
> figureA.x = figureB.x - figureA.width. FigureA's width is set to the
> figure's preferred size but still always leaves a small gap. On subsequent
> calls the width of figureA is smaller and then snaps perfectly, it is the
> propper size. So I was wondering how to calculate the proper preferredSize
> before the figure is displayed.
>
> Yandu
>

I have a layout manager that calculates my figure's preferred size. In
GraphicalEditor#initializeGraphicalViewer() I calculate and set the size of
every model node. Since setting the models's size triggers a refresh,
everything looks fine right away.
Previous Topic:glue figures to one another
Next Topic:Accessible edit parts drag?
Goto Forum:
  


Current Time: Wed Jan 22 17:29:49 GMT 2025

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

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

Back to the top