public class DefaultCellRenderer<T> extends java.lang.Object implements CellRenderer<T>, java.lang.Cloneable
Constructor and Description |
---|
DefaultCellRenderer() |
DefaultCellRenderer(com.simsilica.lemur.style.ElementId elementId,
java.lang.String style) |
DefaultCellRenderer(com.simsilica.lemur.style.ElementId elementId,
java.lang.String style,
com.google.common.base.Function<T,java.lang.String> transform) |
DefaultCellRenderer(java.lang.String style) |
Modifier and Type | Method and Description |
---|---|
DefaultCellRenderer<T> |
clone() |
void |
configureStyle(com.simsilica.lemur.style.ElementId elementId,
java.lang.String style)
Default implementation uses the specified style unless the renderer
already has an elementId and style set.
|
com.simsilica.lemur.style.ElementId |
getElement() |
java.lang.String |
getStyle() |
com.google.common.base.Function<T,java.lang.String> |
getTransform() |
com.simsilica.lemur.Panel |
getView(T value,
boolean selected,
com.simsilica.lemur.Panel existing)
Returns a new view Panel or returns a reconfigured version of
the existing Panel that will display the specified value.
|
void |
setTransform(com.google.common.base.Function<T,java.lang.String> transform) |
protected java.lang.String |
valueToString(T value) |
public DefaultCellRenderer()
public DefaultCellRenderer(java.lang.String style)
public DefaultCellRenderer(com.simsilica.lemur.style.ElementId elementId, java.lang.String style)
public DefaultCellRenderer(com.simsilica.lemur.style.ElementId elementId, java.lang.String style, com.google.common.base.Function<T,java.lang.String> transform)
public DefaultCellRenderer<T> clone()
clone
in class java.lang.Object
public void configureStyle(com.simsilica.lemur.style.ElementId elementId, java.lang.String style)
configureStyle
in interface ValueRenderer<T>
public void setTransform(com.google.common.base.Function<T,java.lang.String> transform)
public com.google.common.base.Function<T,java.lang.String> getTransform()
public com.simsilica.lemur.style.ElementId getElement()
public java.lang.String getStyle()
protected java.lang.String valueToString(T value)
public com.simsilica.lemur.Panel getView(T value, boolean selected, com.simsilica.lemur.Panel existing)
ValueRenderer
getView
in interface CellRenderer<T>
getView
in interface ValueRenderer<T>