Write a line to the Log section of the GUI @param text the string to log @param color the color of the line
(final String text, final Color color)
| 1242 | * @param color the color of the line |
| 1243 | */ |
| 1244 | private void appendLog(final String text, final Color color) { |
| 1245 | SimpleAttributeSet sas = new SimpleAttributeSet(); |
| 1246 | StyleConstants.setForeground(sas, color); |
| 1247 | StyledDocument sd = logText.getStyledDocument(); |
| 1248 | try { |
| 1249 | synchronized (this) { |
| 1250 | sd.insertString(sd.getLength(), text + "\n", sas); |
| 1251 | } |
| 1252 | } catch (BadLocationException e) { |
| 1253 | LOGGER.warn(e.getMessage()); |
| 1254 | } |
| 1255 | |
| 1256 | logText.setCaretPosition(sd.getLength()); |
| 1257 | } |
| 1258 | |
| 1259 | /** |
| 1260 | * Write a line to the GUI log and the CLI log |
no outgoing calls
no test coverage detected