X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FJalviewAppender.java;h=c1140a1dc3b4469316cc5904be5bcc9d568af145;hb=2b08c849bd54a0799ddf251f602a421d4696005e;hp=99aa5b899607d6b53fdbf59075b6de03b6168960;hpb=17e77c3f2949a0729322b4a8d907f3f34b6a9914;p=jalview.git diff --git a/src/jalview/gui/JalviewAppender.java b/src/jalview/gui/JalviewAppender.java index 99aa5b8..c1140a1 100644 --- a/src/jalview/gui/JalviewAppender.java +++ b/src/jalview/gui/JalviewAppender.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9) - * Copyright (C) 2015 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -33,17 +33,20 @@ import org.apache.log4j.spi.LoggingEvent; public class JalviewAppender extends WriterAppender { - static private JTextArea jTextArea = null; + // BH 2019 was static + + private 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); @@ -51,6 +54,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)