Class AbstractTextCell<T>
java.lang.Object
org.springframework.shell.component.view.control.AbstractControl
org.springframework.shell.component.view.control.cell.AbstractCell<T>
org.springframework.shell.component.view.control.cell.AbstractTextCell<T>
- Direct Known Subclasses:
TextCell.DefaultTextCell
Base implementation of a
TextCell.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.shell.component.view.control.cell.TextCell
TextCell.DefaultTextCell<T> -
Constructor Summary
ConstructorsConstructorDescriptionAbstractTextCell(T item, Function<T, String> itemFunction) AbstractTextCell(T item, Function<T, String> itemFunction, HorizontalAlign hAlign, VerticalAlign vAlign) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddrawBackground(Screen screen) protected voiddrawContent(Screen screen) protected StringvoidsetHorizontalAlign(HorizontalAlign hAlign) Sets horizontal align for a text to draw.voidsetVerticalAlign(VerticalAlign vAlign) Sets vertical align for a text to draw.Methods inherited from class org.springframework.shell.component.view.control.cell.AbstractCell
draw, getBackgroundColor, getForegroundColor, getItem, getStyle, setBackgroundColor, setForegroundColor, setItem, setStyleMethods inherited from class org.springframework.shell.component.view.control.AbstractControl
getRect, getThemeName, getThemeResolver, resolveThemeBackground, resolveThemeForeground, resolveThemeSpinner, 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.cell.Cell
getItem, setBackgroundColor, setForegroundColor, setItem, setStyleMethods inherited from interface org.springframework.shell.component.view.control.Control
draw, getRect, setRect, setThemeName, setThemeResolver
-
Constructor Details
-
AbstractTextCell
-
AbstractTextCell
public AbstractTextCell(T item, Function<T, String> itemFunction, HorizontalAlign hAlign, VerticalAlign vAlign)
-
-
Method Details
-
setHorizontalAlign
Description copied from interface:TextCellSets horizontal align for a text to draw. Defaults toHorizontalAlign.CENTER.- Specified by:
setHorizontalAlignin interfaceTextCell<T>- Parameters:
hAlign- the horizontal align
-
setVerticalAlign
Description copied from interface:TextCellSets vertical align for a text to draw. Defaults toVerticalAlign.CENTER.- Specified by:
setVerticalAlignin interfaceTextCell<T>- Parameters:
vAlign- the vertical align
-
getBackgroundStyle
-
drawBackground
- Overrides:
drawBackgroundin classAbstractCell<T>
-
drawContent
- Overrides:
drawContentin classAbstractCell<T>
-