Class 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, 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
      • Fields inherited from class java.io.Writer

        lock
    • Constructor Summary

      Constructors 
      Constructor Description
      WindowsAnsiWriter​(java.io.Writer out)  
    • Constructor Detail

      • WindowsAnsiWriter

        public WindowsAnsiWriter​(java.io.Writer out)
                          throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • processEraseScreen

        protected void processEraseScreen​(int eraseOption)
                                   throws java.io.IOException
        Overrides:
        processEraseScreen in class org.jline.utils.AnsiWriter
        Throws:
        java.io.IOException
      • processEraseLine

        protected void processEraseLine​(int eraseOption)
                                 throws java.io.IOException
        Overrides:
        processEraseLine in class org.jline.utils.AnsiWriter
        Throws:
        java.io.IOException
      • processCursorUpLine

        protected void processCursorUpLine​(int count)
                                    throws java.io.IOException
        Overrides:
        processCursorUpLine in class org.jline.utils.AnsiWriter
        Throws:
        java.io.IOException
      • processCursorDownLine

        protected void processCursorDownLine​(int count)
                                      throws java.io.IOException
        Overrides:
        processCursorDownLine in class org.jline.utils.AnsiWriter
        Throws:
        java.io.IOException
      • processCursorLeft

        protected void processCursorLeft​(int count)
                                  throws java.io.IOException
        Overrides:
        processCursorLeft in class org.jline.utils.AnsiWriter
        Throws:
        java.io.IOException
      • processCursorRight

        protected void processCursorRight​(int count)
                                   throws java.io.IOException
        Overrides:
        processCursorRight in class org.jline.utils.AnsiWriter
        Throws:
        java.io.IOException
      • processCursorDown

        protected void processCursorDown​(int count)
                                  throws java.io.IOException
        Overrides:
        processCursorDown in class org.jline.utils.AnsiWriter
        Throws:
        java.io.IOException
      • processCursorUp

        protected void processCursorUp​(int count)
                                throws java.io.IOException
        Overrides:
        processCursorUp in class org.jline.utils.AnsiWriter
        Throws:
        java.io.IOException
      • processCursorTo

        protected void processCursorTo​(int row,
                                       int col)
                                throws java.io.IOException
        Overrides:
        processCursorTo in class org.jline.utils.AnsiWriter
        Throws:
        java.io.IOException
      • processCursorToColumn

        protected void processCursorToColumn​(int x)
                                      throws java.io.IOException
        Overrides:
        processCursorToColumn in class org.jline.utils.AnsiWriter
        Throws:
        java.io.IOException
      • processSetForegroundColorExt

        protected void processSetForegroundColorExt​(int paletteIndex)
                                             throws java.io.IOException
        Overrides:
        processSetForegroundColorExt in class org.jline.utils.AnsiWriter
        Throws:
        java.io.IOException
      • processSetBackgroundColorExt

        protected void processSetBackgroundColorExt​(int paletteIndex)
                                             throws java.io.IOException
        Overrides:
        processSetBackgroundColorExt in class org.jline.utils.AnsiWriter
        Throws:
        java.io.IOException
      • processDefaultTextColor

        protected void processDefaultTextColor()
                                        throws java.io.IOException
        Overrides:
        processDefaultTextColor in class org.jline.utils.AnsiWriter
        Throws:
        java.io.IOException
      • processDefaultBackgroundColor

        protected void processDefaultBackgroundColor()
                                              throws java.io.IOException
        Overrides:
        processDefaultBackgroundColor in class org.jline.utils.AnsiWriter
        Throws:
        java.io.IOException
      • processAttributeRest

        protected void processAttributeRest()
                                     throws java.io.IOException
        Overrides:
        processAttributeRest in class org.jline.utils.AnsiWriter
        Throws:
        java.io.IOException
      • processSetAttribute

        protected void processSetAttribute​(int attribute)
                                    throws java.io.IOException
        Overrides:
        processSetAttribute in class org.jline.utils.AnsiWriter
        Throws:
        java.io.IOException
      • processSaveCursorPosition

        protected void processSaveCursorPosition()
                                          throws java.io.IOException
        Overrides:
        processSaveCursorPosition in class org.jline.utils.AnsiWriter
        Throws:
        java.io.IOException
      • processRestoreCursorPosition

        protected void processRestoreCursorPosition()
                                             throws java.io.IOException
        Overrides:
        processRestoreCursorPosition in class org.jline.utils.AnsiWriter
        Throws:
        java.io.IOException
      • processInsertLine

        protected void processInsertLine​(int optionInt)
                                  throws java.io.IOException
        Overrides:
        processInsertLine in class org.jline.utils.AnsiWriter
        Throws:
        java.io.IOException
      • processDeleteLine

        protected void processDeleteLine​(int optionInt)
                                  throws java.io.IOException
        Overrides:
        processDeleteLine in class org.jline.utils.AnsiWriter
        Throws:
        java.io.IOException
      • processChangeWindowTitle

        protected void processChangeWindowTitle​(java.lang.String title)
        Overrides:
        processChangeWindowTitle in class org.jline.utils.AnsiWriter