|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sencha.gxt.core.client.dom.CompositeElement
public class CompositeElement
Wraps an list of elements, allowing code to be applied to each element using
a CompositeFunction.
| Constructor Summary | |
|---|---|
CompositeElement()
Creates a new composite element. |
|
CompositeElement(Element[] elements)
Creates a new composite element. |
|
CompositeElement(java.util.List<Element> elements)
Creates a new composite element. |
|
| Method Summary | |
|---|---|
void |
add(Element elem)
Adds an element. |
void |
add(Elements elements)
Adds the elements. |
void |
addClassName(java.lang.String cls)
Removes the class name. |
boolean |
contains(Element elem)
Returns true if this composite contains the passed element. |
void |
each(CompositeFunction f)
Calls the passed function passing (el, this, index) for each element in this composite. |
Element |
first()
Returns the first element. |
int |
getCount()
Returns the number of elements in this composite. |
Element |
getElement(int index)
Returns the element at the given index. |
java.util.List<Element> |
getElements()
The list of elements. |
int |
indexOf(Element elem)
Returns the index of the given element. |
void |
insert(Element[] elems,
int index)
Inserts the elements at the given index. |
void |
insert(Element elem,
int index)
Inserts an element at the given index. |
boolean |
is(Element elem)
Returns true if the given element is or is a child of any contained element. |
Element |
item(int index)
Returns the Element object at the specified index. |
Element |
last()
Returns the last element. |
void |
remove(Element element)
Removes an element. |
void |
remove(int index)
Removes an element. |
void |
removeAll()
Removes all elements. |
void |
removeClassName(java.lang.String cls)
Removes the class name. |
boolean |
replaceElement(Element elem,
Element replace)
Replaces an element. |
void |
setHeight(int height)
Sets the element's height. |
void |
setInnerHtml(java.lang.String html)
Sets the element's inner HTML. |
void |
setWidth(int width)
Sets the element's width. |
void |
setWidth(java.lang.String width)
Sets the element's width. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CompositeElement()
public CompositeElement(Element[] elements)
elements - the initial elementspublic CompositeElement(java.util.List<Element> elements)
elements - the initial elements| Method Detail |
|---|
public void add(Element elem)
elem - the element to addpublic void add(Elements elements)
elements - the elements to addpublic void addClassName(java.lang.String cls)
cls - the class namepublic boolean contains(Element elem)
elem - the element
public void each(CompositeFunction f)
f - the functionpublic Element first()
public int getCount()
public Element getElement(int index)
index - the element index
public java.util.List<Element> getElements()
public int indexOf(Element elem)
elem - the element
public void insert(Element elem,
int index)
elem - the element to addindex - the insert location
public void insert(Element[] elems,
int index)
elems - the elements to insertindex - the insert locationpublic boolean is(Element elem)
elem - the element to test
public Element item(int index)
index - the index
public Element last()
public void remove(Element element)
element - the element to removepublic void remove(int index)
index - the index of the element to removepublic void removeAll()
public void removeClassName(java.lang.String cls)
cls - the class name
public boolean replaceElement(Element elem,
Element replace)
elem - the element to removereplace - the element to replace
public void setHeight(int height)
height - the heightpublic void setInnerHtml(java.lang.String html)
html - the htmlpublic void setWidth(int width)
width - the widthpublic void setWidth(java.lang.String width)
width - the width
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||