01: /*
02: * GWT-Ext Widget Library
03: * Copyright(c) 2007-2008, GWT-Ext.
04: * licensing@gwt-ext.com
05: *
06: * http://www.gwt-ext.com/license
07: */
08:
09: package com.gwtext.client.widgets.grid;
10:
11: import com.gwtext.client.data.Record;
12: import com.gwtext.client.data.Store;
13:
14: /**
15: * Inteface for custom Grid column rendering.
16: *
17: * @see com.gwtext.client.widgets.grid.ColumnConfig#setRenderer(Renderer)
18: */
19: public interface Renderer {
20:
21: /**
22: * Renderer function.
23: *
24: * @param value the cells value. When working with numberic data, cast the value to {@link java.lang.Number}
25: * and not to a specific data type line Integer or Float as the class type is inferred from the data
26: * @param cellMetadata the grid cell metadata. Can be use to customize the apperanace of the grid cell
27: * @param record the record corresponding to the row
28: * @param rowIndex the row index
29: * @param colNum the column number
30: * @param store the Grid's data store
31: * @return the rendered cell content (can include html)
32: */
33: String render(Object value, CellMetadata cellMetadata,
34: Record record, int rowIndex, int colNum, Store store);
35: }
|