Package org.jline.consoleui.prompt
Class AbstractPrompt<T extends ConsoleUIItemIF>
java.lang.Object
org.jline.consoleui.prompt.AbstractPrompt<T>
- Direct Known Subclasses:
AbstractPrompt.CheckboxPrompt
,AbstractPrompt.ConfirmPrompt
,AbstractPrompt.ExpandableChoicePrompt
,AbstractPrompt.InputValuePrompt
,AbstractPrompt.ListChoicePrompt
Classes for all prompt implementations.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
private static class
protected static class
protected static class
protected static class
protected static class
protected static class
AbstractPrompt.ListChoicePrompt<T extends ListItemIF>
private static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BindingReader
protected final ConsolePrompt.UiConfig
static final long
private Display
protected int
private final List
<AttributedString> private final AttributedString
private AbstractPrompt.ListRange
private final Size
protected final Terminal
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractPrompt
(Terminal terminal, List<AttributedString> header, AttributedString message, List<T> items, int pageSize, ConsolePrompt.UiConfig cfg) AbstractPrompt
(Terminal terminal, List<AttributedString> header, AttributedString message, ConsolePrompt.UiConfig cfg) -
Method Summary
Modifier and TypeMethodDescriptionprivate int
candidateStartPosition
(int candidatesColumn, String buffer, List<Candidate> cands) private void
computeListRange
(int cursorRow, int itemsSize) private List
<AttributedString> displayLines
(int cursorRow, int candidatesColumn, AttributedString buffer, List<Candidate> candidates) private List
<AttributedString> displayLines
(int cursorRow, Set<String> selected) private List
<AttributedString> displayLines
(int cursorRow, AttributedString buffer, boolean newline) private void
private AttributedStringBuilder
private static <T extends ConsoleUIItemIF>
intprivate static <T extends ConsoleUIItemIF>
intprotected void
refreshDisplay
(int row) protected void
refreshDisplay
(int row, int column, String buffer, boolean newline) protected void
refreshDisplay
(int buffRow, int buffCol, String buffer, int candRow, int candCol, List<Candidate> candidates) protected void
refreshDisplay
(int row, Set<String> selected) protected void
protected void
-
Field Details
-
terminal
-
bindingReader
-
header
-
message
-
items
-
firstItemRow
protected int firstItemRow -
size
-
config
-
display
-
range
-
DEFAULT_TIMEOUT_WITH_ESC
public static final long DEFAULT_TIMEOUT_WITH_ESC- See Also:
-
-
Constructor Details
-
AbstractPrompt
public AbstractPrompt(Terminal terminal, List<AttributedString> header, AttributedString message, ConsolePrompt.UiConfig cfg) -
AbstractPrompt
public AbstractPrompt(Terminal terminal, List<AttributedString> header, AttributedString message, List<T> items, int pageSize, ConsolePrompt.UiConfig cfg)
-
-
Method Details
-
resetHeader
protected void resetHeader() -
resetDisplay
protected void resetDisplay() -
refreshDisplay
protected void refreshDisplay(int row) -
refreshDisplay
-
refreshDisplay
-
refreshDisplay
-
candidateStartPosition
-
displayLines
private List<AttributedString> displayLines(int cursorRow, int candidatesColumn, AttributedString buffer, List<Candidate> candidates) -
displayLines
-
fillIndicatorSpace
-
fillCheckboxSpace
-
computeListRange
private void computeListRange(int cursorRow, int itemsSize) -
displayLines
private List<AttributedString> displayLines(int cursorRow, AttributedString buffer, boolean newline) -
nextRow
-
prevRow
-