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

Method setText

ij/src/main/java/ij/gui/TextRoi.java:647–664  ·  view source on GitHub ↗
(String text)

Source from the content-addressed store, hash-verified

645 }
646
647 public void setText(String text) {
648 String[] lines = Tools.split(text, "\n");
649 boolean changes = false;
650 for (int i=0; i<Math.min(lines.length, theText.length-1); i++) {
651 if (!lines[i].equals(theText[i])) {
652 theText[i] = lines[i];
653 changes = true;
654 }
655 }
656 if (lines.length < theText.length && theText[lines.length] != null) {
657 theText[lines.length] = null;
658 changes = true;
659 }
660 if (changes) {
661 firstChar = false;
662 updateBounds();
663 }
664 }
665
666 public boolean isDrawingTool() {
667 return true;

Callers 15

showDialogMethod · 0.95
showStatusMethod · 0.45
handleEditorCommandMethod · 0.45
dialogItemChangedMethod · 0.45
itemStateChangedMethod · 0.45
runMethod · 0.45
showDialogMethod · 0.45
dialogItemChangedMethod · 0.45
actionPerformedMethod · 0.45
openMethod · 0.45
updateFieldsMethod · 0.45
actionPerformedMethod · 0.45

Calls 4

splitMethod · 0.95
updateBoundsMethod · 0.95
minMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected