Skip to main content



      Home
Home » Eclipse Projects » GEF » setBackgroundImage with GraphicalViewer
setBackgroundImage with GraphicalViewer [message #212351] Wed, 22 March 2006 05:59 Go to next message
Eclipse UserFriend
Hi,
In Eclipse 3.2, we can access to the setBackgroundImage method when
getting control of a graphical viewer.
-Can we use this method in this case?
-If yes, how to implement this method in the configureGraphicalViewer()
method.

Thanks,
Brice
Re: setBackgroundImage with GraphicalViewer [message #212677 is a reply to message #212351] Tue, 28 March 2006 09:19 Go to previous messageGo to next message
Eclipse UserFriend
Not sure which class owns this api you are referring to (for
setBackgroundImage). However, there are couple options available. When
creating the GraphicalViewer you could have your own subclass that overrides
createControl to initialize the swt canvas differently.

Alternatively, in the draw2d world, the figure for your diagram edit part
could draw a background image.

-Steve

"Brice" <brice.carnus@m1i.fr> wrote in message
news:dvramv$gfc$1@utils.eclipse.org...
> Hi,
> In Eclipse 3.2, we can access to the setBackgroundImage method when
> getting control of a graphical viewer.
> -Can we use this method in this case?
> -If yes, how to implement this method in the configureGraphicalViewer()
> method.
>
> Thanks,
> Brice
Re: setBackgroundImage with GraphicalViewer [message #212797 is a reply to message #212677] Wed, 29 March 2006 06:40 Go to previous message
Eclipse UserFriend
Thanks Steve,

I think that setBackgroundImage() is provided by the SWT API. Indeed,
you can apply this method on a swt widget.
I try to override createControl but this have no effect!(I drew an image
on my FigureCanvas)

So I added a layer (like the grid layer) to my edit part and I paint my
image on it. And it works.

thanks,

Brice

Steven Shaw a écrit :
> Not sure which class owns this api you are referring to (for
> setBackgroundImage). However, there are couple options available. When
> creating the GraphicalViewer you could have your own subclass that overrides
> createControl to initialize the swt canvas differently.
>
> Alternatively, in the draw2d world, the figure for your diagram edit part
> could draw a background image.
>
> -Steve
>
> "Brice" <brice.carnus@m1i.fr> wrote in message
> news:dvramv$gfc$1@utils.eclipse.org...
>> Hi,
>> In Eclipse 3.2, we can access to the setBackgroundImage method when
>> getting control of a graphical viewer.
>> -Can we use this method in this case?
>> -If yes, how to implement this method in the configureGraphicalViewer()
>> method.
>>
>> Thanks,
>> Brice
>
>
Previous Topic:Scaling the Models
Next Topic:How to handle menus on IEditorPart
Goto Forum:
  


Current Time: Tue Jul 08 20:42:42 EDT 2025

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

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

Back to the top