Home » Eclipse Projects » GEF » adding layer
|
Re: adding layer [message #136327 is a reply to message #136055] |
Fri, 04 June 2004 20:06 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
Why can't your contents editpart just paint the image on its figure? You
could also add a layer, but then you need a "glass" primary layer so you can
see it. Do you want the image to scroll?
"Steven Melzer" <smelzer@paymentech.com> wrote in message
news:c9ns0b$3m5$1@eclipse.org...
> i wish to add a background graphic to my entire diagram.
>
> to do this, i figured i could add a new layer to the ScalableRootEditPart.
> i thought this would cause the least refresh of this graphic, and also
> have the benefit of not being part of the printed diagram since i can put
> the graphic on a layer below the PrintLayer.
>
> i do, however, need a way to update this graphic, so i also need a way to
> refresh the layer.
>
> is there a way to add a layer to the layer pane of the
> ScalableRootEditPart, or should i subclass it.
>
> i am currently using the 2.x code. if there is something in 3.0, i can
> upgrade.
>
> or am i completely barking up the wrong tree?
>
> thanks,
> steve
>
|
|
|
Re: adding layer [message #136390 is a reply to message #136327] |
Sat, 05 June 2004 02:27 |
steven melzer Messages: 17 Registered: July 2009 |
Junior Member |
|
|
i can easily add the image to the content edit part. i was just concerned
that the diagram (meaning my background image) may be redrawn when
children are redrawn which seemed like a lot of overhead.
as for the printing part, i assume i can draw the children on an offscreen
image and print the offscreen image, thus not printing the diagram
background image.
steve
Randy Hudson wrote:
> Why can't your contents editpart just paint the image on its figure? You
> could also add a layer, but then you need a "glass" primary layer so you can
> see it. Do you want the image to scroll?
> "Steven Melzer" <smelzer@paymentech.com> wrote in message
> news:c9ns0b$3m5$1@eclipse.org...
> > i wish to add a background graphic to my entire diagram.
> >
> > to do this, i figured i could add a new layer to the ScalableRootEditPart.
> > i thought this would cause the least refresh of this graphic, and also
> > have the benefit of not being part of the printed diagram since i can put
> > the graphic on a layer below the PrintLayer.
> >
> > i do, however, need a way to update this graphic, so i also need a way to
> > refresh the layer.
> >
> > is there a way to add a layer to the layer pane of the
> > ScalableRootEditPart, or should i subclass it.
> >
> > i am currently using the 2.x code. if there is something in 3.0, i can
> > upgrade.
> >
> > or am i completely barking up the wrong tree?
> >
> > thanks,
> > steve
> >
|
|
|
Re: adding layer [message #136713 is a reply to message #136390] |
Mon, 07 June 2004 14:49 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
You can also just set a flag termporarily on your contents figure telling it
not to draw its background image.
"steven melzer" <steven.melzer@verizon.net> wrote in message
news:c9rb1r$v57$1@eclipse.org...
> i can easily add the image to the content edit part. i was just concerned
> that the diagram (meaning my background image) may be redrawn when
> children are redrawn which seemed like a lot of overhead.
>
> as for the printing part, i assume i can draw the children on an offscreen
> image and print the offscreen image, thus not printing the diagram
> background image.
>
> steve
>
> Randy Hudson wrote:
>
> > Why can't your contents editpart just paint the image on its figure?
You
> > could also add a layer, but then you need a "glass" primary layer so you
can
> > see it. Do you want the image to scroll?
>
> > "Steven Melzer" <smelzer@paymentech.com> wrote in message
> > news:c9ns0b$3m5$1@eclipse.org...
> > > i wish to add a background graphic to my entire diagram.
> > >
> > > to do this, i figured i could add a new layer to the
ScalableRootEditPart.
> > > i thought this would cause the least refresh of this graphic, and
also
> > > have the benefit of not being part of the printed diagram since i can
put
> > > the graphic on a layer below the PrintLayer.
> > >
> > > i do, however, need a way to update this graphic, so i also need a way
to
> > > refresh the layer.
> > >
> > > is there a way to add a layer to the layer pane of the
> > > ScalableRootEditPart, or should i subclass it.
> > >
> > > i am currently using the 2.x code. if there is something in 3.0, i
can
> > > upgrade.
> > >
> > > or am i completely barking up the wrong tree?
> > >
> > > thanks,
> > > steve
> > >
>
>
|
|
|
Re: adding layer [message #137789 is a reply to message #136713] |
Fri, 11 June 2004 12:39 |
steven melzer Messages: 38 Registered: July 2009 |
Member |
|
|
in the end i decided to add a new layer because i wanted the grid to
appear on top of the image, not behind it (and i was curious to try it).
i subclassed ScalableRootEditPart to add an additional layer to the
ScaledLayer and changed createGridLayer to create my subclass of
GridLayer, and it works very well. it was actually pretty easy.
i now have a white, shadowed "page" and a colored background, and the grid
only shows in the page, not the whole view.
thanks,
steve
> Randy Hudson wrote:
> You can also just set a flag termporarily on your contents figure telling it
> not to draw its background image.
> "steven melzer" <steven.melzer@verizon.net> wrote in message
> news:c9rb1r$v57$1@eclipse.org...
> > i can easily add the image to the content edit part. i was just concerned
> > that the diagram (meaning my background image) may be redrawn when
> > children are redrawn which seemed like a lot of overhead.
> >
> > as for the printing part, i assume i can draw the children on an offscreen
> > image and print the offscreen image, thus not printing the diagram
> > background image.
> >
> > steve
> >
> > Randy Hudson wrote:
> >
> > > Why can't your contents editpart just paint the image on its figure?
> You
> > > could also add a layer, but then you need a "glass" primary layer so you
> can
> > > see it. Do you want the image to scroll?
> >
> > > "Steven Melzer" <smelzer@paymentech.com> wrote in message
> > > news:c9ns0b$3m5$1@eclipse.org...
> > > > i wish to add a background graphic to my entire diagram.
> > > >
> > > > to do this, i figured i could add a new layer to the
> ScalableRootEditPart.
> > > > i thought this would cause the least refresh of this graphic, and
> also
> > > > have the benefit of not being part of the printed diagram since i can
> put
> > > > the graphic on a layer below the PrintLayer.
> > > >
> > > > i do, however, need a way to update this graphic, so i also need a way
> to
> > > > refresh the layer.
> > > >
> > > > is there a way to add a layer to the layer pane of the
> > > > ScalableRootEditPart, or should i subclass it.
> > > >
> > > > i am currently using the 2.x code. if there is something in 3.0, i
> can
> > > > upgrade.
> > > >
> > > > or am i completely barking up the wrong tree?
> > > >
> > > > thanks,
> > > > steve
> > > >
> >
> >
|
|
|
Goto Forum:
Current Time: Thu Apr 25 18:55:23 GMT 2024
Powered by FUDForum. Page generated in 0.03014 seconds
|