(int screenX, int screenY)
| 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() { |
nothing calls this directly
no test coverage detected