Class PopoverRenderer<ITEM>
java.lang.Object
com.vaadin.flow.data.renderer.Renderer<ITEM>
com.vaadin.flow.data.renderer.LitRenderer<ITEM>
com.vaadin.flow.data.renderer.ComponentRenderer<com.vaadin.flow.component.Component,ITEM>
io.jmix.flowui.component.grid.renderer.PopoverRenderer<ITEM>
- Type Parameters:
ITEM- the type of the items being rendered
- All Implemented Interfaces:
Serializable
public class PopoverRenderer<ITEM>
extends com.vaadin.flow.data.renderer.ComponentRenderer<com.vaadin.flow.component.Component,ITEM>
A renderer for creating popover-enabled components in a user interface.
This class extends
ComponentRenderer and uses provided functions
to generate components with optional popover tooltips containing additional information.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPopoverRenderer(Function<ITEM, String> popoverTextProvider) PopoverRenderer(Function<ITEM, String> popoverTextProvider, com.vaadin.flow.function.SerializableFunction<ITEM, com.vaadin.flow.component.Component> componentFunction) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyClassNames(com.vaadin.flow.component.HasStyle component) protected voidapplyStyles(com.vaadin.flow.component.Component target) @Nullable com.vaadin.flow.component.ComponentcreateComponent(ITEM item) protected com.vaadin.flow.component.ComponentcreatePopoverContent(String text) Creates the content component of the popover.withClassNames(@Nullable String classNames) Sets class names for the rendered component and for its popover.Sets inline CSS declarations for the rendered component.withMarkdown(boolean markdown) Sets whether the popover text is rendered as Markdown.withPosition(com.vaadin.flow.component.popover.PopoverPosition position) Sets the popover position in relation to the rendered component.Methods inherited from class com.vaadin.flow.data.renderer.ComponentRenderer
getTemplateExpression, render, updateComponentMethods inherited from class com.vaadin.flow.data.renderer.LitRenderer
getValueProviders, of, withFunction, withFunction, withPropertyMethods inherited from class com.vaadin.flow.data.renderer.Renderer
render
-
Field Details
-
position
protected com.vaadin.flow.component.popover.PopoverPosition position -
classNames
-
css
-
markdown
protected boolean markdown
-
-
Constructor Details
-
PopoverRenderer
-
PopoverRenderer
-
-
Method Details
-
createComponent
- Overrides:
createComponentin classcom.vaadin.flow.data.renderer.ComponentRenderer<com.vaadin.flow.component.Component,ITEM>
-
applyStyles
protected void applyStyles(com.vaadin.flow.component.Component target) -
applyClassNames
protected void applyClassNames(com.vaadin.flow.component.HasStyle component) -
createPopoverContent
Creates the content component of the popover.- Parameters:
text- popover text- Returns:
- a
Markdowncomponent if the text is rendered as Markdown, aDivotherwise
-
withPosition
public PopoverRenderer<ITEM> withPosition(com.vaadin.flow.component.popover.PopoverPosition position) Sets the popover position in relation to the rendered component.- Parameters:
position- popover position- Returns:
- this renderer
-
withClassNames
Sets class names for the rendered component and for its popover.- Parameters:
classNames- space- or comma-separated class names, ornullto clear them- Returns:
- this renderer
-
withCss
Sets inline CSS declarations for the rendered component. They are not applied to the popover.- Parameters:
css- CSS declarations separated by semicolons, ornullto clear them- Returns:
- this renderer
-
withMarkdown
Sets whether the popover text is rendered as Markdown. The rendered component always shows plain text.- Parameters:
markdown-trueto render the popover text as Markdown- Returns:
- this renderer
-