Package com.vaadin.browserless.internal
Class Renderers
java.lang.Object
com.vaadin.browserless.internal.Renderers
Functions for computing the output of renderers.
For internal use only. May be renamed or removed in a future release.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> String_getPresentationValue(Renderer<T> renderer, T rowObject) Returns the output of this renderer for givenrowObjectformatted as close as possible to the client-side output.static <T> StringrenderLitTemplate(String template, Map<String, ? extends ValueProvider<T, ?>> valueProviders, T item) Renders the given littemplate, replacing each${item.key}with the output of the corresponding value provider.static <T> StringrenderText(TextRenderer<T> renderer, T item) Returns the text rendered for givenitem.
-
Method Details
-
_getPresentationValue
Returns the output of this renderer for givenrowObjectformatted as close as possible to the client-side output.- Type Parameters:
T- the item type.- Parameters:
renderer- the renderer, not null.rowObject- the item to render.- Returns:
- the rendered value, or null if the renderer is not supported.
-
renderLitTemplate
public static <T> String renderLitTemplate(String template, Map<String, ? extends ValueProvider<T, ?>> valueProviders, T item) Renders the given littemplate, replacing each${item.key}with the output of the corresponding value provider.- Type Parameters:
T- the item type.- Parameters:
template- the lit template expression.valueProviders- the value providers, keyed by property name.item- the item to render.- Returns:
- the rendered template.
-
renderText
Returns the text rendered for givenitem.- Type Parameters:
T- the item type.- Parameters:
renderer- the text renderer, not null.item- the item to render.- Returns:
- the rendered text.
-