Shows the log when it is invoked from the event queue.
()
| 309 | * Shows the log when it is invoked from the event queue. |
| 310 | */ |
| 311 | public static JFrame showLog() { |
| 312 | if (useMessageFrame()) { |
| 313 | return org.opensourcephysics.controls.MessageFrame.showLog(true); |
| 314 | } |
| 315 | getOSPLog().setVisible(true); |
| 316 | Logger logger = OSPLOG.getLogger(); |
| 317 | for(int i = 0, n = messageStorage.length; i<n; i++) { |
| 318 | LogRecord record = messageStorage[(i+messageIndex)%n]; |
| 319 | if(record!=null) { |
| 320 | logger.log(record); |
| 321 | } |
| 322 | } |
| 323 | messageIndex = 0; |
| 324 | return getOSPLog().frame; |
| 325 | } |
| 326 | |
| 327 | /** |
| 328 | * Shows the log. |
no test coverage detected