com.lowagie.rups.view
public class Console extends java.lang.Object implements java.util.Observer
Modifier and Type | Class and Description |
---|---|
(package private) class |
Console.ConsoleStyleContext
The style context defining the styles of each type of PrintStream.
|
(package private) class |
Console.ReadWriteThread
The thread that will write everything to the text area.
|
Modifier and Type | Field and Description |
---|---|
private static Console |
console
Single Console instance.
|
(package private) java.io.PipedInputStream |
piCustom
Custom InputStream.
|
(package private) java.io.PipedInputStream |
piErr
InputStream for System.err.
|
(package private) java.io.PipedInputStream |
piOut
InputStream for System.out.
|
(package private) java.io.PipedOutputStream |
poCustom
Custom OutputStream.
|
(package private) java.io.PipedOutputStream |
poErr
OutputStream for System.err.
|
(package private) java.io.PipedOutputStream |
poOut
OutputStream for System.out.
|
(package private) java.io.PrintStream |
printStream
Custom PrintStream.
|
(package private) Console.ConsoleStyleContext |
styleContext
The StyleContext for the Console.
|
(package private) javax.swing.JTextPane |
textArea
The text area to which everything is written.
|
Modifier | Constructor and Description |
---|---|
private |
Console()
Creates a new Console object.
|
Modifier and Type | Method and Description |
---|---|
static Console |
getInstance()
Console is a Singleton class: you can only get one Console.
|
java.io.PrintStream |
getPrintStream()
Get the custom PrintStream of the console.
|
javax.swing.JTextPane |
getTextArea()
Get the JTextArea to which everything is written.
|
static void |
println(java.lang.String s)
Allows you to print something to the custom PrintStream.
|
void |
update(java.util.Observable observable,
java.lang.Object obj) |
private static Console console
java.io.PrintStream printStream
java.io.PipedOutputStream poCustom
java.io.PipedInputStream piCustom
java.io.PipedOutputStream poOut
java.io.PipedInputStream piOut
java.io.PipedOutputStream poErr
java.io.PipedInputStream piErr
Console.ConsoleStyleContext styleContext
javax.swing.JTextPane textArea
private Console() throws java.io.IOException
java.io.IOException
public static Console getInstance()
public void update(java.util.Observable observable, java.lang.Object obj)
update
in interface java.util.Observer
Observer.update(java.util.Observable, java.lang.Object)
public static void println(java.lang.String s)
s
- the message you want to send to the Consolepublic java.io.PrintStream getPrintStream()
public javax.swing.JTextPane getTextArea()