ITEM
- the type of the input object that can be used by the rendered
componentpublic class IconRenderer<ITEM> extends ComponentRenderer<Component,ITEM>
Constructor and Description |
---|
IconRenderer(SerializableFunction<ITEM,? extends Component> iconGenerator)
Creates a new renderer instance using the default
ItemLabelGenerator : String::valueOf and the provided
iconGenerator . |
IconRenderer(SerializableFunction<ITEM,? extends Component> iconGenerator,
ItemLabelGenerator<ITEM> itemLabelGenerator)
Creates a new renderer instance using the provided
iconGenerator
and itemLabelGenerator . |
Modifier and Type | Method and Description |
---|---|
Component |
createComponent(ITEM item)
Creates a component for a given object model item.
|
render, setComponentRendererTag, updateComponent
getEventHandlers, getValueProviders, render, setEventHandler, setProperty
public IconRenderer(SerializableFunction<ITEM,? extends Component> iconGenerator)
ItemLabelGenerator
: String::valueOf
and the provided
iconGenerator
.iconGenerator
- the icon component generatorpublic IconRenderer(SerializableFunction<ITEM,? extends Component> iconGenerator, ItemLabelGenerator<ITEM> itemLabelGenerator)
iconGenerator
and itemLabelGenerator
.iconGenerator
- the icon component generatoritemLabelGenerator
- the item label generatorpublic Component createComponent(ITEM item)
ComponentRenderer
createComponent
in class ComponentRenderer<Component,ITEM>
item
- the model item, possibly null
Copyright © 2019. All rights reserved.