ITEM
- the type of the input object that can be used by the rendered
componentpublic class TextRenderer<ITEM> extends ComponentRenderer<Component,ITEM>
ItemLabelGenerator
.Constructor and Description |
---|
TextRenderer()
Creates a new renderer instance using the default
ItemLabelGenerator : String::valueOf . |
TextRenderer(ItemLabelGenerator<ITEM> itemLabelGenerator)
Creates a new renderer instance using the provided
itemLabelGenerator . |
Modifier and Type | Method and Description |
---|---|
Component |
createComponent(ITEM item)
Creates a component for a given object model item.
|
protected Element |
createElement(String item)
Creates a new
Element that represent the rendered item . |
render, setComponentRendererTag, updateComponent
getEventHandlers, getValueProviders, render, setEventHandler, setProperty
public TextRenderer()
ItemLabelGenerator
: String::valueOf
.public TextRenderer(ItemLabelGenerator<ITEM> itemLabelGenerator)
itemLabelGenerator
.itemLabelGenerator
- the item label generatorpublic Component createComponent(ITEM item)
ComponentRenderer
createComponent
in class ComponentRenderer<Component,ITEM>
item
- the model item, possibly null
protected Element createElement(String item)
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
.
item
- the item to renderCopyright © 2020. All rights reserved.