From 9e090ec2a5dca83883e7a61d8822cd09b02f3881 Mon Sep 17 00:00:00 2001 From: Ben Culkin Date: Tue, 20 Oct 2020 18:32:40 -0400 Subject: Move TextAreaOutputStream It seemed like it was more sensible to put this class in with the other IO related things, instead of in with the GUI stuff --- .../java/bjc/utils/gui/TextAreaOutputStream.java | 35 ---------------------- 1 file changed, 35 deletions(-) delete mode 100644 base/src/main/java/bjc/utils/gui/TextAreaOutputStream.java (limited to 'base/src/main/java/bjc/utils/gui') diff --git a/base/src/main/java/bjc/utils/gui/TextAreaOutputStream.java b/base/src/main/java/bjc/utils/gui/TextAreaOutputStream.java deleted file mode 100644 index fbc58ed..0000000 --- a/base/src/main/java/bjc/utils/gui/TextAreaOutputStream.java +++ /dev/null @@ -1,35 +0,0 @@ -package bjc.utils.gui; - -import java.io.IOException; -import java.io.OutputStream; - -import javax.swing.JTextArea; - -/** - * An output stream that prints to a JTextArea - * - * @author epr - * @author Levente S\u00e1ntha (lsantha@users.sourceforge.net) - */ -public class TextAreaOutputStream extends OutputStream { - private final JTextArea textArea; - - /** - * Create a new output stream attached to a textarea - * - * @param console - * The textarea to write to - */ - public TextAreaOutputStream(final JTextArea console) { - this.textArea = console; - } - - @Override - public void write(final int b) throws IOException { - textArea.append("" + (char) b); - - if (b == '\n') { - textArea.repaint(); - } - } -} -- cgit v1.2.3