Non printable layer and Outline Overview [message #162206] |
Mon, 20 December 2004 16:09 |
Eclipse User |
|
|
|
Originally posted by: alain.origlia.impika.com
Hi all,
In my graphic editor, I added a layer (BackgroundLayer) which displays a
background behind the GEF grid layer. This layer is considered as a kind of
guide layer used to help the user to set figures into the diagram. This
layer is scaled correctly when the zoom is activated and everything works
fine :o)
Now, I want to get an overview of the figures in the Outline view of the
platform. I saw in the logic example that only the printable layer is
displayed in the overview. I would like to have both the printable layer and
my BackgroundLayer be displayed in the overview.
Can someone tell me how to do?
Thanks,
Alain
|
|
|
|
Re: Non printable layer and Outline Overview [message #162351 is a reply to message #162277] |
Tue, 21 December 2004 14:24 |
Eclipse User |
|
|
|
Originally posted by: alain.origlia.impika.com
Thanks for your answer.
It is something I've already tried. The problem is that if I add the
background layer and the printable layers in a new layered pane which will
be used as the source of the overview, these layers are removed from their
previous parents and I cannot see the printable layers displayed in the
editor any more.
A workaround should be to set the source of the overview as the scalable
layers. But with this method the grid is also displayed in the overview and
it is something that I don't want.
Here is my root:
public class ScalableFreeformRootEditPartWithBackground extends
ScalableFreeformRootEditPart {
protected ScalableFreeformLayeredPane createScaledLayers() {
ScalableFreeformLayeredPane layers = super.createScaledLayers();
FreeformLayer layer = new FreeformLayer();
layers.addLayerBefore(layer, IMyConstants.BACKGROUND_LAYER,
LayerConstants.GRID_LAYER);
return layers;
}
public FreeformLayeredPane getOverviewLayer() {
FreeformLayeredPane layeredPane = new FreeformLayeredPane();
layeredPane.add(getLayer(IMyConstants.BACKGROUND_LAYER));
layeredPane.add(getPrintableLayers());
return layeredPane;
}
}
and the setting of the source:
(...)
thumbnail.setSource(((ScalableFreeformRootEditPartWithBackgr ound)root).getOv
erviewLayer());
(...)
Am I right?
Thanks
"Pratik Shah" <ppshah@us.ibm.com> a
|
|
|
|
Re: Non printable layer and Outline Overview [message #162394 is a reply to message #162359] |
Tue, 21 December 2004 16:47 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
It sounds like you have a layer between 3 other layers (background, primary,
and connections), that you don't want to be printed. But, you want these
other 3 to appear in the overview. I would make all 4 layers part of the
printable layered pane, and when printing, set the grid layer to invisible
temporarily.
"Alain Origlia" <alain.origlia@impika.com> wrote in message
news:cq9cj7$lor$1@www.eclipse.org...
> Hmm... no the workaround I described previously does not work when the
zoom
> is activated. So... :o(
>
> "Alain Origlia" <alain.origlia@impika.com> a
|
|
|
Re: Non printable layer and Outline Overview [message #162404 is a reply to message #162394] |
Tue, 21 December 2004 18:02 |
Eclipse User |
|
|
|
Originally posted by: alain.origlia.impika.com
Not exactly. In fact, I want to see in the editor:
My background layer, then the grid layer (I want the background to be behind
the grid) and then the primary and connections
And in the outline overview:
the background layer and the primary and connections but not the grid
(because it makes lots of noise and the overview becomes unreadable).
If I understand your suggestion, I would set the grid layer invisible in the
overview. But how to do this without making the grid layer be invisible in
the editor too? Is it possible?
Thanks
"Randy Hudson" <none@us.ibm.com> a
|
|
|
Re: Non printable layer and Outline Overview [message #162564 is a reply to message #162404] |
Wed, 22 December 2004 15:39 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
"Alain Origlia" <alain.origlia@impika.com> wrote in message
news:cq9oai$h2$1@www.eclipse.org...
> Not exactly. In fact, I want to see in the editor:
> My background layer, then the grid layer (I want the background to be
behind
> the grid) and then the primary and connections
>
> And in the outline overview:
> the background layer and the primary and connections but not the grid
> (because it makes lots of noise and the overview becomes unreadable).
>
> If I understand your suggestion, I would set the grid layer invisible in
the
> overview. But how to do this without making the grid layer be invisible in
> the editor too? Is it possible?
Probably not. Toggling the visibility would cause endless repaints. I'm
out of ideas. You might have to create some mediator figure which has
references to the layers you want painted, and paints them. But I'm not
sure how that mediator could be made to behave in a normal way required by
the thumbnail.
>
> Thanks
>
> "Randy Hudson" <none@us.ibm.com> a
|
|
|
|
Powered by
FUDForum. Page generated in 0.03531 seconds