@FunctionalInterface public interface ItemDisplay<T> extends org.jboss.gwt.elemento.core.IsElement, HasTitle
HasTitle.getTitle() method.
Override the default implementations if you need more control over the display and behaviour of the item.| Modifier and Type | Method and Description |
|---|---|
default List<ItemAction<T>> |
actions()
Defines the action(s) available for the item.
|
default elemental2.dom.HTMLElement |
asElement()
If this method returns an element !=
null this element is used to display the item. |
default String |
getFilterData()
The data which is used to filter items.
|
default elemental2.dom.HTMLElement |
getIcon()
Whether to show an icon left to the item text.
|
default String |
getId()
An unique id for this item.
|
default String |
getTooltip()
Whether a tooltip should be shown for the item.
|
default String |
nextColumn()
Whether this item triggers a next column (hence is a folder not a leaf).
|
static elemental2.dom.HTMLElement |
withSubtitle(String title,
String subtitle)
Factory methods which can be used when overriding
asElement(). |
default String getId()
Please make sure the id returned by this method matches the id which is part of the FinderPath returned
by HasFinderPath.finderPath()
HasTitle.getTitle(): Ids.asId(getTitle())default String getFilterData()
HasTitle.getTitle() by defaultdefault String getTooltip()
null by default (no tooltip)default elemental2.dom.HTMLElement getIcon()
Icons for a list of common icons.null by defaultdefault String nextColumn()
null by defaultdefault List<ItemAction<T>> actions()
default elemental2.dom.HTMLElement asElement()
null this element is used to display the item.asElement in interface org.jboss.gwt.elemento.core.IsElementnull by defaultstatic elemental2.dom.HTMLElement withSubtitle(String title, String subtitle)
asElement(). Creates a <div> element with two
nested <span> elements. One for the title and a smaller one for the subtitle.title - subtitle - Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.