|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.extjs.gxt.ui.client.core.CompositeElement
public class CompositeElement
Wraps an list of elements, allowing code to be applied to each element using
a CompositeFunction
.
Field Summary | |
---|---|
protected java.util.List<com.google.gwt.user.client.Element> |
items
The list of elements. |
Constructor Summary | |
---|---|
CompositeElement()
Creates a new composite element. |
|
CompositeElement(com.google.gwt.user.client.Element[] elements)
Creates a new composite element. |
|
CompositeElement(java.util.List<com.google.gwt.user.client.Element> elements)
Creates a new composite element. |
Method Summary | |
---|---|
void |
add(com.google.gwt.user.client.Element elem)
Adds an element. |
void |
add(Elements elements)
Adds the elements. |
boolean |
contains(com.google.gwt.user.client.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. |
com.google.gwt.user.client.Element |
first()
Returns the first element. |
int |
getCount()
Returns the number of elements in this composite. |
com.google.gwt.user.client.Element |
getElement(int index)
Returns the element at the given index. |
java.util.List<com.google.gwt.user.client.Element> |
getElements()
The list of elements. |
int |
indexOf(com.google.gwt.user.client.Element elem)
Returns the index of the given element. |
void |
insert(com.google.gwt.user.client.Element[] elems,
int index)
|
void |
insert(com.google.gwt.user.client.Element elem,
int index)
Inserts an element at the given index. |
boolean |
is(com.google.gwt.user.client.Element elem)
Returns true if the given element is or is a child of any contained element. |
com.google.gwt.user.client.Element |
item(int index)
Returns the Element object at the specified index. |
com.google.gwt.user.client.Element |
last()
Returns the last element. |
void |
remove(com.google.gwt.user.client.Element element)
Removes an element. |
void |
remove(int index)
Removes an element. |
void |
removeAll()
Removes all elements. |
void |
removeStyleName(java.lang.String style)
|
boolean |
replaceElement(com.google.gwt.user.client.Element elem,
com.google.gwt.user.client.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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.List<com.google.gwt.user.client.Element> items
Constructor Detail |
---|
public CompositeElement()
public CompositeElement(com.google.gwt.user.client.Element[] elements)
elements
- the initial elementspublic CompositeElement(java.util.List<com.google.gwt.user.client.Element> elements)
elements
- the initial elementsMethod Detail |
---|
public void add(com.google.gwt.user.client.Element elem)
elem
- the element to addpublic void add(Elements elements)
elements
- the elements to addpublic boolean contains(com.google.gwt.user.client.Element elem)
elem
- the element
public void each(CompositeFunction f)
f
- the functionpublic com.google.gwt.user.client.Element first()
public int getCount()
public com.google.gwt.user.client.Element getElement(int index)
index
- the element index
public java.util.List<com.google.gwt.user.client.Element> getElements()
public int indexOf(com.google.gwt.user.client.Element elem)
elem
- the element
public void insert(com.google.gwt.user.client.Element elem, int index)
elem
- the element to addindex
- the insert locationpublic void insert(com.google.gwt.user.client.Element[] elems, int index)
public boolean is(com.google.gwt.user.client.Element elem)
elem
- the element to test
public com.google.gwt.user.client.Element item(int index)
index
- the index
public com.google.gwt.user.client.Element last()
public void remove(com.google.gwt.user.client.Element element)
element
- the element to removepublic void remove(int index)
index
- the index of the element to removepublic void removeAll()
public boolean replaceElement(com.google.gwt.user.client.Element elem, com.google.gwt.user.client.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 removeStyleName(java.lang.String style)
public 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 |