Groovy Documentation

com.wordpress.tipsforjava.swing
[Java] Class MessageConsole

java.lang.Object
  com.wordpress.tipsforjava.swing.MessageConsole

public class MessageConsole
extends Object

Create a simple console to display text messages. Messages can be directed here from different sources. Each source can have its messages displayed in a different color. Messages can either be appended to the console or inserted as the first line of the console You can limit the number of lines to hold in the Document.

Authors:
Rob Camick
Darryl Burke


Nested Class Summary
class MessageConsole.ConsoleOutputStream

 
Field Summary
private Document document

private boolean isAppend

private DocumentListener limitLinesListener

private JTextComponent textComponent

 
Constructor Summary
MessageConsole(JTextComponent textComponent)

MessageConsole(JTextComponent textComponent, boolean isAppend)

 
Method Summary
void redirectErr()

void redirectErr(Color textColor, PrintStream printStream)

void redirectOut()

void redirectOut(Color textColor, PrintStream printStream)

void setMessageLines(int lines)

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Field Detail

document

private Document document


isAppend

private boolean isAppend


limitLinesListener

private DocumentListener limitLinesListener


textComponent

private JTextComponent textComponent


 
Constructor Detail

MessageConsole

public MessageConsole(JTextComponent textComponent)


MessageConsole

public MessageConsole(JTextComponent textComponent, boolean isAppend)


 
Method Detail

redirectErr

public void redirectErr()


redirectErr

public void redirectErr(Color textColor, PrintStream printStream)


redirectOut

public void redirectOut()


redirectOut

public void redirectOut(Color textColor, PrintStream printStream)


setMessageLines

public void setMessageLines(int lines)


 

Groovy Documentation