Class TextBuffer


  • class TextBuffer
    extends java.lang.Object
    This class is used to store lines of text inside of a terminal emulator. As used by DefaultVirtualTerminal, it keeps two TextBuffers, one for private mode and one for normal mode and it can switch between them as needed.
    • Field Detail

      • DOUBLE_WIDTH_CHAR_PADDING

        private static final TextCharacter DOUBLE_WIDTH_CHAR_PADDING
      • lines

        private final java.util.LinkedList<java.util.List<TextCharacter>> lines
    • Constructor Detail

      • TextBuffer

        TextBuffer()
    • Method Detail

      • newLine

        void newLine()
      • removeTopLines

        void removeTopLines​(int numberOfLinesToRemove)
      • clear

        void clear()
      • getLinesFrom

        java.util.ListIterator<java.util.List<TextCharacter>> getLinesFrom​(int rowNumber)
      • getLineCount

        int getLineCount()
      • setCharacter

        int setCharacter​(int lineNumber,
                         int columnIndex,
                         TextCharacter textCharacter)
      • getCharacter

        TextCharacter getCharacter​(int lineNumber,
                                   int columnIndex)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object