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.menu;
10:
11: import com.google.gwt.core.client.JavaScriptObject;
12: import com.gwtext.client.widgets.DatePicker;
13:
14: /**
15: * A menu item that wraps the {@link DatePicker} component.
16: */
17: public class DateItem extends Item {
18:
19: private static JavaScriptObject configPrototype;
20:
21: static {
22: init();
23: }
24:
25: private static native void init()/*-{
26: var c = new $wnd.Ext.menu.DateItem();
27: @com.gwtext.client.widgets.menu.DateItem::configPrototype = c.initialConfig;
28: }-*/;
29:
30: protected JavaScriptObject getConfigPrototype() {
31: return configPrototype;
32: }
33:
34: /**
35: * Create a new DateItem.
36: */
37: public DateItem() {
38: }
39:
40: protected native JavaScriptObject create(JavaScriptObject config) /*-{
41: return new $wnd.Ext.menu.DateItem(config);
42: }-*/;
43:
44: /**
45: * The {@link DatePicker} object.
46: *
47: * @return the DatePicker object
48: */
49: public native DatePicker getPicker()/*-{
50: var di = this.@com.gwtext.client.widgets.Component::getOrCreateJsObj()();
51: return @com.gwtext.client.widgets.DatePicker::instance(Lcom/google/gwt/core/client/JavaScriptObject;)(di.picker);
52: }-*/;
53: }
|