Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Non printable layer and Outline Overview
Non printable layer and Outline Overview [message #162206] Mon, 20 December 2004 16:09 Go to next message
Eclipse UserFriend
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 #162277 is a reply to message #162206] Mon, 20 December 2004 22:15 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
You'd have to set up the Figure structure such that the background layer and
the layered pane containing the printable layers would have the same parent
figure (and they would be the only children of that parent figure). The
parent figure would, of course, have to be a layered pane. Then you can set
that parent figure as the source of the overview (as is done in
LogicEditor.OutlinePage#initializeOverview()).

"Alain Origlia" <alain.origlia@impika.com> wrote in message
news:cq6tb4$rr2$1@www.eclipse.org...
> 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 Go to previous messageGo to next message
Eclipse UserFriend
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 #162359 is a reply to message #162351] Tue, 21 December 2004 14:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alain.origlia.impika.com

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 #162394 is a reply to message #162359] Tue, 21 December 2004 16:47 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Non printable layer and Outline Overview [message #162664 is a reply to message #162564] Thu, 23 December 2004 08:57 Go to previous message
Eclipse UserFriend
Originally posted by: alain.origlia.impika.com

Ok. Thank you everybody for your answers.

"Randy Hudson" <none@us.ibm.com> a
Previous Topic:how to set the rooteditpart's size.
Next Topic:When getCreateCommand() will be called?
Goto Forum:
  


Current Time: Sat Apr 27 02:47:17 GMT 2024

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

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

Back to the top