Closeable
, Flushable
, Appendable
, AutoCloseable
public final class WindowsAnsiWriter extends AnsiWriter
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, WHITE, YELLOW
out
Constructor | Description |
---|---|
WindowsAnsiWriter(Writer out,
com.sun.jna.Pointer console) |
Modifier and Type | Method | 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 |
processCursorDownLine(int count) |
process
CSI n E corresponding to CNL – Cursor Next Line |
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 |
processCursorUpLine(int count) |
process
CSI n F corresponding to CPL – Cursor Previous Line |
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 s 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 s 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 |
processSetBackgroundColorExt(int paletteIndex) |
process
SGR 48 corresponding to extended set background color
with a palette of 255 colors. |
protected void |
processSetForegroundColorExt(int paletteIndex) |
process
SGR 38 corresponding to extended set text color (foreground)
with a palette of 255 colors. |
close, processChangeIconName, processChangeIconNameAndWindowTitle, processCharsetSelect, processScrollDown, processScrollUp, processSetBackgroundColor, processSetBackgroundColor, processSetBackgroundColorExt, processSetForegroundColor, processSetForegroundColor, processSetForegroundColorExt, processUnknownExtension, processUnknownOperatingSystemCommand, write, write, write
flush
public WindowsAnsiWriter(Writer out, com.sun.jna.Pointer console) throws IOException
IOException
protected void processEraseScreen(int eraseOption) throws IOException
AnsiWriter
CSI n J
ANSI code, corresponding to ED – Erase in Display
processEraseScreen
in class AnsiWriter
eraseOption
- the erase optionIOException
- if an error occursprotected void processEraseLine(int eraseOption) throws IOException
AnsiWriter
CSI n K
ANSI code, corresponding to ED – Erase in Line
processEraseLine
in class AnsiWriter
eraseOption
- the erase optionIOException
- if an error occursprotected void processCursorUpLine(int count) throws IOException
AnsiWriter
CSI n F
corresponding to CPL – Cursor Previous Line
processCursorUpLine
in class AnsiWriter
count
- line countIOException
- if an error occursprotected void processCursorDownLine(int count) throws IOException
AnsiWriter
CSI n E
corresponding to CNL – Cursor Next Line
processCursorDownLine
in class AnsiWriter
count
- line countIOException
- if an error occursprotected void processCursorLeft(int count) throws IOException
AnsiWriter
CSI n D
corresponding to CUB – Cursor Back
processCursorLeft
in class AnsiWriter
count
- the countIOException
- if an error occursprotected void processCursorRight(int count) throws IOException
AnsiWriter
CSI n C
corresponding to CUF – Cursor Forward
processCursorRight
in class AnsiWriter
count
- the countIOException
- if an error occursprotected void processCursorDown(int count) throws IOException
AnsiWriter
CSI n B
corresponding to CUD – Cursor Down
processCursorDown
in class AnsiWriter
count
- the countIOException
- if an error occursprotected void processCursorUp(int count) throws IOException
AnsiWriter
CSI n A
corresponding to CUU – Cursor Up
processCursorUp
in class AnsiWriter
count
- the countIOException
- if an error occursprotected void processCursorTo(int row, int col) throws IOException
AnsiWriter
CSI n ; m H
corresponding to CUP – Cursor Position
or
CSI n ; m f
corresponding to HVP – Horizontal and Vertical Position
processCursorTo
in class AnsiWriter
row
- the rowcol
- the columnIOException
- if an error occursprotected void processCursorToColumn(int x) throws IOException
AnsiWriter
CSI n G
corresponding to CHA – Cursor Horizontal Absolute
processCursorToColumn
in class AnsiWriter
x
- the columnIOException
- if an error occursprotected void processSetForegroundColorExt(int paletteIndex) throws IOException
AnsiWriter
SGR 38
corresponding to extended set text color (foreground)
with a palette of 255 colors.processSetForegroundColorExt
in class AnsiWriter
paletteIndex
- the text color in the paletteIOException
- if an error occursprotected void processSetBackgroundColorExt(int paletteIndex) throws IOException
AnsiWriter
SGR 48
corresponding to extended set background color
with a palette of 255 colors.processSetBackgroundColorExt
in class AnsiWriter
paletteIndex
- the background color in the paletteIOException
- if an error occursprotected void processDefaultTextColor() throws IOException
AnsiWriter
SGR 39
corresponding to Default text color (foreground)
processDefaultTextColor
in class AnsiWriter
IOException
- if an error occursprotected void processDefaultBackgroundColor() throws IOException
AnsiWriter
SGR 49
corresponding to Default background color
processDefaultBackgroundColor
in class AnsiWriter
IOException
- if an error occursprotected void processAttributeRest() throws IOException
AnsiWriter
SGR 0
corresponding to Reset / Normal
processAttributeRest
in class AnsiWriter
IOException
- if an error occursprotected void processSetAttribute(int attribute) throws IOException
AnsiWriter
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 AnsiWriter
attribute
- the attribute to setIOException
- if an error occursAnsiWriter.processAttributeRest()
,
AnsiWriter.processSetForegroundColor(int)
,
AnsiWriter.processSetForegroundColor(int, boolean)
,
AnsiWriter.processSetForegroundColorExt(int)
,
AnsiWriter.processSetForegroundColorExt(int, int, int)
,
AnsiWriter.processDefaultTextColor()
,
AnsiWriter.processDefaultBackgroundColor()
protected void processSaveCursorPosition() throws IOException
AnsiWriter
CSI s
ANSI code, corresponding to SCP – Save Cursor Position
processSaveCursorPosition
in class AnsiWriter
IOException
- if an error occursprotected void processRestoreCursorPosition() throws IOException
AnsiWriter
CSI u
ANSI code, corresponding to RCP – Restore Cursor Position
processRestoreCursorPosition
in class AnsiWriter
IOException
- if an error occursprotected void processInsertLine(int optionInt) throws IOException
AnsiWriter
CSI s
ANSI code, corresponding to IL – Insert Line
processInsertLine
in class AnsiWriter
optionInt
- the optionIOException
- if an error occursprotected void processDeleteLine(int optionInt) throws IOException
AnsiWriter
CSI s
ANSI code, corresponding to DL – Delete Line
processDeleteLine
in class AnsiWriter
optionInt
- the optionIOException
- if an error occursprotected void processChangeWindowTitle(String label)
AnsiWriter
OSC 2;text BEL
corresponding to Change Window title
processChangeWindowTitle
in class AnsiWriter
label
- the titleCopyright © 2020. All rights reserved.