How to find an object outside the visual area of a viewer [message #209733] |
Mon, 20 February 2006 13:35 |
Eclipse User |
|
|
|
Originally posted by: ralle.upb.de
Hi,
I want to get an EditPart Object by it's coordinates in a scrolling
graphical viewer. How can I get such an object if the viewer is scrolled and
the object is not in the visual part of the viewer.
I tried like this but the object cannot be found:
FigureCanvas figurecanvas = (FigureCanvas) this.viewer
.getControl();
if (figurecanvas.getHorizontalBar() != null)
{
barpositionX = figurecanvas.getHorizontalBar().getSelection();
}
if (figurecanvas.getVerticalBar() != null)
{
barpositionY = figurecanvas.getVerticalBar().getSelection();
}
Object found = this.viewer.findObjectAt(new Point
(x-barpositionX,y-barpositionY));
- x and y are the absolute coordinates of the object to find in my viewer -
Thanks,
Lutz
|
|
|
Powered by
FUDForum. Page generated in 0.03252 seconds