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

Method saveText

ij/src/main/java/ij/plugin/TextWriter.java:17–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15 }
16
17 void saveText() {
18 Frame frame = WindowManager.getFrontWindow();
19 if (frame!=null && (frame instanceof TextWindow)) {
20 TextPanel tp = ((TextWindow)frame).getTextPanel();
21 tp.saveAs("");
22 } else if (frame!=null && (frame instanceof Editor)) {
23 Editor ed = (Editor)frame;
24 ed.saveAs();
25 } else {
26 IJ.error("Save As Text",
27 "This command requires a TextWindow, such\n"
28 + "as the \"Log\" window, or an Editor window. Use\n"
29 + "File>Save>Text Image to save an image as text.");
30 }
31 }
32
33}
34

Callers 1

runMethod · 0.95

Calls 5

getFrontWindowMethod · 0.95
saveAsMethod · 0.95
saveAsMethod · 0.95
errorMethod · 0.95
getTextPanelMethod · 0.45

Tested by

no test coverage detected