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.dd;
10:
11: import com.google.gwt.core.client.JavaScriptObject;
12: import com.google.gwt.user.client.Element;
13: import com.gwtext.client.widgets.Component;
14:
15: public class DD extends DragDrop {
16:
17: public DD(JavaScriptObject jsObj) {
18: super (jsObj);
19: }
20:
21: public DD(String id) {
22: this (id, null);
23: }
24:
25: public DD(Component component) {
26: super (component);
27: }
28:
29: public DD(String id, String sGroup) {
30: this (id, sGroup, null);
31: }
32:
33: public DD(Component component, String sGroup) {
34: super (component, sGroup);
35: }
36:
37: public DD(String id, String sGroup, DragDropConfig config) {
38: super (id, sGroup, config);
39: }
40:
41: public DD(Component component, String sGroup, DragDropConfig config) {
42: super (component, sGroup, config);
43: }
44:
45: protected native JavaScriptObject create(String id, String sGroup,
46: JavaScriptObject config)/*-{
47: return new $wnd.Ext.dd.DD(id, sGroup, config);
48: }-*/;
49:
50: protected native JavaScriptObject create(Element element,
51: String sGroup, JavaScriptObject config)/*-{
52: return new $wnd.Ext.dd.DD(element, sGroup, config);
53: }-*/;
54:
55: private static DD instance(JavaScriptObject jsObj) {
56: return new DD(jsObj);
57: }
58:
59: public native boolean isScroll() /*-{
60: var dd = this.@com.gwtext.client.core.JsObject::getJsObj()();
61: return dd.scroll ? true : false;
62: }-*/;
63:
64: public native void setScroll(boolean scroll) /*-{
65: var dd = this.@com.gwtext.client.core.JsObject::getJsObj()();
66: dd.scroll = scroll;
67: }-*/;
68:
69: public native void alignElWithMouse(Element el, int iPageX,
70: int iPageY) /*-{
71: var dd = this.@com.gwtext.client.core.JsObject::getJsObj()();
72: dd.alignElWithMouse(el, iPageX, iPageY);
73: }-*/;
74:
75: public native void autoOffset(int iPageX, int iPageY) /*-{
76: var dd = this.@com.gwtext.client.core.JsObject::getJsObj()();
77: dd.autoOffset(iPageX, iPageY);
78: }-*/;
79:
80: public native void cachePosition(int iPageX, int iPageY) /*-{
81: var dd = this.@com.gwtext.client.core.JsObject::getJsObj()();
82: dd.cachePosition(iPageX, iPageY);
83: }-*/;
84:
85: public native void setDelta(int iPageX, int iPageY) /*-{
86: var dd = this.@com.gwtext.client.core.JsObject::getJsObj()();
87: dd.setDelta(iPageX, iPageY);
88: }-*/;
89:
90: public native void setDragElPos(int iPageX, int iPageY) /*-{
91: var dd = this.@com.gwtext.client.core.JsObject::getJsObj()();
92: dd.setDragElPos(iPageX, iPageY);
93: }-*/;
94: }
|