edu.udo.cs.yale.gui
Class MessageViewerOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by edu.udo.cs.yale.gui.MessageViewerOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class MessageViewerOutputStream
extends java.io.OutputStream

A special output stream that appends all its incoming characters and perform necessary formatting.

Version:
$Id: MessageViewerOutputStream.java,v 2.1 2006/09/05 10:06:41 ingomierswa Exp $
Author:
Ingo Mierswa

Field Summary
private  javax.swing.text.SimpleAttributeSet attributeSet
           
private  int currentLineLength
           
private  char lastChar
           
private  java.lang.StringBuffer lastStyledText
           
private  java.util.LinkedList<java.lang.Integer> lineLengths
           
private  javax.swing.JTextPane textArea
           
 
Constructor Summary
MessageViewerOutputStream(javax.swing.JTextPane textArea)
           
 
Method Summary
private  void addTextToBuffer(java.lang.String text)
           
private  void addTextToViewer()
           
 void clear()
           
private  void evaluateCommand(java.lang.String style)
           
private  java.awt.Color getHighlightingColor(java.lang.String propertyName)
           
 void write(int b)
           
 
Methods inherited from class java.io.OutputStream
close, flush, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

textArea

private javax.swing.JTextPane textArea

currentLineLength

private int currentLineLength

lastChar

private char lastChar

attributeSet

private javax.swing.text.SimpleAttributeSet attributeSet

lineLengths

private java.util.LinkedList<java.lang.Integer> lineLengths

lastStyledText

private java.lang.StringBuffer lastStyledText
Constructor Detail

MessageViewerOutputStream

public MessageViewerOutputStream(javax.swing.JTextPane textArea)
Method Detail

addTextToBuffer

private void addTextToBuffer(java.lang.String text)

addTextToViewer

private void addTextToViewer()

write

public void write(int b)
Specified by:
write in class java.io.OutputStream

evaluateCommand

private void evaluateCommand(java.lang.String style)

clear

public void clear()

getHighlightingColor

private java.awt.Color getHighlightingColor(java.lang.String propertyName)


Copyright © 2001-2006