Adds a single line to the end of this TextPanel.
(String text)
| 223 | |
| 224 | /** Adds a single line to the end of this TextPanel. */ |
| 225 | public void appendLine(String text) { |
| 226 | if (vData==null) |
| 227 | setColumnHeadings(""); |
| 228 | char[] chars = text.toCharArray(); |
| 229 | vData.addElement(chars); |
| 230 | iRowCount++; |
| 231 | if (isShowing()) { |
| 232 | if (iColCount==1 && tc.fMetrics!=null) { |
| 233 | iColWidth[0] = Math.max(iColWidth[0], tc.fMetrics.charsWidth(chars,0,chars.length)); |
| 234 | adjustHScroll(); |
| 235 | } |
| 236 | updateDisplay(); |
| 237 | unsavedLines = true; |
| 238 | } |
| 239 | } |
| 240 | |
| 241 | /** Adds one or more lines to the end of this TextPanel. */ |
| 242 | public void append(String text) { |
no test coverage detected