Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » GEF editor background image
GEF editor background image [message #244844] Mon, 11 August 2008 12:06 Go to next message
Eclipse UserFriend
Originally posted by: sumncc.gmail.com

Hi , every one. I have tried to set Background image on the editor by
modifying the paint method at Venueditpart(createfigur method). This
works fine but when I am drawing components I can not see them as the
layer has been over draw by the image.

Is there any way I can set the layer to the components or the anything
with image which will solve this problem.

Please..
Thanks.
RAJ
Re: GEF editor background image [message #244873 is a reply to message #244844] Tue, 12 August 2008 01:26 Go to previous message
Eclipse UserFriend
Originally posted by: lifesting.gmail.com

raj wrote:
> Hi , every one. I have tried to set Background image on the editor by
> modifying the paint method at Venueditpart(createfigur method). This
> works fine but when I am drawing components I can not see them as the
> layer has been over draw by the image.
>
> Is there any way I can set the layer to the components or the anything
> with image which will solve this problem.
>
> Please..
> Thanks.
> RAJ
Put the image on the last(bottom) layer which you need create, because
any layer above is transparent. e.g:

overwrite org.eclipse.gef.editparts.ScalableFreeformRootEditPart

protected ScalableFreeformLayeredPane createScaledLayers() {
ScalableFreeformLayeredPane pane = super.createScaledLayers();
pane.add(new BackgroundLayer(),"BACKGROUND_IMG");
return layers;
}

on EditPart:

public void addNotify() {
IFigure bg_figure = ...
getLayer("BACKGROUND_IMG").add(bg_figure);
super.addNotify();
}
Previous Topic:How to get the actual size of the Figure whose children can been added?
Next Topic:ZoomManager Looses Center
Goto Forum:
  


Current Time: Tue Mar 19 04:25:43 GMT 2024

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

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

Back to the top