- java.lang.Object
-
- java.io.Writer
-
- java.io.FilterWriter
-
- org.jline.utils.AnsiWriter
-
- org.jline.terminal.impl.jansi.win.WindowsAnsiWriter
-
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
public final class WindowsAnsiWriter extends AnsiWriter
A Windows ANSI escape processor, that uses JNA to access native platform API's to change the console attributes.- Since:
- 1.0
- Author:
- Hiram Chirino, Joris Kuipers
-
-
Field Summary
-
Fields inherited from class org.jline.utils.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
-
Fields inherited from class java.io.FilterWriter
out
-
-
Constructor Summary
Constructors Constructor Description WindowsAnsiWriter(Writer out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidprocessAttributeRest()protected voidprocessChangeWindowTitle(String title)protected voidprocessCursorDown(int count)protected voidprocessCursorDownLine(int count)protected voidprocessCursorLeft(int count)protected voidprocessCursorRight(int count)protected voidprocessCursorTo(int row, int col)protected voidprocessCursorToColumn(int x)protected voidprocessCursorUp(int count)protected voidprocessCursorUpLine(int count)protected voidprocessDefaultBackgroundColor()protected voidprocessDefaultTextColor()protected voidprocessDeleteLine(int optionInt)protected voidprocessEraseLine(int eraseOption)protected voidprocessEraseScreen(int eraseOption)protected voidprocessInsertLine(int optionInt)protected voidprocessRestoreCursorPosition()protected voidprocessSaveCursorPosition()protected voidprocessSetAttribute(int attribute)protected voidprocessSetBackgroundColorExt(int paletteIndex)protected voidprocessSetForegroundColorExt(int paletteIndex)-
Methods inherited from class org.jline.utils.AnsiWriter
close, processChangeIconName, processChangeIconNameAndWindowTitle, processCharsetSelect, processScrollDown, processScrollUp, processSetBackgroundColor, processSetBackgroundColor, processSetBackgroundColorExt, processSetForegroundColor, processSetForegroundColor, processSetForegroundColorExt, processUnknownExtension, processUnknownOperatingSystemCommand, write, write, write
-
Methods inherited from class java.io.FilterWriter
flush
-
-
-
-
Constructor Detail
-
WindowsAnsiWriter
public WindowsAnsiWriter(Writer out) throws IOException
- Throws:
IOException
-
-
Method Detail
-
processEraseScreen
protected void processEraseScreen(int eraseOption) throws IOException- Overrides:
processEraseScreenin classAnsiWriter- Throws:
IOException
-
processEraseLine
protected void processEraseLine(int eraseOption) throws IOException- Overrides:
processEraseLinein classAnsiWriter- Throws:
IOException
-
processCursorUpLine
protected void processCursorUpLine(int count) throws IOException- Overrides:
processCursorUpLinein classAnsiWriter- Throws:
IOException
-
processCursorDownLine
protected void processCursorDownLine(int count) throws IOException- Overrides:
processCursorDownLinein classAnsiWriter- Throws:
IOException
-
processCursorLeft
protected void processCursorLeft(int count) throws IOException- Overrides:
processCursorLeftin classAnsiWriter- Throws:
IOException
-
processCursorRight
protected void processCursorRight(int count) throws IOException- Overrides:
processCursorRightin classAnsiWriter- Throws:
IOException
-
processCursorDown
protected void processCursorDown(int count) throws IOException- Overrides:
processCursorDownin classAnsiWriter- Throws:
IOException
-
processCursorUp
protected void processCursorUp(int count) throws IOException- Overrides:
processCursorUpin classAnsiWriter- Throws:
IOException
-
processCursorTo
protected void processCursorTo(int row, int col) throws IOException- Overrides:
processCursorToin classAnsiWriter- Throws:
IOException
-
processCursorToColumn
protected void processCursorToColumn(int x) throws IOException- Overrides:
processCursorToColumnin classAnsiWriter- Throws:
IOException
-
processSetForegroundColorExt
protected void processSetForegroundColorExt(int paletteIndex) throws IOException- Overrides:
processSetForegroundColorExtin classAnsiWriter- Throws:
IOException
-
processSetBackgroundColorExt
protected void processSetBackgroundColorExt(int paletteIndex) throws IOException- Overrides:
processSetBackgroundColorExtin classAnsiWriter- Throws:
IOException
-
processDefaultTextColor
protected void processDefaultTextColor() throws IOException- Overrides:
processDefaultTextColorin classAnsiWriter- Throws:
IOException
-
processDefaultBackgroundColor
protected void processDefaultBackgroundColor() throws IOException- Overrides:
processDefaultBackgroundColorin classAnsiWriter- Throws:
IOException
-
processAttributeRest
protected void processAttributeRest() throws IOException- Overrides:
processAttributeRestin classAnsiWriter- Throws:
IOException
-
processSetAttribute
protected void processSetAttribute(int attribute) throws IOException- Overrides:
processSetAttributein classAnsiWriter- Throws:
IOException
-
processSaveCursorPosition
protected void processSaveCursorPosition() throws IOException- Overrides:
processSaveCursorPositionin classAnsiWriter- Throws:
IOException
-
processRestoreCursorPosition
protected void processRestoreCursorPosition() throws IOException- Overrides:
processRestoreCursorPositionin classAnsiWriter- Throws:
IOException
-
processInsertLine
protected void processInsertLine(int optionInt) throws IOException- Overrides:
processInsertLinein classAnsiWriter- Throws:
IOException
-
processDeleteLine
protected void processDeleteLine(int optionInt) throws IOException- Overrides:
processDeleteLinein classAnsiWriter- Throws:
IOException
-
processChangeWindowTitle
protected void processChangeWindowTitle(String title)
- Overrides:
processChangeWindowTitlein classAnsiWriter
-
-