java.lang.Object
org.jline.prompt.impl.DefaultPrompt
org.jline.prompt.impl.DefaultListPrompt
- All Implemented Interfaces:
ListPrompt,Prompt
Default implementation of ListPrompt interface.
This is now the native implementation that doesn't depend on console-ui.
-
Field Summary
Fields inherited from class org.jline.prompt.impl.DefaultPrompt
message, name -
Constructor Summary
ConstructorsConstructorDescriptionDefaultListPrompt(String name, String message, List<ListItem> items) DefaultListPrompt(String name, String message, List<ListItem> items, int pageSize) DefaultListPrompt(String name, String message, List<ListItem> items, int pageSize, boolean showPageIndicator) DefaultListPrompt(String name, String message, List<ListItem> items, int pageSize, boolean showPageIndicator, boolean filterable) -
Method Summary
Modifier and TypeMethodDescriptiongetItems()Get the list of list items.intGet the page size for pagination.booleanWhether the list supports inline text filtering.booleanWhether to show a loop indicator when pagination is enabled.Methods inherited from class org.jline.prompt.impl.DefaultPrompt
getFilter, getMessage, getName, getTransformer, setFilter, setTransformerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jline.prompt.Prompt
getFilter, getMessage, getName, getTransformer
-
Constructor Details
-
DefaultListPrompt
-
DefaultListPrompt
-
DefaultListPrompt
-
DefaultListPrompt
-
-
Method Details
-
getItems
Description copied from interface:ListPromptGet the list of list items.- Specified by:
getItemsin interfaceListPrompt- Returns:
- the list of list items
-
getPageSize
public int getPageSize()Description copied from interface:ListPromptGet the page size for pagination. If 0 or negative, all items are shown without pagination.- Specified by:
getPageSizein interfaceListPrompt- Returns:
- the page size, or 0 for no pagination
-
showPageIndicator
public boolean showPageIndicator()Description copied from interface:ListPromptWhether to show a loop indicator when pagination is enabled. If true, shows "(1/3)" style indicators.- Specified by:
showPageIndicatorin interfaceListPrompt- Returns:
- true to show page indicators, false to hide
-
isFilterable
public boolean isFilterable()Description copied from interface:ListPromptWhether the list supports inline text filtering. When enabled, the user can type characters to filter the displayed items. When disabled, typed characters are ignored.- Specified by:
isFilterablein interfaceListPrompt- Returns:
- true if filtering is enabled, false otherwise
-