(String message)
| 1381 | |
| 1382 | |
| 1383 | static public String formatMessage(String message) { |
| 1384 | String monoName = "Monospaced"; |
| 1385 | try { |
| 1386 | monoName = Toolkit.getMonoFontName(); |
| 1387 | } catch (Exception ignored) { } |
| 1388 | |
| 1389 | // Necessary to replace \n with <br/> (even if pre) otherwise Java |
| 1390 | // treats it as a closed tag and reverts to plain formatting. |
| 1391 | return "<html> " + |
| 1392 | "<head> <style type=\"text/css\">" + |
| 1393 | // if smaller than 12 pt, Source Code Sans doesn't get hinted |
| 1394 | // (not clear if that's a font or Java issue) [fry 220803] |
| 1395 | "tt { font: 12pt \"" + monoName + "\"; color: #888; }" + |
| 1396 | "</style> </head>" + |
| 1397 | message.replaceAll("\n", "<br/>"); |
| 1398 | } |
| 1399 | |
| 1400 | |
| 1401 | static public String formatMessage(String primary, String secondary) { |
no test coverage detected