com.bluemarsh.jswat.ui
Class GraphicalMessageAdapter

java.lang.Object
  |
  +--com.bluemarsh.jswat.ui.GraphicalMessageAdapter

public class GraphicalMessageAdapter
extends java.lang.Object

Class MessageAdapter builds and maintains the text area for displaying the contents of the status log.

Author:
Nathan Fiedler

Field Summary
protected  com.bluemarsh.jswat.ui.ReaderToTextArea logReader
          Our message reader which reads from the PipedWriter.
protected  java.io.PipedWriter logWriter
          Piped writer from which we receive log messages.
protected  com.bluemarsh.jswat.ui.FancyTextArea messageArea
          Text area displaying the status log contents.
protected  javax.swing.JScrollPane messageAreaScroller
          Scroll pane for the messages area.
 
Constructor Summary
GraphicalMessageAdapter()
          Constructs a GraphicalMessageAdapter.
 
Method Summary
 void destroy(Log log)
          Destroys the user interface.
 javax.swing.JComponent getUI()
          Returns the message area widget.
 void init(Log log)
          Attach to the given log object in order to receive messages from it.
 void setMaxLineCount(int count)
          Sets the maximum number of lines to be shown in this panel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

messageArea

protected com.bluemarsh.jswat.ui.FancyTextArea messageArea
Text area displaying the status log contents.

messageAreaScroller

protected javax.swing.JScrollPane messageAreaScroller
Scroll pane for the messages area.

logWriter

protected java.io.PipedWriter logWriter
Piped writer from which we receive log messages.

logReader

protected com.bluemarsh.jswat.ui.ReaderToTextArea logReader
Our message reader which reads from the PipedWriter.
Constructor Detail

GraphicalMessageAdapter

public GraphicalMessageAdapter()
Constructs a GraphicalMessageAdapter.
Method Detail

destroy

public void destroy(Log log)
Destroys the user interface.
Parameters:
log - status log to detach from.

getUI

public javax.swing.JComponent getUI()
Returns the message area widget.
Returns:
message area widget.

init

public void init(Log log)
Attach to the given log object in order to receive messages from it. As messages are written to the log, they will be echoed to the text area.
Parameters:
log - status log to attach to.

setMaxLineCount

public void setMaxLineCount(int count)
Sets the maximum number of lines to be shown in this panel.
Parameters:
count - maximum number of lines to show.