public void setOption(String option, String value) { if (option.equalsIgnoreCase(COLOR_OPTION_FATAL)) logTextPanel.setTextColor(Priority.FATAL, value); if (option.equalsIgnoreCase(COLOR_OPTION_ERROR)) logTextPanel.setTextColor(Priority.ERROR, value); if (option.equalsIgnoreCase(COLOR_OPTION_WARN)) logTextPanel.setTextColor(Priority.WARN, value); if (option.equalsIgnoreCase(COLOR_OPTION_INFO)) logTextPanel.setTextColor(Priority.INFO, value); if (option.equalsIgnoreCase(COLOR_OPTION_DEBUG)) logTextPanel.setTextColor(Priority.DEBUG, value); if (option.equalsIgnoreCase(COLOR_OPTION_BACKGROUND)) logTextPanel.setTextBackground(value); if (option.equalsIgnoreCase(FONT_SIZE_OPTION)) logTextPanel.setTextFontSize(Integer.parseInt(value)); if (option.equalsIgnoreCase(FONT_NAME_OPTION)) logTextPanel.setTextFontName(value); if (option.equalsIgnoreCase(EVENT_BUFFER_SIZE_OPTION)) logTextPanel.setEventBufferSize(Integer.parseInt(value)); return; }
public void run() { while (true) { synchronized (evts) { try { evts.wait(pubInterval); } catch (InterruptedException e) { } logTextPanel.newEvents( (EventBufferElement[]) evts.toArray(new EventBufferElement[evts.size()])); evts.clear(); } } }
protected void setLogTextPanel(LogTextPanel logTextPanel) { this.logTextPanel = logTextPanel; logTextPanel.setTextBackground(Color.white); }