Source Code Cross Referenced for DropTarget.java in  » Ajax » gwtext-2.01 » com » gwtext » client » dd » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Ajax » gwtext 2.01 » com.gwtext.client.dd 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * GWT-Ext Widget Library
003:         * Copyright(c) 2007-2008, GWT-Ext.
004:         * licensing@gwt-ext.com
005:         * 
006:         * http://www.gwt-ext.com/license
007:         */
008:
009:        package com.gwtext.client.dd;
010:
011:        import com.google.gwt.core.client.JavaScriptObject;
012:        import com.google.gwt.user.client.Element;
013:        import com.gwtext.client.core.EventObject;
014:        import com.gwtext.client.widgets.Component;
015:
016:        public class DropTarget extends DDTarget {
017:
018:            static {
019:                init();
020:            }
021:
022:            private static native void init() /*-{
023:
024:                    $wnd.Ext.dd.DropTarget.prototype.notifyDrop = function(source, e, data) {
025:                        var ddJ = this.ddJ;
026:                        if(ddJ != null) {
027:                            var eJ = @com.gwtext.client.core.EventObject::instance(Lcom/google/gwt/core/client/JavaScriptObject;)(e);
028:                            var sourceJ = @com.gwtext.client.dd.DragSource::instance(Lcom/google/gwt/core/client/JavaScriptObject;)(source);
029:                            var dataJ = data == null || data == undefined ? null : @com.gwtext.client.dd.DragData::instance(Lcom/google/gwt/core/client/JavaScriptObject;)(data);
030:                            return ddJ.@com.gwtext.client.dd.DropTarget::notifyDrop(Lcom/gwtext/client/dd/DragSource;Lcom/gwtext/client/core/EventObject;Lcom/gwtext/client/dd/DragData;)(sourceJ, eJ, dataJ);
031:                        }
032:                    }
033:
034:                   $wnd.Ext.dd.DropTarget.prototype.notifyEnter = function(source, e, data) {
035:                        var ddJ = this.ddJ;
036:                        if(ddJ != null) {
037:                            var eJ = @com.gwtext.client.core.EventObject::instance(Lcom/google/gwt/core/client/JavaScriptObject;)(e);
038:                            var sourceJ = @com.gwtext.client.dd.DragSource::instance(Lcom/google/gwt/core/client/JavaScriptObject;)(source);
039:                            var dataJ = data == null || data == undefined ? null : @com.gwtext.client.dd.DragData::instance(Lcom/google/gwt/core/client/JavaScriptObject;)(data);
040:                            return ddJ.@com.gwtext.client.dd.DropTarget::notifyEnter(Lcom/gwtext/client/dd/DragSource;Lcom/gwtext/client/core/EventObject;Lcom/gwtext/client/dd/DragData;)(sourceJ, eJ, dataJ);
041:                        }
042:                    }
043:
044:                   $wnd.Ext.dd.DropTarget.prototype.notifyOut = function(source, e, data) {
045:                        var ddJ = this.ddJ;
046:                        if(ddJ != null) {
047:                            var eJ = @com.gwtext.client.core.EventObject::instance(Lcom/google/gwt/core/client/JavaScriptObject;)(e);
048:                            var sourceJ = @com.gwtext.client.dd.DragSource::instance(Lcom/google/gwt/core/client/JavaScriptObject;)(source);
049:                            var dataJ = data == null || data == undefined ? null : @com.gwtext.client.dd.DragData::instance(Lcom/google/gwt/core/client/JavaScriptObject;)(data);
050:                            ddJ.@com.gwtext.client.dd.DropTarget::notifyOut(Lcom/gwtext/client/dd/DragSource;Lcom/gwtext/client/core/EventObject;Lcom/gwtext/client/dd/DragData;)(sourceJ, eJ, dataJ);
051:                        }
052:                    }
053:
054:                   $wnd.Ext.dd.DropTarget.prototype.notifyOver = function(source, e, data) {
055:                        var ddJ = this.ddJ;
056:                        if(ddJ != null) {
057:                            var eJ = @com.gwtext.client.core.EventObject::instance(Lcom/google/gwt/core/client/JavaScriptObject;)(e);
058:                            var sourceJ = @com.gwtext.client.dd.DragSource::instance(Lcom/google/gwt/core/client/JavaScriptObject;)(source);
059:                            var dataJ = data == null || data == undefined ? null : @com.gwtext.client.dd.DragData::instance(Lcom/google/gwt/core/client/JavaScriptObject;)(data);
060:                            return ddJ.@com.gwtext.client.dd.DropTarget::notifyOver(Lcom/gwtext/client/dd/DragSource;Lcom/gwtext/client/core/EventObject;Lcom/gwtext/client/dd/DragData;)(sourceJ, eJ, dataJ);
061:                        }
062:                    }
063:
064:               }-*/;
065:
066:            public DropTarget(JavaScriptObject jsObj) {
067:                super (jsObj);
068:            }
069:
070:            public DropTarget(String id, String sGroup, DragDropConfig config) {
071:                super (id, sGroup, config);
072:            }
073:
074:            public DropTarget(Element element, String sGroup,
075:                    DragDropConfig config) {
076:                super (element, sGroup, config);
077:            }
078:
079:            public DropTarget(Component component, String sGroup,
080:                    DragDropConfig config) {
081:                super (component, sGroup, config);
082:            }
083:
084:            protected native JavaScriptObject create(String id, String sGroup,
085:                    JavaScriptObject config)/*-{
086:                    return new $wnd.Ext.dd.DropTarget(id, sGroup, config);
087:                }-*/;
088:
089:            protected native JavaScriptObject create(Element element,
090:                    String sGroup, JavaScriptObject config)/*-{
091:                    return new $wnd.Ext.dd.DropTarget(element, sGroup, config);
092:                }-*/;
093:
094:            /**
095:             * The function {@link DragSource} calls once to notify this drop target that the dragged item has been dropped on it.
096:             * This method has no default implementation and returns false, so you must provide an implementation that does something
097:             * to process the drop event and returns true so that the drag source's repair action does not run.
098:             *
099:             * @param source the drag source
100:             * @param e      the event object
101:             * @param data   an object containing arbitrary data supplied by the drag source
102:             * @return true if the drop was valid, else false
103:             */
104:            public boolean notifyDrop(DragSource source, EventObject e,
105:                    DragData data) {
106:                return false;
107:            }
108:
109:            /**
110:             * The function a {@link DragSource} calls once to notify this drop target that the source is now over the target. This
111:             * default implementation adds the CSS class specified by overClass (if any) to the drop element and
112:             * returns the dropAllowed config value. This method should be overridden if drop validation is required.
113:             *
114:             * @param source The drag source that was dragged over this drop target
115:             * @param e      The event
116:             * @param data   An object containing arbitrary data supplied by the drag source
117:             * @return The CSS class that communicates the drop status back to the source so that the underlying {@link StatusProxy} can be updated
118:             */
119:            public String notifyEnter(DragSource source, EventObject e,
120:                    DragData data) {
121:                return "";
122:            }
123:
124:            /**
125:             * The function a Ext.dd.DragSource calls once to notify this drop target that the source has been dragged out of the target
126:             * without dropping. This default implementation simply removes the CSS class specified by overClass (if any) from the drop element.
127:             *
128:             * @param source
129:             * @param e
130:             * @param data
131:             */
132:            public void notifyOut(DragSource source, EventObject e,
133:                    DragData data) {
134:            }
135:
136:            public String notifyOver(DragSource source, EventObject e,
137:                    DragData data) {
138:                return "";
139:            }
140:
141:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.