E - the type of the cellpublic interface CellFormatter<E>
| Modifier and Type | Method and Description |
|---|---|
void |
asLink(CellWrapper<E> cell,
String resolvedUrl,
String link,
String text)
formats the content as a hyperlink.
|
void |
check(CellWrapper<E> valueCell,
RestDataTypeAdapter adapter)
formats a check cell.
|
void |
exception(CellWrapper<E> cellWrapper,
String exceptionMessage)
formats a cell containing an exception.
|
void |
exception(CellWrapper<E> cellWrapper,
Throwable exception)
formats a cell containing an exception.
|
String |
fromRaw(String text)
in SLIM cell content is HTML escaped - we abstract this method to
delegate to formatter the cleaning of the content.
|
String |
gray(String string)
formats a cell with a gray background.
|
boolean |
isDisplayActual() |
String |
label(String string)
formats a cell label
|
void |
right(CellWrapper<E> expected,
RestDataTypeAdapter typeAdapter)
formats a cell representing a right expectation.
|
void |
setDisplayAbsoluteURLInFull(boolean displayAbsoluteURLInFull)
sets whether absolute urls are displayed in full
|
void |
setDisplayActual(boolean displayActual)
sets whether the cell should display the actual value after evaluation.
|
void |
setMinLengthForToggleCollapse(int minLen)
renders the cell as a toggle area if the content of the cell is over the
min value set here.
|
void |
wrong(CellWrapper<E> expected,
RestDataTypeAdapter typeAdapter)
formats a cell representing a wrong expectation.
|
void exception(CellWrapper<E> cellWrapper, Throwable exception)
cellWrapper - the cell wrapperexception - the excteption to render.void exception(CellWrapper<E> cellWrapper, String exceptionMessage)
cellWrapper - the cell wrapperexceptionMessage - the exception message to render.void check(CellWrapper<E> valueCell, RestDataTypeAdapter adapter)
valueCell - the cell value.adapter - the adapter interpreting the value.String label(String string)
string - the labelvoid wrong(CellWrapper<E> expected, RestDataTypeAdapter typeAdapter)
expected - the expected valuetypeAdapter - the adapter with the actual value.void right(CellWrapper<E> expected, RestDataTypeAdapter typeAdapter)
expected - the expected valuetypeAdapter - the adapter with the actual value.String gray(String string)
string - the contentvoid asLink(CellWrapper<E> cell, String resolvedUrl, String link, String text)
cell - the cell.resolvedUrl - the cell content after symbols' substitution.link - the uri in the href.text - the text.void setDisplayActual(boolean displayActual)
displayActual - true if actual value has to be rendered.void setDisplayAbsoluteURLInFull(boolean displayAbsoluteURLInFull)
displayAbsoluteURLInFull - the value to setvoid setMinLengthForToggleCollapse(int minLen)
minLen - the min value of the content of a cell.boolean isDisplayActual()
Copyright © 2017 smartrics. All rights reserved.