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

Method run

ij/src/main/java/ij/gui/ImageCanvas.java:1293–1312  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1291 final Point cursorLoc = getCursorLoc();
1292 pressTimer.schedule(new TimerTask() {
1293 public void run() {
1294 if (pressTimer != null) {
1295 pressTimer.cancel();
1296 pressTimer = null;
1297 }
1298 Roi roi2 = imp.getRoi();
1299 int size2 = roi2!=null?roi2.size():0;
1300 Rectangle r2 = roi2!=null?roi2.getBounds():null;
1301 boolean empty = r2!=null&&r2.width==0&&r2.height==0;
1302 int state = roi2!=null?roi2.getState():-1;
1303 boolean unchanged = state!=Roi.MOVING_HANDLE && r1!=null && r2!=null && r2.x==r1.x
1304 && r2.y==r1.y && r2.width==r1.width && r2.height==r1.height && size2==size1
1305 && !(size2>1&&state==Roi.CONSTRUCTING);
1306 boolean cursorMoved = !getCursorLoc().equals(cursorLoc);
1307 if ((roi1==null && (size2<=1||empty)) || unchanged) {
1308 if (roi1==null) imp.deleteRoi();
1309 if (!cursorMoved && Toolbar.getToolId()!=Toolbar.HAND)
1310 handlePopupMenu(e);
1311 }
1312 }
1313 }, longClickDelay);
1314 }
1315

Callers

nothing calls this directly

Calls 10

sizeMethod · 0.95
getBoundsMethod · 0.95
getStateMethod · 0.95
getCursorLocMethod · 0.95
getToolIdMethod · 0.95
handlePopupMenuMethod · 0.95
deleteRoiMethod · 0.80
cancelMethod · 0.45
getRoiMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected