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

Method handleMouseUp

ij/src/main/java/ij/gui/TextRoi.java:476–493  ·  view source on GitHub ↗
(int screenX, int screenY)

Source from the content-addressed store, hash-verified

474 }
475
476 protected void handleMouseUp(int screenX, int screenY) {
477 super.handleMouseUp(screenX, screenY);
478 if (this.width<5 && this.height<5 && imp!=null && previousRoi==null) {
479 int ox = ic!=null?ic.offScreenX(screenX):screenX;
480 int oy = ic!=null?ic.offScreenY(screenY):screenY;
481 TextRoi roi = new TextRoi(ox, oy, line1a);
482 roi.setStrokeColor(Toolbar.getForegroundColor());
483 roi.firstChar = true;
484 imp.setRoi(roi);
485 return;
486 } else if (firstMouseUp) {
487 updateBounds();
488 updateText();
489 firstMouseUp = false;
490 }
491 if (this.width<5 || this.height<5)
492 imp.deleteRoi();
493 }
494
495 /** Increases the size of bounding rectangle so it's large enough to hold the text. */
496 private void updateBounds() {

Callers

nothing calls this directly

Calls 8

getForegroundColorMethod · 0.95
updateBoundsMethod · 0.95
updateTextMethod · 0.95
deleteRoiMethod · 0.80
offScreenXMethod · 0.45
offScreenYMethod · 0.45
setStrokeColorMethod · 0.45
setRoiMethod · 0.45

Tested by

no test coverage detected