Interface Cell<T>
- All Superinterfaces:
Control
- All Known Implementing Classes:
AbstractCell
,AbstractListCell
,AbstractTextCell
,ListCell.DefaultListCell
,TextCell.DefaultTextCell
Base interface for all cells. Typically a
Cell
is a building block in
a View
not needing to be aware of how it is drawn into a Screen
but needs to aware of its "item", bounds via Control
and other
properties like background
.- Author:
- Janne Valkealahti
-
Method Summary
Modifier and TypeMethodDescriptiongetItem()
Get item bound to a cell.void
setBackgroundColor
(int backgroundColor) Sets a background color.void
setForegroundColor
(int foregroundColor) Sets a foreground color.void
Sets an item to bound into a cell.void
setStyle
(int style) Sets a style.Methods inherited from interface org.springframework.shell.component.view.control.Control
draw, getRect, setRect, setThemeName, setThemeResolver
-
Method Details
-
getItem
T getItem()Get item bound to a cell.- Returns:
- item bound to a cell
-
setItem
Sets an item to bound into a cell.- Parameters:
item
- item to bound into a cell
-
setStyle
void setStyle(int style) Sets a style.- Parameters:
style
- the style
-
setForegroundColor
void setForegroundColor(int foregroundColor) Sets a foreground color.- Parameters:
foregroundColor
- the background color
-
setBackgroundColor
void setBackgroundColor(int backgroundColor) Sets a background color.- Parameters:
backgroundColor
- the background color
-