|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.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.
| 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 |
|---|
private Document document
private boolean isAppend
private DocumentListener limitLinesListener
private JTextComponent textComponent
| Constructor Detail |
|---|
public MessageConsole(JTextComponent textComponent)
public MessageConsole(JTextComponent textComponent, boolean isAppend)
| Method Detail |
|---|
public void redirectErr()
public void redirectErr(Color textColor, PrintStream printStream)
public void redirectOut()
public void redirectOut(Color textColor, PrintStream printStream)
public void setMessageLines(int lines)
Groovy Documentation