Class RowNumberer<M>

  extended by com.sencha.gxt.widget.core.client.grid.ColumnConfig<M,M>
      extended by com.sencha.gxt.widget.core.client.grid.RowNumberer<M>
Type Parameters:
M -
All Implemented Interfaces:

public 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 LinkedList<ColumnConfig<Data, ?>>();
    RowNumberer<Data> rn = new RowNumberer<Test.Data>(new IdentityValueProvider<Data>());
    ... add more column configs ...
    ColumnModel<Data> cm = new ColumnModel<Test.Data>(ccs);
    Grid<Data> g = new Grid<Data>(s, cm);

Nested Class Summary
static interface RowNumberer.RowNumbererAppearance
Constructor Summary
RowNumberer(IdentityValueProvider<M> valueProvider)
          Creates a row numberer.
Method Summary
 void initPlugin(Grid<M> component)
          Initializes the plugin.
Methods inherited from class com.sencha.gxt.widget.core.client.grid.ColumnConfig
getAlignment, getCell, getColumnClassSuffix, getColumnHeaderClassName, getColumnStyle, getColumnTextClassName, getColumnTextStyle, getComparator, getHeader, getPath, getToolTip, getValueProvider, getWidget, getWidth, isFixed, isGroupable, isHidden, isHideable, isMenuDisabled, isResizable, isRowHeader, isSortable, setAlignment, setCell, setColumnClassSuffix, setColumnHeaderClassName, setColumnStyle, setColumnTextClassName, setColumnTextStyle, setComparator, setFixed, setGroupable, setHeader, setHeader, setHidden, setHideable, setMenuDisabled, setResizable, setRowHeader, setSortable, setToolTip, setWidget, setWidth
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public RowNumberer(IdentityValueProvider<M> valueProvider)
Creates a row numberer. To use the row numberer, add it to a column model, create a grid with the column model and then invoke initPlugin(Grid) on the grid.

valueProvider - an identity value provider (e.g. new IdentityValueProvider()).
Method Detail


public void initPlugin(Grid<M> component)
Description copied from interface: ComponentPlugin
Initializes the plugin.

Specified by:
initPlugin in interface ComponentPlugin<Grid<M>>
component - the target component

Copyright © 2012. All Rights Reserved.