X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FJalviewAppender.java;h=df19f7cbbf9047717b5dd9de3060fdaa70c2f819;hb=2241112eaf127ca3e6af08a2f4bc1864fcf21513;hp=8077e07fb5142b1fa4275eff1f4df6557bfea9d0;hpb=797df64fa2a0a30773d0f48f5494d4155e5a8be3;p=jalview.git diff --git a/src/jalview/gui/JalviewAppender.java b/src/jalview/gui/JalviewAppender.java index 8077e07..df19f7c 100644 --- a/src/jalview/gui/JalviewAppender.java +++ b/src/jalview/gui/JalviewAppender.java @@ -1,19 +1,22 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7) - * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * * Jalview is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - * + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * * Jalview is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along with Jalview. If not, see . + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. */ package jalview.gui; @@ -29,18 +32,18 @@ import org.apache.log4j.spi.LoggingEvent; */ public class JalviewAppender extends WriterAppender { - - static private JTextArea jTextArea = null; + JTextArea jTextArea = null; /** Set the target JTextArea for the logging information to appear. */ - static public void setTextArea(JTextArea jTextArea) + public void setTextArea(JTextArea jTextArea) { - JalviewAppender.jTextArea = jTextArea; + this.jTextArea = jTextArea; } /** * Format and then append the loggingEvent to the stored JTextArea. */ + @Override public void append(LoggingEvent loggingEvent) { final String message = this.layout.format(loggingEvent); @@ -48,6 +51,7 @@ public class JalviewAppender extends WriterAppender // Append formatted message to textarea using the Swing Thread. SwingUtilities.invokeLater(new Runnable() { + @Override public void run() { if (jTextArea != null)