Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to add Legend to GEF Layer
How to add Legend to GEF Layer [message #199779] Wed, 19 October 2005 09:37 Go to next message
Eclipse UserFriend
Originally posted by: umarao.progress.com

Hi,

I would like to add a legend to my figure. The requirement is like the
legend should not move even when we scroll. I am searching for a layer
which stays static and does not move on scroll.

thanks,
Uma Mahesh
Re: How to add Legend to GEF Layer [message #199857 is a reply to message #199779] Wed, 19 October 2005 18:25 Go to previous message
Eclipse UserFriend
Originally posted by: sunil_kamath.nohotspammail.com

Uma Mahesh <umarao@progress.com> wrote:
> Hi,
>
> I would like to add a legend to my figure. The requirement is like
> the legend should not move even when we scroll. I am searching for a
> layer which stays static and does not move on scroll.
>
Create a legend layer and add your legend figure to it.
Then let the legend figure listen for viewport changes and move itself
accordingly.

Viewport viewPort =
((FigureCanvas)graphicalViewer.getControl()).getViewport();
viewPort.addPropertyChangeListener(new PropertyChangeListener()
{
public void propertyChange(PropertyChangeEvent evt)
{
if(evt.getPropertyName().equals(Viewport.PROPERTY_VIEW_LOCAT ION))
{
//Do your thing here
}
}
});


--
Sunil
Previous Topic:Drag and drop an EditPart
Next Topic:Retrieve Graphics clipping region
Goto Forum:
  


Current Time: Thu Dec 12 12:03:55 GMT 2024

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

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

Back to the top