GEF editor background image [message #244844] |
Mon, 11 August 2008 12:06 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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();
}
|
|
|
Powered by
FUDForum. Page generated in 0.03439 seconds