()
| 382 | } |
| 383 | |
| 384 | boolean saveContents() { |
| 385 | int lineCount = textPanel.getLineCount(); |
| 386 | if (!textPanel.unsavedLines) lineCount = 0; |
| 387 | ImageJ ij = IJ.getInstance(); |
| 388 | boolean macro = IJ.macroRunning() || Interpreter.isBatchMode(); |
| 389 | boolean isResults = getTitle().contains("Results"); |
| 390 | if (lineCount>0 && !macro && ij!=null && !ij.quitting() && isResults) { |
| 391 | YesNoCancelDialog d = new YesNoCancelDialog(this, getTitle(), "Save "+lineCount+" measurements?"); |
| 392 | if (d.cancelPressed()) |
| 393 | return false; |
| 394 | else if (d.yesPressed()) { |
| 395 | if (!textPanel.saveAs("")) |
| 396 | return false; |
| 397 | } |
| 398 | } |
| 399 | textPanel.rt.reset(); |
| 400 | return true; |
| 401 | } |
| 402 | |
| 403 | void changeFontSize(boolean larger) { |
| 404 | int in = fontSize; |
no test coverage detected