Source Code Cross Referenced for CompositeElement.java in  » Ajax » gwtext-2.01 » com » gwtext » client » core » 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.core 
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:        package com.gwtext.client.core;
009:
010:        import com.google.gwt.core.client.JavaScriptObject;
011:
012:        /**
013:         * Standard composite class that creates an ExtElement for every element in the collection.
014:         */
015:        public class CompositeElement extends BaseElement {
016:
017:            /**
018:             * Create a CompositeElement using a native element.
019:             *
020:             * @param jsObj native object
021:             */
022:            public CompositeElement(JavaScriptObject jsObj) {
023:                super (jsObj);
024:            }
025:
026:            private static CompositeElement instance(JavaScriptObject jsObj) {
027:                return new CompositeElement(jsObj);
028:            }
029:
030:            /**
031:             * Adds elements to this composite.
032:             *
033:             * @param selector a CSS selector
034:             * @return this
035:             */
036:            public native CompositeElement add(String selector) /*-{
037:                   var ce = this.@com.gwtext.client.core.JsObject::getJsObj()();
038:                   ce.add(selector);
039:                   return this;
040:                }-*/;
041:
042:            /**
043:             * Adds elements to this composite.
044:             *
045:             * @param element the elemetn to add
046:             * @return this
047:             */
048:            public native CompositeElement add(ExtElement element) /*-{
049:                   var ce = this.@com.gwtext.client.core.JsObject::getJsObj()();
050:                   ce.add(element);
051:                   return this;
052:                }-*/;
053:
054:            /**
055:             * Removes all elements.
056:             */
057:            public native void clear() /*-{
058:                   var ce = this.@com.gwtext.client.core.JsObject::getJsObj()();
059:                   ce.clear();
060:                }-*/;
061:
062:            /**
063:             * Returns true if this composite contains the passed element.
064:             *
065:             * @param element true if containts element
066:             */
067:            public native void contains(ExtElement element) /*-{
068:                   var ce = this.@com.gwtext.client.core.JsObject::getJsObj()();
069:                   var elJS = element.@com.gwtext.client.core.JsObject::getJsObj()();
070:                   return ce.contains(elJS);
071:               }-*/;
072:
073:            //todo each, fill, item
074:
075:            /**
076:             * Filters this composite to only elements that match the passed selector.
077:             *
078:             * @param selector a CSS selector
079:             * @return this
080:             */
081:            public native CompositeElement filter(String selector) /*-{
082:                   var ce = this.@com.gwtext.client.core.JsObject::getJsObj()();
083:                   ce.filter(selector);
084:                   return this;
085:                }-*/;
086:
087:            /**
088:             * Returns the first Element
089:             *
090:             * @return the first element
091:             */
092:            public native ExtElement first() /*-{
093:                   var ce = this.@com.gwtext.client.core.JsObject::getJsObj()();
094:                   var el = ce.first();
095:                   return el == null ? null : @com.gwtext.client.core.ExtElement::instance(Lcom/google/gwt/core/client/JavaScriptObject;)(el);
096:               }-*/;
097:
098:            /**
099:             * Returns the number of elements in this composite.
100:             *
101:             * @return the element count
102:             */
103:            public native int getCount() /*-{
104:                   var ce = this.@com.gwtext.client.core.JsObject::getJsObj()();
105:                   return ce.getCount();
106:               }-*/;
107:
108:            /**
109:             * Position of the Element in the CompositeElement list.
110:             *
111:             * @param element the element
112:             * @return index of element
113:             */
114:            public native int indexOf(ExtElement element) /*-{
115:                   var ce = this.@com.gwtext.client.core.JsObject::getJsObj()();
116:                   var elJS = element.@com.gwtext.client.core.JsObject::getJsObj()();
117:                   return ce.indexOf(elJS);
118:               }-*/;
119:
120:            /**
121:             * Returns the last Element.
122:             *
123:             * @return the last element
124:             */
125:            public native ExtElement last() /*-{
126:                   var ce = this.@com.gwtext.client.core.JsObject::getJsObj()();
127:                   var el = ce.last();
128:                   return el == null ? null : @com.gwtext.client.core.ExtElement::instance(Lcom/google/gwt/core/client/JavaScriptObject;)(el);
129:               }-*/;
130:
131:            /**
132:             * Removes the specified element.
133:             *
134:             * @param index element to remove
135:             * @return this
136:             */
137:            public native CompositeElement removeElement(int index) /*-{
138:                   var ce = this.@com.gwtext.client.core.JsObject::getJsObj()();
139:                   ce.removeElement(index);
140:                   return this;
141:                }-*/;
142:
143:            /**
144:             * Removes the specified element.
145:             *
146:             * @param index     element to remove
147:             * @param removeDom true to also remove element from the document
148:             * @return this
149:             */
150:            public native CompositeElement removeElement(int index,
151:                    boolean removeDom) /*-{
152:                   var ce = this.@com.gwtext.client.core.JsObject::getJsObj()();
153:                   ce.removeElement(index, removeDom);
154:                   return this;
155:                }-*/;
156:
157:            /**
158:             * Removes the specified element.
159:             *
160:             * @param element the element to remove
161:             * @return this
162:             */
163:            public native CompositeElement removeElement(ExtElement element) /*-{
164:                   var ce = this.@com.gwtext.client.core.JsObject::getJsObj()();
165:                   var elJS = element.@com.gwtext.client.core.JsObject::getJsObj()();
166:                   ce.removeElement(elJS);
167:                   return this;
168:                }-*/;
169:
170:            /**
171:             * Removes the specified element.
172:             *
173:             * @param element   the element to remove
174:             * @param removeDom true to also remove element from the document
175:             * @return this
176:             */
177:            public native CompositeElement removeElement(ExtElement element,
178:                    boolean removeDom) /*-{
179:                   var ce = this.@com.gwtext.client.core.JsObject::getJsObj()();
180:                   var elJS = element.@com.gwtext.client.core.JsObject::getJsObj()();
181:                   ce.removeElement(elJS, removeDom);
182:                   return this;
183:                }-*/;
184:
185:            /**
186:             * Replaces the specified element with the passed element.
187:             *
188:             * @param index       the index of the element in this composite to replace
189:             * @param replacement the element to replace with
190:             * @return this
191:             */
192:            public native CompositeElement replaceElement(int index,
193:                    ExtElement replacement) /*-{
194:                   var ce = this.@com.gwtext.client.core.JsObject::getJsObj()();
195:                   var replacementJS = replacement.@com.gwtext.client.core.JsObject::getJsObj()();
196:                   ce.replaceElement(index, replacementJS);
197:                   return this;
198:                }-*/;
199:
200:            /**
201:             * Replaces the specified element with the passed element.
202:             *
203:             * @param index       the index of the element in this composite to replace
204:             * @param replacement the element to replace with
205:             * @param removeDom   true to remove and replace the element in the document too
206:             * @return this
207:             */
208:            public native CompositeElement replaceElement(int index,
209:                    ExtElement replacement, boolean removeDom) /*-{
210:                   var ce = this.@com.gwtext.client.core.JsObject::getJsObj()();
211:                   var replacementJS = replacement.@com.gwtext.client.core.JsObject::getJsObj()();
212:                   ce.replaceElement(index, replacementJS, removeDom);
213:                   return this;
214:                }-*/;
215:
216:            /**
217:             * Replaces the specified element with the passed element.
218:             *
219:             * @param element     the element in this composite to replace
220:             * @param replacement the element to replace with
221:             * @return this
222:             */
223:            public native CompositeElement replaceElement(ExtElement element,
224:                    ExtElement replacement) /*-{
225:                   var ce = this.@com.gwtext.client.core.JsObject::getJsObj()();
226:                   var elJS = element.@com.gwtext.client.core.JsObject::getJsObj()();
227:                   var replacementJS = replacement.@com.gwtext.client.core.JsObject::getJsObj()();
228:                   ce.replaceElement(elJS, replacementJS);
229:                   return this;
230:                }-*/;
231:
232:            /**
233:             * Replaces the specified element with the passed element.
234:             *
235:             * @param element     the element in this composite to replace
236:             * @param replacement the element to replace with
237:             * @param removeDom   true to remove and replace the element in the document too
238:             * @return this
239:             */
240:            public native CompositeElement replaceElement(ExtElement element,
241:                    ExtElement replacement, boolean removeDom) /*-{
242:                   var ce = this.@com.gwtext.client.core.JsObject::getJsObj()();
243:                   var elJS = element.@com.gwtext.client.core.JsObject::getJsObj()();
244:                   var replacementJS = replacement.@com.gwtext.client.core.JsObject::getJsObj()();
245:                   ce.replaceElement(elJS, replacementJS, removeDom);
246:                   return this;
247:                }-*/;
248:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.