com.ryanm.logging.gui
Class LogTerminal

java.lang.Object
  extended by com.ryanm.logging.AbstractSink
      extended by com.ryanm.logging.StringSink
          extended by com.ryanm.logging.gui.LogTerminal
All Implemented Interfaces:
Configurable, LogSink

public class LogTerminal
extends StringSink

A String sink that prints its output to a JTextArea

Author:
ryanm

Nested Class Summary
 
Nested classes/interfaces inherited from class com.ryanm.logging.StringSink
StringSink.StringSinkConfigurator
 
Constructor Summary
LogTerminal(java.lang.String title)
          Constructs a new LogTerminal
 
Method Summary
 javax.swing.JComponent getTerminal()
          Gets the JTextArea that this sink will print to
protected  void writeString(java.lang.String s)
          This should be overridden to write the supplied string to wherever, stdOut, a file, something like that.
 
Methods inherited from class com.ryanm.logging.StringSink
getConfigurator, log
 
Methods inherited from class com.ryanm.logging.AbstractSink
addSinkListener, getTitle, notifyListeners, removeSinkListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogTerminal

public LogTerminal(java.lang.String title)
Constructs a new LogTerminal

Parameters:
title - The title for the sink
Method Detail

getTerminal

public javax.swing.JComponent getTerminal()
Gets the JTextArea that this sink will print to

Returns:
The output panel

writeString

protected void writeString(java.lang.String s)
Description copied from class: StringSink
This should be overridden to write the supplied string to wherever, stdOut, a file, something like that.

Specified by:
writeString in class StringSink
Parameters:
s - The String to write