Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Draw2d Figure Translation
Draw2d Figure Translation [message #228972] Fri, 12 January 2007 08:19 Go to next message
Manuel Selva is currently offline Manuel SelvaFriend
Messages: 189
Registered: July 2009
Location: Grenoble, France
Senior Member
Hi all,

Still questions concerning Draw2D (intensive use of this cool API ;0).
My Draw2D chart needs translation. Figures are layed out using an XYLayout.
When translating a figure and next call repaint on the parent of the
translated figure all is fine. The problem is that when next layout
occurs, the figure,s bounds are recomputed using previous constraints by
the XYLayout manager. Since the translate method only modifies figure's
bounds and not associated constraints the figure comes back to its
initial location.

Does any body already encountered this problem and have suggestions?

Thanks


Manu


Re: Draw2d Figure Translation [message #229063 is a reply to message #228972] Mon, 15 January 2007 11:42 Go to previous messageGo to next message
Manuel Selva is currently offline Manuel SelvaFriend
Messages: 189
Registered: July 2009
Location: Grenoble, France
Senior Member
Does anyone use draw2d IFigure translation method ??

Re: Draw2d Figure Translation [message #229275 is a reply to message #228972] Wed, 17 January 2007 18:42 Go to previous messageGo to next message
Nhu Le is currently offline Nhu LeFriend
Messages: 47
Registered: July 2009
Member
I think you should set the layout constraint in the layout if you use
layout manager instead of modifying the figure coordinates directly.
The flow should really be model->layout manager constraint-> figure.

Nhu

Manu wrote:
> Hi all,
>
> Still questions concerning Draw2D (intensive use of this cool API ;0).
> My Draw2D chart needs translation. Figures are layed out using an XYLayout.
> When translating a figure and next call repaint on the parent of the
> translated figure all is fine. The problem is that when next layout
> occurs, the figure,s bounds are recomputed using previous constraints by
> the XYLayout manager. Since the translate method only modifies figure's
> bounds and not associated constraints the figure comes back to its
> initial location.
>
> Does any body already encountered this problem and have suggestions?
> Thanks
>
>
> Manu
>
Re: Draw2d Figure Translation [message #229298 is a reply to message #229275] Thu, 18 January 2007 08:33 Go to previous message
Manuel Selva is currently offline Manuel SelvaFriend
Messages: 189
Registered: July 2009
Location: Grenoble, France
Senior Member
Thanks, this is what i am doing.

Manu


Previous Topic:resizing when moving
Next Topic:How to start a GEF project in Eclispe
Goto Forum:
  


Current Time: Tue Oct 19 00:33:25 GMT 2021

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

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

Back to the top