public final class WindowsAnsiPrintStream extends AnsiPrintStream
WindowsAnsiOutputStream
ATTRIBUTE_BLINK_FAST, ATTRIBUTE_BLINK_OFF, ATTRIBUTE_BLINK_SLOW, ATTRIBUTE_CONCEAL_OFF, ATTRIBUTE_CONCEAL_ON, ATTRIBUTE_INTENSITY_BOLD, ATTRIBUTE_INTENSITY_FAINT, ATTRIBUTE_INTENSITY_NORMAL, ATTRIBUTE_ITALIC, ATTRIBUTE_NEGATIVE_Off, ATTRIBUTE_NEGATIVE_OFF, ATTRIBUTE_NEGATIVE_ON, ATTRIBUTE_UNDERLINE, ATTRIBUTE_UNDERLINE_DOUBLE, ATTRIBUTE_UNDERLINE_OFF, BLACK, BLUE, CYAN, ERASE_LINE, ERASE_LINE_TO_BEGINING, ERASE_LINE_TO_END, ERASE_SCREEN, ERASE_SCREEN_TO_BEGINING, ERASE_SCREEN_TO_END, GREEN, MAGENTA, RED, RESET_CODE, WHITE, YELLOW
ps
out
Constructor and Description |
---|
WindowsAnsiPrintStream(PrintStream ps) |
Modifier and Type | Method and Description |
---|---|
protected void |
processAttributeRest()
process
SGR 0 corresponding to Reset / Normal |
protected void |
processChangeWindowTitle(String label)
process
OSC 2;text BEL corresponding to Change Window title |
protected void |
processCursorDown(int count)
process
CSI n B corresponding to CUD – Cursor Down |
protected void |
processCursorLeft(int count)
process
CSI n D corresponding to CUB – Cursor Back |
protected void |
processCursorRight(int count)
process
CSI n C corresponding to CUF – Cursor Forward |
protected void |
processCursorTo(int row,
int col)
process
CSI n ; m H corresponding to CUP – Cursor Position or
CSI n ; m f corresponding to HVP – Horizontal and Vertical Position |
protected void |
processCursorToColumn(int x)
process
CSI n G corresponding to CHA – Cursor Horizontal Absolute |
protected void |
processCursorUp(int count)
process
CSI n A corresponding to CUU – Cursor Up |
protected void |
processDefaultBackgroundColor()
process
SGR 49 corresponding to Default background color |
protected void |
processDefaultTextColor()
process
SGR 39 corresponding to Default text color (foreground) |
protected void |
processDeleteLine(int optionInt)
Process
CSI M ANSI code, corresponding to DL – Delete Line |
protected void |
processEraseLine(int eraseOption)
Process
CSI n K ANSI code, corresponding to ED – Erase in Line |
protected void |
processEraseScreen(int eraseOption)
Process
CSI n J ANSI code, corresponding to ED – Erase in Display |
protected void |
processInsertLine(int optionInt)
Process
CSI L ANSI code, corresponding to IL – Insert Line |
protected void |
processRestoreCursorPosition()
Process
CSI u ANSI code, corresponding to RCP – Restore Cursor Position |
protected void |
processSaveCursorPosition()
Process
CSI s ANSI code, corresponding to SCP – Save Cursor Position |
protected void |
processSetAttribute(int attribute)
process
SGR other than 0 (reset), 30-39 (foreground),
40-49 (background), 90-97 (foreground high intensity) or
100-107 (background high intensity) |
protected void |
processSetBackgroundColor(int color,
boolean bright)
process
SGR 40-47 or SGR 100-107 corresponding to
Set background color either in normal mode or high intensity. |
protected void |
processSetForegroundColor(int color,
boolean bright)
process
SGR 30-37 or SGR 90-97 corresponding to
Set text color (foreground) either in normal mode or high intensity. |
close, filter, processChangeIconName, processChangeIconNameAndWindowTitle, processCharsetSelect, processCursorDownLine, processCursorUpLine, processScrollDown, processScrollUp, processSetBackgroundColor, processSetBackgroundColorExt, processSetBackgroundColorExt, processSetForegroundColor, processSetForegroundColorExt, processSetForegroundColorExt, processUnknownExtension, processUnknownOperatingSystemCommand
checkError, flush, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, println, println, write, write
append, append, append, clearError, format, format, printf, printf, setError
write
public WindowsAnsiPrintStream(PrintStream ps) throws IOException
IOException
protected void processEraseScreen(int eraseOption) throws IOException
AnsiPrintStream
CSI n J
ANSI code, corresponding to ED – Erase in Display
processEraseScreen
in class AnsiPrintStream
eraseOption
- eraseOptionIOException
- IOExceptionprotected void processEraseLine(int eraseOption) throws IOException
AnsiPrintStream
CSI n K
ANSI code, corresponding to ED – Erase in Line
processEraseLine
in class AnsiPrintStream
eraseOption
- eraseOptionIOException
- IOExceptionprotected void processCursorLeft(int count) throws IOException
AnsiPrintStream
CSI n D
corresponding to CUB – Cursor Back
processCursorLeft
in class AnsiPrintStream
count
- countIOException
- IOExceptionprotected void processCursorRight(int count) throws IOException
AnsiPrintStream
CSI n C
corresponding to CUF – Cursor Forward
processCursorRight
in class AnsiPrintStream
count
- countIOException
- IOExceptionprotected void processCursorDown(int count) throws IOException
AnsiPrintStream
CSI n B
corresponding to CUD – Cursor Down
processCursorDown
in class AnsiPrintStream
count
- countIOException
- IOExceptionprotected void processCursorUp(int count) throws IOException
AnsiPrintStream
CSI n A
corresponding to CUU – Cursor Up
processCursorUp
in class AnsiPrintStream
count
- countIOException
- IOExceptionprotected void processCursorTo(int row, int col) throws IOException
AnsiPrintStream
CSI n ; m H
corresponding to CUP – Cursor Position
or
CSI n ; m f
corresponding to HVP – Horizontal and Vertical Position
processCursorTo
in class AnsiPrintStream
row
- rowcol
- colIOException
- IOExceptionprotected void processCursorToColumn(int x) throws IOException
AnsiPrintStream
CSI n G
corresponding to CHA – Cursor Horizontal Absolute
processCursorToColumn
in class AnsiPrintStream
x
- the columnIOException
- IOExceptionprotected void processSetForegroundColor(int color, boolean bright) throws IOException
AnsiPrintStream
SGR 30-37
or SGR 90-97
corresponding to
Set text color (foreground)
either in normal mode or high intensity.processSetForegroundColor
in class AnsiPrintStream
color
- the text colorbright
- is high intensity?IOException
- IOExceptionprotected void processSetBackgroundColor(int color, boolean bright) throws IOException
AnsiPrintStream
SGR 40-47
or SGR 100-107
corresponding to
Set background color
either in normal mode or high intensity.processSetBackgroundColor
in class AnsiPrintStream
color
- the background colorbright
- is high intensity?IOException
- IOExceptionprotected void processDefaultTextColor() throws IOException
AnsiPrintStream
SGR 39
corresponding to Default text color (foreground)
processDefaultTextColor
in class AnsiPrintStream
IOException
- IOExceptionprotected void processDefaultBackgroundColor() throws IOException
AnsiPrintStream
SGR 49
corresponding to Default background color
processDefaultBackgroundColor
in class AnsiPrintStream
IOException
- IOExceptionprotected void processAttributeRest() throws IOException
AnsiPrintStream
SGR 0
corresponding to Reset / Normal
processAttributeRest
in class AnsiPrintStream
IOException
- IOExceptionprotected void processSetAttribute(int attribute) throws IOException
AnsiPrintStream
SGR
other than 0
(reset), 30-39
(foreground),
40-49
(background), 90-97
(foreground high intensity) or
100-107
(background high intensity)processSetAttribute
in class AnsiPrintStream
attribute
- attributeIOException
- IOExceptionAnsiPrintStream.processAttributeRest()
,
AnsiPrintStream.processSetForegroundColor(int)
,
AnsiPrintStream.processSetForegroundColor(int, boolean)
,
AnsiPrintStream.processSetForegroundColorExt(int)
,
AnsiPrintStream.processSetForegroundColorExt(int, int, int)
,
AnsiPrintStream.processDefaultTextColor()
,
AnsiPrintStream.processDefaultBackgroundColor()
protected void processSaveCursorPosition() throws IOException
AnsiPrintStream
CSI s
ANSI code, corresponding to SCP – Save Cursor Position
processSaveCursorPosition
in class AnsiPrintStream
IOException
- IOExceptionprotected void processRestoreCursorPosition() throws IOException
AnsiPrintStream
CSI u
ANSI code, corresponding to RCP – Restore Cursor Position
processRestoreCursorPosition
in class AnsiPrintStream
IOException
- IOExceptionprotected void processInsertLine(int optionInt) throws IOException
AnsiPrintStream
CSI L
ANSI code, corresponding to IL – Insert Line
processInsertLine
in class AnsiPrintStream
optionInt
- optionIOException
- IOExceptionprotected void processDeleteLine(int optionInt) throws IOException
AnsiPrintStream
CSI M
ANSI code, corresponding to DL – Delete Line
processDeleteLine
in class AnsiPrintStream
optionInt
- optionIOException
- IOExceptionprotected void processChangeWindowTitle(String label)
AnsiPrintStream
OSC 2;text BEL
corresponding to Change Window title
processChangeWindowTitle
in class AnsiPrintStream
label
- window title textCopyright © 2009–2024 FuseSource, Corp.. All rights reserved.