01: package com.gwtext.client.widgets.grid;
02:
03: import com.google.gwt.core.client.JavaScriptObject;
04: import com.gwtext.client.core.JsObject;
05:
06: /**
07: * RowParams class that is passed to the user when specifying a custom row rendering.
08: *
09: * @see com.gwtext.client.widgets.grid.GridView#getRowClass(com.gwtext.client.data.Record, int, RowParams, com.gwtext.client.data.Store)
10: */
11: public class RowParams extends JsObject {
12:
13: private RowParams(JavaScriptObject jsObj) {
14: super (jsObj);
15: }
16:
17: private static RowParams instance(JavaScriptObject jsObj) {
18: return new RowParams(jsObj);
19: }
20:
21: /**
22: * An HTML fragment to be rendered as the cell's body content (defaults to '').
23: *
24: * @return the row body
25: */
26: public native String getBody() /*-{
27: var rp = this.@com.gwtext.client.core.JsObject::getJsObj()();
28: return rp.body;
29: }-*/;
30:
31: /**
32: * Set the row body as HTML.
33: *
34: * @param body the row body
35: */
36: public native void setBody(String body) /*-{
37: var rp = this.@com.gwtext.client.core.JsObject::getJsObj()();
38: rp.body = body;
39: }-*/;
40:
41: /**
42: * A CSS style string that will be applied to the row's TR style attribute (defaults to '').
43: *
44: * @return the row body the body CSS style
45: */
46: public native String getBodyStyle() /*-{
47: var rp = this.@com.gwtext.client.core.JsObject::getJsObj()();
48: return rp.bodyStyle;
49: }-*/;
50:
51: /**
52: * A CSS style string that will be applied to the row's TR style attribute (defaults to '').
53: *
54: * @param bodyStyle the body style
55: */
56: public native void setBodyStyle(String bodyStyle) /*-{
57: var rp = this.@com.gwtext.client.core.JsObject::getJsObj()();
58: rp.bodyStyle = bodyStyle;
59: }-*/;
60:
61: /**
62: * The column count to apply to the body row's TD colspan attribute (defaults to the current column count of the grid).
63: *
64: * @return the number of cols
65: */
66: public native int getCols() /*-{
67: var rp = this.@com.gwtext.client.core.JsObject::getJsObj()();
68: return rp.cols;
69: }-*/;
70:
71: /**
72: * The column count to apply to the body row's TD colspan attribute (defaults to the current column count of the grid).
73: *
74: * @param cols the number of cols
75: */
76: public native void setcols(int cols) /*-{
77: var rp = this.@com.gwtext.client.core.JsObject::getJsObj()();
78: rp.cols = cols;
79: }-*/;
80: }
|