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
ConstructorDescriptionAbstractTextCell
(T item, Function<T, String> itemFunction) AbstractTextCell
(T item, Function<T, String> itemFunction, HorizontalAlign hAlign, VerticalAlign vAlign) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
drawBackground
(Screen screen) protected void
drawContent
(Screen screen) protected String
void
setHorizontalAlign
(HorizontalAlign hAlign) Sets horizontal align for a text to draw.void
setVerticalAlign
(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, setStyle
Methods inherited from class org.springframework.shell.component.view.control.AbstractControl
getRect, getThemeName, getThemeResolver, resolveThemeBackground, resolveThemeForeground, resolveThemeSpinner, resolveThemeStyle, setRect, setThemeName, setThemeResolver
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.shell.component.view.control.cell.Cell
getItem, setBackgroundColor, setForegroundColor, setItem, setStyle
Methods 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:TextCell
Sets horizontal align for a text to draw. Defaults toHorizontalAlign.CENTER
.- Specified by:
setHorizontalAlign
in interfaceTextCell<T>
- Parameters:
hAlign
- the horizontal align
-
setVerticalAlign
Description copied from interface:TextCell
Sets vertical align for a text to draw. Defaults toVerticalAlign.CENTER
.- Specified by:
setVerticalAlign
in interfaceTextCell<T>
- Parameters:
vAlign
- the vertical align
-
getBackgroundStyle
-
drawBackground
- Overrides:
drawBackground
in classAbstractCell<T>
-
drawContent
- Overrides:
drawContent
in classAbstractCell<T>
-