How to get editor bounds? [message #231738] |
Fri, 16 March 2007 12:10 |
Eclipse User |
|
|
|
Originally posted by: michele.l.evinco.it
is possible to get the editor bounds to write a figure with the same
bounds of the editor?
I've tryed with
Rectangle rectangle =(GraphicalEditPart)getRoot()).getFigure().getBounds();
inside the method createFigure of my EditPart
but the rectangle have x,y,width,height set to 0!
any suggestions?
Thanks
Michele
|
|
|
|
Re: How to get editor bounds? [message #231771 is a reply to message #231755] |
Fri, 16 March 2007 13:59 |
Eclipse User |
|
|
|
Originally posted by: michele.l.evinco.it
Hi Anthony,
I must do this in createFigures because i create an image from a raster
and i must generate the image by passing width and height i've try
casting to ScalableRootEditPart but the result is the same! always 0!
Anthony Hunter wrote:
> Hi Michele
>
> I can get the bounds correctly when casting to ScalableRootEditPart.
>
> You can set the layout constraint in refreshVisuals() in your node EditPart.
>
> Cheers...
> Anthony
>
> "michele" <michele.l@evinco.it> wrote in message
> news:ete1ep$9p1$1@utils.eclipse.org...
>
>>is possible to get the editor bounds to write a figure with the same
>>bounds of the editor?
>>
>>I've tryed with
>>Rectangle rectangle
>>=(GraphicalEditPart)getRoot()).getFigure().getBounds();
>>
>>inside the method createFigure of my EditPart
>>
>>but the rectangle have x,y,width,height set to 0!
>>
>>any suggestions?
>>
>>Thanks
>>Michele
>
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.04593 seconds