Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » setBackgroundImage with GraphicalViewer
setBackgroundImage with GraphicalViewer [message #212351] Wed, 22 March 2006 10:59 Go to next message
Brice is currently offline BriceFriend
Messages: 3
Registered: July 2009
Junior Member
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 14:19 Go to previous messageGo to next message
Steven R. Shaw is currently offline Steven R. ShawFriend
Messages: 128
Registered: July 2009
Senior Member
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 11:40 Go to previous message
Brice is currently offline BriceFriend
Messages: 3
Registered: July 2009
Junior Member
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: Sat Apr 20 07:40:05 GMT 2024

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

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

Back to the top