Class LineReaderImpl.MenuSupport

  • All Implemented Interfaces:
    java.util.function.Supplier<AttributedString>
    Enclosing class:
    LineReaderImpl

    private class LineReaderImpl.MenuSupport
    extends java.lang.Object
    implements java.util.function.Supplier<AttributedString>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) int columns  
      (package private) java.lang.String completed  
      (package private) AttributedString computed  
      (package private) java.util.function.BiFunction<java.lang.CharSequence,​java.lang.Boolean,​java.lang.CharSequence> escaper  
      (package private) int lines  
      (package private) java.util.List<Candidate> possible  
      (package private) int selection  
      (package private) int topLine  
      (package private) java.lang.String word  
    • Constructor Summary

      Constructors 
      Constructor Description
      MenuSupport​(java.util.List<Candidate> original, java.lang.String completed, java.util.function.BiFunction<java.lang.CharSequence,​java.lang.Boolean,​java.lang.CharSequence> escaper)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Candidate completion()  
      void down()  
      AttributedString get()  
      void left()  
      private void major​(int step)
      Move 'step' options along the major axis of the menu.
      private void minor​(int step)
      Move 'step' options along the minor axis of the menu.
      void next()  
      void previous()  
      void right()  
      void up()  
      private void update()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • possible

        final java.util.List<Candidate> possible
      • escaper

        final java.util.function.BiFunction<java.lang.CharSequence,​java.lang.Boolean,​java.lang.CharSequence> escaper
      • selection

        int selection
      • topLine

        int topLine
      • word

        java.lang.String word
      • lines

        int lines
      • columns

        int columns
      • completed

        java.lang.String completed
    • Constructor Detail

      • MenuSupport

        public MenuSupport​(java.util.List<Candidate> original,
                           java.lang.String completed,
                           java.util.function.BiFunction<java.lang.CharSequence,​java.lang.Boolean,​java.lang.CharSequence> escaper)
    • Method Detail

      • next

        public void next()
      • previous

        public void previous()
      • major

        private void major​(int step)
        Move 'step' options along the major axis of the menu.

        ie. if the menu is listing rows first, change row (up/down); otherwise move column (left/right)

        Parameters:
        step - number of options to move by
      • minor

        private void minor​(int step)
        Move 'step' options along the minor axis of the menu.

        ie. if the menu is listing rows first, move along the row (left/right); otherwise move along the column (up/down)

        Parameters:
        step - number of options to move by
      • up

        public void up()
      • down

        public void down()
      • left

        public void left()
      • right

        public void right()
      • update

        private void update()