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 Details

    • position

      protected com.vaadin.flow.component.popover.PopoverPosition position
    • classNames

      protected String classNames
    • css

      protected String css
    • markdown

      protected boolean markdown
  • Constructor Details

    • PopoverRenderer

      public PopoverRenderer(Function<ITEM,String> popoverTextProvider)
    • PopoverRenderer

      public PopoverRenderer(Function<ITEM,String> popoverTextProvider, com.vaadin.flow.function.SerializableFunction<ITEM,com.vaadin.flow.component.Component> componentFunction)
  • Method Details

    • createComponent

      public @Nullable com.vaadin.flow.component.Component createComponent(ITEM item)
      Overrides:
      createComponent in class com.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

      protected com.vaadin.flow.component.Component createPopoverContent(String text)
      Creates the content component of the popover.
      Parameters:
      text - popover text
      Returns:
      a Markdown component if the text is rendered as Markdown, a Div otherwise
    • 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

      public PopoverRenderer<ITEM> withClassNames(@Nullable String classNames)
      Sets class names for the rendered component and for its popover.
      Parameters:
      classNames - space- or comma-separated class names, or null to clear them
      Returns:
      this renderer
    • withCss

      public PopoverRenderer<ITEM> withCss(@Nullable String css)
      Sets inline CSS declarations for the rendered component. They are not applied to the popover.
      Parameters:
      css - CSS declarations separated by semicolons, or null to clear them
      Returns:
      this renderer
    • withMarkdown

      public PopoverRenderer<ITEM> withMarkdown(boolean markdown)
      Sets whether the popover text is rendered as Markdown. The rendered component always shows plain text.
      Parameters:
      markdown - true to render the popover text as Markdown
      Returns:
      this renderer