Вопрос

I am developing an eclipse plugin using Gef. I am creating a viewpart witch holds a canvas with my graph and everything I am drawing. Through mouse events on several figures I can get the click positions. Those positions are relevant to my viewpart. Is there anyway to get those positions/coordinates relevant to the whole eclipse window?

Thanks, Kyriakos

Это было полезно?

Решение

The example (How to place a Shell on top of a Figure) in the below article may help. There is a map() method on display that converts relative coordinates of a figure into the relative coordinates a holding control, such as the main shell

http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.draw2d.doc.isv/guide/coordinates.html

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top