(String text)
| 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; |
no test coverage detected