Class Nano.Buffer

  • Enclosing class:
    Nano

    protected class Nano.Buffer
    extends java.lang.Object
    • Field Detail

      • file

        java.lang.String file
      • charset

        java.nio.charset.Charset charset
      • lines

        java.util.List<java.lang.String> lines
      • firstLineToDisplay

        int firstLineToDisplay
      • firstColumnToDisplay

        int firstColumnToDisplay
      • offsetInLineToDisplay

        int offsetInLineToDisplay
      • line

        int line
      • offsets

        java.util.List<java.util.LinkedList<java.lang.Integer>> offsets
      • offsetInLine

        int offsetInLine
      • column

        int column
      • wantedColumn

        int wantedColumn
      • uncut

        boolean uncut
      • markPos

        int[] markPos
      • dirty

        boolean dirty
    • Constructor Detail

      • Buffer

        protected Buffer​(java.lang.String file)
    • Method Detail

      • open

        void open()
           throws java.io.IOException
        Throws:
        java.io.IOException
      • open

        void open​(java.io.InputStream is)
           throws java.io.IOException
        Throws:
        java.io.IOException
      • read

        void read​(java.io.InputStream fis)
           throws java.io.IOException
        Throws:
        java.io.IOException
      • charPosition

        private int charPosition​(int displayPosition)
      • charPosition

        private int charPosition​(int line,
                                 int displayPosition)
      • charPosition

        private int charPosition​(int line,
                                 int displayPosition,
                                 Nano.CursorMovement move)
      • blanks

        java.lang.String blanks​(int nb)
      • insert

        void insert​(java.lang.String insert)
      • computeAllOffsets

        void computeAllOffsets()
      • computeOffsets

        java.util.LinkedList<java.lang.Integer> computeOffsets​(java.lang.String line)
      • isBreakable

        boolean isBreakable​(char ch)
      • moveToChar

        void moveToChar​(int pos)
      • delete

        void delete​(int count)
      • backspace

        boolean backspace​(int count)
      • moveLeft

        boolean moveLeft​(int chars)
      • moveRight

        boolean moveRight​(int chars)
      • width

        int width()
      • moveRight

        boolean moveRight​(int chars,
                          boolean fromBeginning)
      • moveDown

        void moveDown​(int lines)
      • moveUp

        void moveUp​(int lines)
      • prevLineOffset

        private java.util.Optional<java.lang.Integer> prevLineOffset​(int line,
                                                                     int offsetInLine)
      • nextLineOffset

        private java.util.Optional<java.lang.Integer> nextLineOffset​(int line,
                                                                     int offsetInLine)
      • moveDisplayDown

        void moveDisplayDown​(int lines)
      • moveDisplayUp

        void moveDisplayUp​(int lines)
      • cursorDown

        private void cursorDown​(int lines)
      • cursorUp

        private void cursorUp​(int lines)
      • ensureCursorVisible

        void ensureCursorVisible()
      • eof

        void eof()
      • bof

        void bof()
      • resetDisplay

        void resetDisplay()
      • getLine

        java.lang.String getLine​(int line)
      • getTitle

        java.lang.String getTitle()
      • highlightDisplayedLine

        void highlightDisplayedLine​(int curLine,
                                    int curOffset,
                                    int nextOffset,
                                    AttributedStringBuilder line)
      • getDisplayedLines

        java.util.List<AttributedString> getDisplayedLines​(int nbLines)
      • moveTo

        public void moveTo​(int x,
                           int y)
      • gotoLine

        public void gotoLine​(int x,
                             int y)
      • getDisplayedCursor

        public int getDisplayedCursor()
      • computeCursorPosition

        private int computeCursorPosition​(int cursor,
                                          int rwidth)
      • getCurrentChar

        char getCurrentChar()
      • prevWord

        public void prevWord()
      • nextWord

        public void nextWord()
      • beginningOfLine

        public void beginningOfLine()
      • endOfLine

        public void endOfLine()
      • prevPage

        public void prevPage()
      • nextPage

        public void nextPage()
      • scrollUp

        public void scrollUp​(int lines)
      • scrollDown

        public void scrollDown​(int lines)
      • firstLine

        public void firstLine()
      • lastLine

        public void lastLine()
      • nextSearch

        boolean nextSearch()
      • doSearch

        private java.util.List<java.lang.Integer> doSearch​(java.lang.String text)
      • highlightStart

        protected int[] highlightStart()
      • highlightEnd

        protected int[] highlightEnd()
      • matching

        public void matching()
      • length

        private int length​(java.lang.String line)
      • copy

        void copy()
      • cut

        void cut()
      • cut

        void cut​(boolean toEnd)
      • uncut

        void uncut()
      • mark

        void mark()
      • getMarkStart

        int[] getMarkStart()
      • getMarkEnd

        int[] getMarkEnd()
      • replaceFromCursor

        void replaceFromCursor​(int chars,
                               java.lang.String string)