kawa

Class MessageArea

Implemented Interfaces:
KeyListener, TextListener

public class MessageArea
extends TextArea
implements KeyListener, TextListener

Simple TextArea that always scrolls to the bottom. Also creates an out and err PrintWriter so that you can redirect stdout/stderr to these streams, using the System.setOut/setErr methods.

Field Summary

int
endMark
int
outputMark

Constructor Summary

MessageArea(QueueReader in)
simple TextArea that always scrolls to the bottom.

Method Summary

void
deleteOldText()
Delete old text, prior to line containing outputMark.
PrintWriter
getStderr()
PrintWriter
getStdout()
void
keyPressed(KeyEvent e)
void
keyReleased(KeyEvent e)
void
keyTyped(KeyEvent e)
void
textValueChanged(TextEvent e)
void
write(String str)

Field Details

endMark

public int endMark

outputMark

public int outputMark

Constructor Details

MessageArea

public MessageArea(QueueReader in)
simple TextArea that always scrolls to the bottom. Also creates an out and err PrintWriter so that you can redirect stdout/stderr to these streams, using the System.setOut/setErr methods.

Method Details

deleteOldText

public void deleteOldText()
Delete old text, prior to line containing outputMark.

getStderr

public PrintWriter getStderr()

getStdout

public PrintWriter getStdout()

keyPressed

public void keyPressed(KeyEvent e)

keyReleased

public void keyReleased(KeyEvent e)

keyTyped

public void keyTyped(KeyEvent e)

textValueChanged

public void textValueChanged(TextEvent e)

write

public void write(String str)