public CanvasEvent(final ImageCanvas canvas) { super(canvas.getDisplay()); this.canvas = canvas; }
/** Gets the coordinates in <em>data</em> space for the given (x, y) pixel coordinates. */ private RealCoords getDataCoords(final Display<?> d, final int x, final int y) { if (!(d instanceof ImageDisplay)) return null; final ImageDisplay imageDisplay = (ImageDisplay) d; final ImageCanvas canvas = imageDisplay.getCanvas(); return canvas.panelToDataCoords(new IntCoords(x, y)); }