Interface ListCell<T>
- All Known Implementing Classes:
AbstractListCell,ListCell.DefaultListCell
Extension of a
Cell to make it aware of an item style and selection state.- Author:
- Janne Valkealahti
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ListCell<T>of(T item, ListView.ItemStyle itemStyle) Helper method to build aListCell.voidsetItemStyle(ListView.ItemStyle itemStyle) SetListView.ItemStyle.voidsetSelected(boolean selected) Set selection state.Methods inherited from interface org.springframework.shell.jline.tui.component.view.control.cell.Cell
getItem, setBackgroundColor, setForegroundColor, setItem, setStyleMethods inherited from interface org.springframework.shell.jline.tui.component.view.control.Control
draw, getRect, setRect, setThemeName, setThemeResolver
-
Method Details
-
setItemStyle
SetListView.ItemStyle.- Parameters:
itemStyle- the item style
-
setSelected
void setSelected(boolean selected) Set selection state.- Parameters:
selected- the selection state
-
of
Helper method to build aListCell.- Parameters:
item- the itemitemStyle- the item style- Returns:
- a default list cell
-