public abstract class ListViewCustomAppearance<M> extends Object implements ListView.ListViewAppearance<M>
Modifier and Type | Field and Description |
---|---|
protected String |
itemSelector |
protected String |
overStyle |
protected String |
selectedStyle |
Constructor and Description |
---|
ListViewCustomAppearance(String itemSelector) |
ListViewCustomAppearance(String itemSelector,
String overStyle,
String selStyle) |
Modifier and Type | Method and Description |
---|---|
Element |
findCellParent(XElement item)
Returns the cell's parent element if it exists.
|
Element |
findElement(XElement child)
Returns the matching element.
|
List<Element> |
findElements(XElement parent)
Returns the child elements.
|
void |
onOver(XElement item,
boolean over)
Handles a cursor over event.
|
void |
onSelect(XElement item,
boolean select)
Handles a select event.
|
void |
render(SafeHtmlBuilder builder)
Renders the container.
|
void |
renderEnd(SafeHtmlBuilder builder)
Optionally renders extra markup at the end of the the list.
|
abstract void |
renderItem(SafeHtmlBuilder builder,
SafeHtml content)
Renders a single item.
|
protected String itemSelector
protected String overStyle
protected String selectedStyle
public ListViewCustomAppearance(String itemSelector)
public Element findCellParent(XElement item)
ListView.ListViewAppearance
findCellParent
in interface ListView.ListViewAppearance<M>
item
- the cell whose parent is to be returnedpublic Element findElement(XElement child)
ListView.ListViewAppearance
findElement
in interface ListView.ListViewAppearance<M>
child
- the element or any child elementpublic List<Element> findElements(XElement parent)
ListView.ListViewAppearance
findElements
in interface ListView.ListViewAppearance<M>
parent
- the parent elementpublic void onOver(XElement item, boolean over)
ListView.ListViewAppearance
onOver
in interface ListView.ListViewAppearance<M>
item
- the item affected by the cursorover
- true if the cursor is over the itempublic void onSelect(XElement item, boolean select)
ListView.ListViewAppearance
onSelect
in interface ListView.ListViewAppearance<M>
item
- the item affected by the selectselect
- true if the item is selectedpublic void render(SafeHtmlBuilder builder)
ListView.ListViewAppearance
render
in interface ListView.ListViewAppearance<M>
builder
- the builderpublic void renderEnd(SafeHtmlBuilder builder)
ListView.ListViewAppearance
renderEnd
in interface ListView.ListViewAppearance<M>
builder
- the builderpublic abstract void renderItem(SafeHtmlBuilder builder, SafeHtml content)
ListView.ListViewAppearance
renderItem
in interface ListView.ListViewAppearance<M>
builder
- the buildercontent
- the item contentCopyright © 2018. All rights reserved.