01: package com.gwtext.client.widgets.grid;
02:
03: import com.google.gwt.core.client.JavaScriptObject;
04: import com.gwtext.client.util.JavaScriptObjectHelper;
05:
06: public class GroupingView extends GridView {
07:
08: public GroupingView() {
09: }
10:
11: protected native JavaScriptObject create(JavaScriptObject config) /*-{
12: var gridJ = this;
13: var gridV = new $wnd.Ext.grid.GroupingView(config);
14: gridV.getRowClass = function(record, index, rp, store) {
15: var recordJ = @com.gwtext.client.data.Record::instance(Lcom/google/gwt/core/client/JavaScriptObject;)(record);
16: var rpJ = @com.gwtext.client.widgets.grid.RowParams::instance(Lcom/google/gwt/core/client/JavaScriptObject;)(rp);
17: var storeJ = @com.gwtext.client.data.Store::instance(Lcom/google/gwt/core/client/JavaScriptObject;)(store);
18: return gridJ.@com.gwtext.client.widgets.grid.GridView::getRowClass(Lcom/gwtext/client/data/Record;ILcom/gwtext/client/widgets/grid/RowParams;Lcom/gwtext/client/data/Store;)(recordJ, index, rpJ, storeJ);
19: }
20: return gridV;
21: }-*/;
22:
23: //config
24: public void setEmptyGroupText(String emptyGroupText) {
25: JavaScriptObjectHelper.setAttribute(configJS, "emptyGroupText",
26: emptyGroupText);
27: }
28:
29: public void setEnableGrouping(boolean enableGrouping) {
30: JavaScriptObjectHelper.setAttribute(configJS, "enableGrouping",
31: enableGrouping);
32: }
33:
34: public void setEnableGroupingMenu(boolean enableGroupingMenu) {
35: JavaScriptObjectHelper.setAttribute(configJS,
36: "enableGroupingMenu", enableGroupingMenu);
37: }
38:
39: public void setEnableNoGroups(boolean enableNoGroups) {
40: JavaScriptObjectHelper.setAttribute(configJS, "enableNoGroups",
41: enableNoGroups);
42: }
43:
44: public void setGroupByText(String groupByText) {
45: JavaScriptObjectHelper.setAttribute(configJS, "groupByText",
46: groupByText);
47: }
48:
49: public void setGroupTextTpl(String groupTextTpl) {
50: JavaScriptObjectHelper.setAttribute(configJS, "groupTextTpl",
51: groupTextTpl);
52: }
53:
54: public void setHideGroupedColumn(boolean hideGroupedColumn) {
55: JavaScriptObjectHelper.setAttribute(configJS,
56: "hideGroupedColumn", hideGroupedColumn);
57: }
58:
59: public void setIgnoreAdd(boolean ignoreAdd) {
60: JavaScriptObjectHelper.setAttribute(configJS, "ignoreAdd",
61: ignoreAdd);
62: }
63:
64: public void setShowGroupName(boolean showGroupName) {
65: JavaScriptObjectHelper.setAttribute(configJS, "showGroupName",
66: showGroupName);
67: }
68:
69: public void setShowGroupsText(boolean showGroupsText) {
70: JavaScriptObjectHelper.setAttribute(configJS, "showGroupsText",
71: showGroupsText);
72: }
73:
74: public void setStartCollapsed(boolean startCollapsed) {
75: JavaScriptObjectHelper.setAttribute(configJS, "startCollapsed",
76: startCollapsed);
77: }
78: }
|