How to add Legend to GEF Layer [message #199779] |
Wed, 19 October 2005 09:37 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03517 seconds