M
- the model typepublic class RowNumberer<M> extends ColumnConfig<M,M> implements ComponentPlugin<Grid<M>>
A ColumnConfig
that provides an automatic row numbering column.
Code Snippet:
List<ColumnConfig<Data, ?>> ccs = new ArrayList<ColumnConfig<Data, ?>>();
RowNumberer<Data> rn = new RowNumberer<Test.Data>();
ccs.add(rn);
... add more column configs ...
ColumnModel<Data> cm = new ColumnModel<Test.Data>(ccs);
Grid<Data> g = new Grid<Data>(s, cm);
rn.initPlugin(g);
Modifier and Type | Class and Description |
---|---|
static interface |
RowNumberer.RowNumbererAppearance |
Modifier and Type | Field and Description |
---|---|
protected Grid<M> |
grid |
ariaIgnore
Constructor and Description |
---|
RowNumberer()
Creates a row numberer.
|
RowNumberer(RowNumberer.RowNumbererAppearance appearance)
Creates a row numberer.
|
RowNumberer(ValueProvider<M,M> valueProvider)
Creates a row numberer.
|
RowNumberer(ValueProvider<M,M> valueProvider,
RowNumberer.RowNumbererAppearance appearance)
Creates a row numberer.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doUpdate() |
void |
initPlugin(Grid<M> component)
Initializes the plugin.
|
protected void |
render(Context context,
M value,
SafeHtmlBuilder sb) |
getCell, getCellClassName, getColumnHeaderClassName, getColumnStyle, getColumnTextClassName, getColumnTextStyle, getComparator, getHeader, getHorizontalAlignment, getHorizontalHeaderAlignment, getPath, getToolTip, getValueProvider, getVerticalAlignment, getWidget, getWidth, isCellPadding, isFixed, isGroupable, isHidden, isHideable, isMenuDisabled, isResizable, isRowHeader, isSortable, setCell, setCellClassName, setCellPadding, setColumnHeaderClassName, setColumnStyle, setColumnTextClassName, setColumnTextStyle, setComparator, setFixed, setGroupable, setHeader, setHidden, setHideable, setHorizontalAlignment, setHorizontalHeaderAlignment, setMenuDisabled, setResizable, setRowHeader, setSortable, setToolTip, setVerticalAlignment, setWidget, setWidth
public RowNumberer()
initPlugin(Grid)
on the grid.public RowNumberer(RowNumberer.RowNumbererAppearance appearance)
initPlugin(Grid)
on the grid.appearance
- an alternate appearance instance to specify exactly how to draw this columnpublic RowNumberer(ValueProvider<M,M> valueProvider)
initPlugin(Grid)
on the grid.valueProvider
- access to the current instance to be rendered in each rowpublic RowNumberer(ValueProvider<M,M> valueProvider, RowNumberer.RowNumbererAppearance appearance)
initPlugin(Grid)
on the grid.valueProvider
- access to the current instance to be rendered in each rowappearance
- an alternate appearance instance to specify exactly how to draw this columnprotected void render(Context context, M value, SafeHtmlBuilder sb)
public void initPlugin(Grid<M> component)
ComponentPlugin
initPlugin
in interface ComponentPlugin<Grid<M>>
component
- the target componentprotected void doUpdate()
Copyright © 2018. All rights reserved.