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.data;
10:
11: import com.gwtext.client.core.JsObject;
12: import com.gwtext.client.core.SortDir;
13: import com.gwtext.client.util.JavaScriptObjectHelper;
14:
15: public class SortState extends JsObject {
16:
17: private String field;
18: private SortDir direction;
19:
20: public SortState(String field, SortDir direction) {
21: this .field = field;
22: this .direction = direction;
23: jsObj = JavaScriptObjectHelper.createObject();
24: JavaScriptObjectHelper.setAttribute(jsObj, "field", field);
25: JavaScriptObjectHelper.setAttribute(jsObj, "direction",
26: direction.getDirection());
27: }
28:
29: public String getField() {
30: return field;
31: }
32:
33: public SortDir getDirection() {
34: return direction;
35: }
36: }
|