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: package com.gwtext.client.core;
09:
10: import com.google.gwt.core.client.JavaScriptObject;
11:
12: /**
13: * Flyweight composite class. Reuses the same Ext.Element for element operations.
14: */
15: public class CompositeElementLite extends CompositeElement {
16:
17: public CompositeElementLite(JavaScriptObject jsObj) {
18: super (jsObj);
19: }
20:
21: private static CompositeElementLite instance(JavaScriptObject jsObj) {
22: return new CompositeElementLite(jsObj);
23: }
24:
25: /**
26: * Returns a flyweight Element of the dom element object at the specified index.
27: *
28: * @param index the element index
29: * @return the element at index
30: */
31: public native ExtElement item(int index) /*-{
32: var cel = this.@com.gwtext.client.core.JsObject::getJsObj()();
33: var el = cel.item();
34: return el == null ? null : @com.gwtext.client.core.ExtElement::instance(Lcom/google/gwt/core/client/JavaScriptObject;)(el);
35: }-*/;
36: }
|