Class ListView<T>
java.lang.Object
org.springframework.shell.jline.tui.component.view.control.AbstractControl
org.springframework.shell.jline.tui.component.view.control.AbstractView
org.springframework.shell.jline.tui.component.view.control.BoxView
org.springframework.shell.jline.tui.component.view.control.ListView<T>
ListView is a View showing items in a vertical list.
Supported view commands:
ViewCommand.LINE_UP- Move active line upwards.ViewCommand.LINE_DOWN- Move active line downwards.
- Author:
- Janne Valkealahti, Piotr Olaszewski
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionListView()ListView(@Nullable List<T> items, ListView.ItemStyle itemStyle) ListView(ListView.ItemStyle itemStyle) ListView(T[] items, ListView.ItemStyle itemStyle) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddrawInternal(Screen screen) Possibly draws a box around this view and title in a box top boundary.protected voidInternal init method called fromAbstractView.init().voidsetCellFactory(BiFunction<ListView<T>, T, ListCell<T>> factory) voidMethods inherited from class org.springframework.shell.jline.tui.component.view.control.BoxView
drawBackground, getBackgroundStyle, getInnerRect, isShowBorder, setBackgroundColor, setBorderPadding, setFocusedTitleColor, setFocusedTitleStyle, setRect, setShowBorder, setTitle, setTitleAlign, setTitleColor, setTitleStyleMethods inherited from class org.springframework.shell.jline.tui.component.view.control.AbstractView
destroy, dispatch, dispatchKeyRunCommand, dispatchMouseRunCommand, dispatchRunnable, draw, focus, getDrawFunction, getEventLoop, getHotKeyBindings, getHotKeyHandler, getKeyBindings, getKeyHandler, getLayer, getMouseBindings, getMouseHandler, getViewCommands, getViewService, hasFocus, init, onDestroy, registerHotKeyBinding, registerHotKeyBinding, registerHotKeyBinding, registerKeyBinding, registerKeyBinding, registerKeyBinding, registerMouseBinding, registerMouseBinding, registerMouseBinding, registerViewCommand, runViewCommand, setDrawFunction, setEventLoop, setLayer, setViewService, shortcutMethods inherited from class org.springframework.shell.jline.tui.component.view.control.AbstractControl
getRect, getThemeName, getThemeResolver, resolveThemeBackground, resolveThemeForeground, resolveThemeSpinner, resolveThemeStyle, setThemeName, setThemeResolverMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.shell.jline.tui.component.view.control.Control
getRect, setThemeName, setThemeResolver
-
Constructor Details
-
ListView
public ListView() -
ListView
-
ListView
-
ListView
-
-
Method Details
-
initInternal
protected void initInternal()Description copied from class:AbstractViewInternal init method called fromAbstractView.init(). Override to do something usefull. Typically key and mousebindings are registered from this method.- Overrides:
initInternalin classAbstractView
-
getItemStyle
-
setItems
-
drawInternal
Description copied from class:BoxViewPossibly draws a box around this view and title in a box top boundary. Also calls adraw functionif defined.- Overrides:
drawInternalin classBoxView- Parameters:
screen- the screen
-
setCellFactory
-