TRowObject - The row type.public static class GridHelper.ColumnInfo<TRowObject>
extends java.lang.Object
DataGrid using the GridHelper.initListGrid methods.| Modifier and Type | Field and Description |
|---|---|
private java.util.function.BiFunction<TRowObject,TRowObject,java.lang.Integer> |
comparator
Row comparator
|
private java.util.function.Consumer<TRowObject> |
dblclickHandler
Double click handler
|
private java.lang.String |
headerLabel
Header label
|
private boolean |
htmlCell
Flag indentifying this cell contains HTML code.
|
private java.util.function.Function<TRowObject,?> |
valueGetter
Value getter
|
private double |
widthInPercents
Width in percents
|
private int |
widthInPixels
Width in pixels
|
| Constructor and Description |
|---|
ColumnInfo(java.lang.String headerLabel,
java.util.function.Function<TRowObject,com.google.gwt.safehtml.shared.SafeHtml> valueGetter,
boolean htmlCell)
Ctor.
|
ColumnInfo(java.lang.String headerLabel,
java.util.function.Function<TRowObject,java.lang.String> valueGetter)
Ctor.
|
ColumnInfo(java.lang.String headerLabel,
java.util.function.Function<TRowObject,java.lang.String> valueGetter,
java.util.function.BiFunction<TRowObject,TRowObject,java.lang.Integer> comparator)
Ctor.
|
ColumnInfo(java.lang.String headerLabel,
java.util.function.Function<TRowObject,java.lang.String> valueGetter,
java.util.function.BiFunction<TRowObject,TRowObject,java.lang.Integer> comparator,
java.util.function.Consumer<TRowObject> dblclickHandler)
Ctor.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.function.BiFunction<TRowObject,TRowObject,java.lang.Integer> |
getComparator()
Returns the row comparator.
|
java.lang.String |
getHeaderLabel()
Returns the column header label.
|
java.lang.Object |
getValue(TRowObject object)
Use the
valueGetter to compute the value for this column. |
double |
getWidthInPercents()
Returns column width in %.
|
int |
getWidthInPixels()
Returns column width in pixels.
|
private void |
initComparator()
Initializes the default row comparator.
|
boolean |
isHtmlCell()
Get the state of the
htmlCell flag. |
void |
setWidthInPercents(double widthInPercents)
Sets column width in %.
|
void |
setWidthInPixels(int widthInPixels)
Sets column width in pixels.
|
private java.lang.String headerLabel
private java.util.function.Function<TRowObject,?> valueGetter
private java.util.function.BiFunction<TRowObject,TRowObject,java.lang.Integer> comparator
private java.util.function.Consumer<TRowObject> dblclickHandler
private boolean htmlCell
private int widthInPixels
private double widthInPercents
public ColumnInfo(java.lang.String headerLabel,
java.util.function.Function<TRowObject,com.google.gwt.safehtml.shared.SafeHtml> valueGetter,
boolean htmlCell)
headerLabel - Column header label.valueGetter - Value getter.htmlCell - Flag marking this column as containing HTML code.public ColumnInfo(java.lang.String headerLabel,
java.util.function.Function<TRowObject,java.lang.String> valueGetter)
headerLabel - Column header label.valueGetter - Value getter.public ColumnInfo(java.lang.String headerLabel,
java.util.function.Function<TRowObject,java.lang.String> valueGetter,
java.util.function.BiFunction<TRowObject,TRowObject,java.lang.Integer> comparator)
headerLabel - Column header label.valueGetter - Value getter.comparator - Row comparator.public ColumnInfo(java.lang.String headerLabel,
java.util.function.Function<TRowObject,java.lang.String> valueGetter,
java.util.function.BiFunction<TRowObject,TRowObject,java.lang.Integer> comparator,
java.util.function.Consumer<TRowObject> dblclickHandler)
headerLabel - Column header label.valueGetter - Value getter.comparator - Row comparator.dblclickHandler - Doubleclick handler.public boolean isHtmlCell()
htmlCell flag.public java.lang.String getHeaderLabel()
public java.lang.Object getValue(TRowObject object)
valueGetter to compute the value for this column.object - The object with the rows's data.public int getWidthInPixels()
public void setWidthInPixels(int widthInPixels)
widthInPixels - Column width in pixels.public double getWidthInPercents()
public void setWidthInPercents(double widthInPercents)
widthInPercents - Column width in %.public java.util.function.BiFunction<TRowObject,TRowObject,java.lang.Integer> getComparator()
private void initComparator()