Class AbstractCell<T>
java.lang.Object
org.springframework.shell.component.view.control.AbstractControl
org.springframework.shell.component.view.control.cell.AbstractCell<T>
- Direct Known Subclasses:
ListCell
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintgetItem()Get item bound to a cell.intgetStyle()booleanReturn if cell is selected.voidsetBackgroundColor(int backgroundColor) Sets a background color.voidsetForegroundColor(int foregroundColor) Sets a foreground color.voidSets an item to bound into a cell.voidsetStyle(int style) Sets a style.voidupdateSelected(boolean selected) Update selected status.Methods inherited from class org.springframework.shell.component.view.control.AbstractControl
getRect, getThemeName, getThemeResolver, resolveThemeBackground, resolveThemeForeground, resolveThemeStyle, setRect, 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.component.view.control.Control
draw, getRect, setRect, setThemeName, setThemeResolver
-
Constructor Details
-
AbstractCell
public AbstractCell()
-
-
Method Details
-
getItem
Description copied from interface:CellGet item bound to a cell. -
setItem
Description copied from interface:CellSets an item to bound into a cell. -
isSelected
public boolean isSelected()Description copied from interface:CellReturn if cell is selected.- Specified by:
isSelectedin interfaceCell<T>- Returns:
- true if cell is selected
-
updateSelected
public void updateSelected(boolean selected) Description copied from interface:CellUpdate selected status.- Specified by:
updateSelectedin interfaceCell<T>- Parameters:
selected- true if cell is selected
-
setStyle
public void setStyle(int style) Description copied from interface:CellSets a style. -
setForegroundColor
public void setForegroundColor(int foregroundColor) Description copied from interface:CellSets a foreground color.- Specified by:
setForegroundColorin interfaceCell<T>- Parameters:
foregroundColor- the background color
-
setBackgroundColor
public void setBackgroundColor(int backgroundColor) Description copied from interface:CellSets a background color.- Specified by:
setBackgroundColorin interfaceCell<T>- Parameters:
backgroundColor- the background color
-
getStyle
public int getStyle() -
getForegroundColor
public int getForegroundColor() -
getBackgroundColor
public int getBackgroundColor()
-