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

Method saveContents

ij/src/main/java/ij/text/TextWindow.java:384–401  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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;

Callers 1

closeMethod · 0.95

Calls 11

getInstanceMethod · 0.95
macroRunningMethod · 0.95
isBatchModeMethod · 0.95
quittingMethod · 0.95
cancelPressedMethod · 0.95
yesPressedMethod · 0.95
getTitleMethod · 0.65
resetMethod · 0.65
getLineCountMethod · 0.45
containsMethod · 0.45
saveAsMethod · 0.45

Tested by

no test coverage detected