Class TextRenderer<ITEM>

    • Constructor Detail

      • TextRenderer

        public TextRenderer()
        Creates a new renderer instance using the default ItemLabelGenerator: String::valueOf.
      • TextRenderer

        public TextRenderer​(ItemLabelGenerator<ITEM> itemLabelGenerator)
        Creates a new renderer instance using the provided itemLabelGenerator.
        Parameters:
        itemLabelGenerator - the item label generator
    • Method Detail

      • createComponent

        public Component createComponent​(ITEM item)
        Description copied from class: ComponentRenderer
        Creates a component for a given object model item. Subclasses can override this method to provide specific behavior.
        Overrides:
        createComponent in class ComponentRenderer<Component,​ITEM>
        Parameters:
        item - the model item, possibly null
        Returns:
        a component instance representing the provided item
      • createElement

        protected Element createElement​(String item)
        Creates a new Element that represent the rendered item.

        By default the text is wrapped inside a <span> element. Subclasses may override this method to return some other Element.

        Parameters:
        item - the item to render
        Returns:
        the element representing rendered item