Package org.jline.reader.impl
Class LineReaderImpl.MenuSupport
- java.lang.Object
-
- org.jline.reader.impl.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) intcolumns(package private) java.lang.Stringcompleted(package private) AttributedStringcomputed(package private) java.util.function.BiFunction<java.lang.CharSequence,java.lang.Boolean,java.lang.CharSequence>escaper(package private) intlines(package private) java.util.List<Candidate>possible(package private) intselection(package private) inttopLine(package private) java.lang.Stringword
-
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 Candidatecompletion()voiddown()AttributedStringget()voidleft()private voidmajor(int step)Move 'step' options along the major axis of the menu.private voidminor(int step)Move 'step' options along the minor axis of the menu.voidnext()voidprevious()voidright()voidup()private voidupdate()
-
-
-
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
-
computed
AttributedString computed
-
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
-
completion
public Candidate completion()
-
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()
-
get
public AttributedString get()
- Specified by:
getin interfacejava.util.function.Supplier<AttributedString>
-
-