MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / scroll

Method scroll

ij/src/main/java/ij/gui/PlotCanvas.java:246–260  ·  view source on GitHub ↗

overrides ImageCanvas.scroll; if plot is not frozen, scrolling modifies the plot data range

(int sx, int sy)

Source from the content-addressed store, hash-verified

244
245 /** overrides ImageCanvas.scroll; if plot is not frozen, scrolling modifies the plot data range */
246 protected void scroll(int sx, int sy) {
247 if (plot.isFrozen()) {
248 super.scroll(sx, sy);
249 return;
250 }
251 if (sx == 0 && sy == 0) return;
252 if (xScrolled == 0 && yScrolled == 0)
253 plot.saveMinMax();
254 int dx = sx - xMouseStart;
255 int dy = sy - yMouseStart;
256 plot.scroll(dx-xScrolled, dy-yScrolled);
257 xScrolled = dx;
258 yScrolled = dy;
259 Thread.yield();
260 }
261
262 /** overrides ImageCanvas.mouseExited; removes 'range' arrows */
263 public void mouseExited(MouseEvent e) {

Callers 1

mouseWheelMovedMethod · 0.45

Calls 2

saveMinMaxMethod · 0.80
isFrozenMethod · 0.45

Tested by

no test coverage detected