Package org.jline.terminal.impl.jna.win
Class WindowsAnsiWriter
- java.lang.Object
-
- java.io.Writer
-
- java.io.FilterWriter
-
- org.jline.utils.AnsiWriter
-
- org.jline.terminal.impl.jna.win.WindowsAnsiWriter
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.Appendable
,java.lang.AutoCloseable
public final class WindowsAnsiWriter extends org.jline.utils.AnsiWriter
A Windows ANSI escape processor, 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
-
-
Constructor Summary
Constructors Constructor Description WindowsAnsiWriter(java.io.Writer out, com.sun.jna.Pointer console)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
processAttributeRest()
protected void
processChangeWindowTitle(java.lang.String label)
protected void
processCursorDown(int count)
protected void
processCursorDownLine(int count)
protected void
processCursorLeft(int count)
protected void
processCursorRight(int count)
protected void
processCursorTo(int row, int col)
protected void
processCursorToColumn(int x)
protected void
processCursorUp(int count)
protected void
processCursorUpLine(int count)
protected void
processDefaultBackgroundColor()
protected void
processDefaultTextColor()
protected void
processDeleteLine(int optionInt)
protected void
processEraseLine(int eraseOption)
protected void
processEraseScreen(int eraseOption)
protected void
processInsertLine(int optionInt)
protected void
processRestoreCursorPosition()
protected void
processSaveCursorPosition()
protected void
processSetAttribute(int attribute)
protected void
processSetBackgroundColorExt(int paletteIndex)
protected void
processSetForegroundColorExt(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
-
-
-
-
Method Detail
-
processEraseScreen
protected void processEraseScreen(int eraseOption) throws java.io.IOException
- Overrides:
processEraseScreen
in classorg.jline.utils.AnsiWriter
- Throws:
java.io.IOException
-
processEraseLine
protected void processEraseLine(int eraseOption) throws java.io.IOException
- Overrides:
processEraseLine
in classorg.jline.utils.AnsiWriter
- Throws:
java.io.IOException
-
processCursorUpLine
protected void processCursorUpLine(int count) throws java.io.IOException
- Overrides:
processCursorUpLine
in classorg.jline.utils.AnsiWriter
- Throws:
java.io.IOException
-
processCursorDownLine
protected void processCursorDownLine(int count) throws java.io.IOException
- Overrides:
processCursorDownLine
in classorg.jline.utils.AnsiWriter
- Throws:
java.io.IOException
-
processCursorLeft
protected void processCursorLeft(int count) throws java.io.IOException
- Overrides:
processCursorLeft
in classorg.jline.utils.AnsiWriter
- Throws:
java.io.IOException
-
processCursorRight
protected void processCursorRight(int count) throws java.io.IOException
- Overrides:
processCursorRight
in classorg.jline.utils.AnsiWriter
- Throws:
java.io.IOException
-
processCursorDown
protected void processCursorDown(int count) throws java.io.IOException
- Overrides:
processCursorDown
in classorg.jline.utils.AnsiWriter
- Throws:
java.io.IOException
-
processCursorUp
protected void processCursorUp(int count) throws java.io.IOException
- Overrides:
processCursorUp
in classorg.jline.utils.AnsiWriter
- Throws:
java.io.IOException
-
processCursorTo
protected void processCursorTo(int row, int col) throws java.io.IOException
- Overrides:
processCursorTo
in classorg.jline.utils.AnsiWriter
- Throws:
java.io.IOException
-
processCursorToColumn
protected void processCursorToColumn(int x) throws java.io.IOException
- Overrides:
processCursorToColumn
in classorg.jline.utils.AnsiWriter
- Throws:
java.io.IOException
-
processSetForegroundColorExt
protected void processSetForegroundColorExt(int paletteIndex) throws java.io.IOException
- Overrides:
processSetForegroundColorExt
in classorg.jline.utils.AnsiWriter
- Throws:
java.io.IOException
-
processSetBackgroundColorExt
protected void processSetBackgroundColorExt(int paletteIndex) throws java.io.IOException
- Overrides:
processSetBackgroundColorExt
in classorg.jline.utils.AnsiWriter
- Throws:
java.io.IOException
-
processDefaultTextColor
protected void processDefaultTextColor() throws java.io.IOException
- Overrides:
processDefaultTextColor
in classorg.jline.utils.AnsiWriter
- Throws:
java.io.IOException
-
processDefaultBackgroundColor
protected void processDefaultBackgroundColor() throws java.io.IOException
- Overrides:
processDefaultBackgroundColor
in classorg.jline.utils.AnsiWriter
- Throws:
java.io.IOException
-
processAttributeRest
protected void processAttributeRest() throws java.io.IOException
- Overrides:
processAttributeRest
in classorg.jline.utils.AnsiWriter
- Throws:
java.io.IOException
-
processSetAttribute
protected void processSetAttribute(int attribute) throws java.io.IOException
- Overrides:
processSetAttribute
in classorg.jline.utils.AnsiWriter
- Throws:
java.io.IOException
-
processSaveCursorPosition
protected void processSaveCursorPosition() throws java.io.IOException
- Overrides:
processSaveCursorPosition
in classorg.jline.utils.AnsiWriter
- Throws:
java.io.IOException
-
processRestoreCursorPosition
protected void processRestoreCursorPosition() throws java.io.IOException
- Overrides:
processRestoreCursorPosition
in classorg.jline.utils.AnsiWriter
- Throws:
java.io.IOException
-
processInsertLine
protected void processInsertLine(int optionInt) throws java.io.IOException
- Overrides:
processInsertLine
in classorg.jline.utils.AnsiWriter
- Throws:
java.io.IOException
-
processDeleteLine
protected void processDeleteLine(int optionInt) throws java.io.IOException
- Overrides:
processDeleteLine
in classorg.jline.utils.AnsiWriter
- Throws:
java.io.IOException
-
processChangeWindowTitle
protected void processChangeWindowTitle(java.lang.String label)
- Overrides:
processChangeWindowTitle
in classorg.jline.utils.AnsiWriter
-
-