Interface TextCell<T>
- All Known Implementing Classes:
AbstractTextCell,TextCell.DefaultTextCell
Extension of a
Cell to make it aware of an item style and selection state.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TextCell<T>Helper method to build aTextCell.static <T> TextCell<T>of(T item, Function<T, String> itemFunction, HorizontalAlign hAlign, VerticalAlign vAlign) Helper method to build aTextCell.voidsetHorizontalAlign(HorizontalAlign hAlign) Sets horizontal align for a text to draw.voidsetVerticalAlign(VerticalAlign vAlign) Sets vertical align for a text to draw.Methods inherited from interface org.springframework.shell.component.view.control.cell.Cell
getItem, setBackgroundColor, setForegroundColor, setItem, setStyleMethods inherited from interface org.springframework.shell.component.view.control.Control
draw, getRect, setRect, setThemeName, setThemeResolver
-
Method Details
-
setHorizontalAlign
Sets horizontal align for a text to draw. Defaults toHorizontalAlign.CENTER.- Parameters:
hAlign- the horizontal align
-
setVerticalAlign
Sets vertical align for a text to draw. Defaults toVerticalAlign.CENTER.- Parameters:
vAlign- the vertical align
-
of
Helper method to build aTextCell.- Type Parameters:
T- type of an item- Parameters:
item- the itemitemFunction- the item function- Returns:
- a default text cell
-
of
static <T> TextCell<T> of(T item, Function<T, String> itemFunction, HorizontalAlign hAlign, VerticalAlign vAlign) Helper method to build aTextCell.- Type Parameters:
T- type of an item- Parameters:
item- the itemitemFunction- the item functionhAlign- item horizontal alignmentvAlign- item vertical alignment- Returns:
-