/** Returns the index of the arrow for modifying the range when the mouse click was * at such an arrow, otherwise -1 */ int getRangeArrowIndex(MouseEvent e) { ImageWindow win = imp.getWindow(); int rangeArrowIndex = -1; if (win instanceof PlotWindow) { int x = e.getX(); int y = e.getY(); rangeArrowIndex = ((PlotWindow)win).getRangeArrowIndex(x, y); } return rangeArrowIndex; } }
/** Returns the index of the arrow for modifying the range when the mouse click was * at such an arrow, otherwise -1 */ int getRangeArrowIndex(MouseEvent e) { ImageWindow win = imp.getWindow(); int rangeArrowIndex = -1; if (win instanceof PlotWindow) { int x = e.getX(); int y = e.getY(); rangeArrowIndex = ((PlotWindow)win).getRangeArrowIndex(x, y); } return rangeArrowIndex; } }
int i = getRangeArrowIndex(x, y); if (i >= 0) { //we have an arrow at cursor position
int i = getRangeArrowIndex(x, y); if (i >= 0) { //we have an arrow at cursor position