com.gwtext.client.core
Class CompositeElement

java.lang.Object
  extended by com.gwtext.client.core.JsObject
      extended by com.gwtext.client.core.BaseElement
          extended by com.gwtext.client.core.CompositeElement
All Implemented Interfaces:
Fx
Direct Known Subclasses:
CompositeElementLite

public class CompositeElement
extends BaseElement

Standard composite class that creates an ExtElement for every element in the collection.


Field Summary
 
Fields inherited from class com.gwtext.client.core.JsObject
jsObj
 
Constructor Summary
CompositeElement(com.google.gwt.core.client.JavaScriptObject jsObj)
          Create a CompositeElement using a native element.
 
Method Summary
 CompositeElement add(ExtElement element)
          Adds elements to this composite.
 CompositeElement add(java.lang.String selector)
          Adds elements to this composite.
 void clear()
          Removes all elements.
 void contains(ExtElement element)
          Returns true if this composite contains the passed element.
 CompositeElement filter(java.lang.String selector)
          Filters this composite to only elements that match the passed selector.
 ExtElement first()
          Returns the first Element
 int getCount()
          Returns the number of elements in this composite.
 int indexOf(ExtElement element)
          Position of the Element in the CompositeElement list.
 ExtElement last()
          Returns the last Element.
 CompositeElement removeElement(ExtElement element)
          Removes the specified element.
 CompositeElement removeElement(ExtElement element, boolean removeDom)
          Removes the specified element.
 CompositeElement removeElement(int index)
          Removes the specified element.
 CompositeElement removeElement(int index, boolean removeDom)
          Removes the specified element.
 CompositeElement replaceElement(ExtElement element, ExtElement replacement)
          Replaces the specified element with the passed element.
 CompositeElement replaceElement(ExtElement element, ExtElement replacement, boolean removeDom)
          Replaces the specified element with the passed element.
 CompositeElement replaceElement(int index, ExtElement replacement)
          Replaces the specified element with the passed element.
 CompositeElement replaceElement(int index, ExtElement replacement, boolean removeDom)
          Replaces the specified element with the passed element.
 
Methods inherited from class com.gwtext.client.core.BaseElement
addClass, addClass, addClassOnClick, addClassOnFocus, addClassOnOver, addClassOnOver, addKeyListener, addKeyListener, addKeyListener, addKeyMap, addListener, addListener, alignTo, alignTo, anchorTo, anchorTo, animate, animate, applyStyles, autoHeight, autoHeight, clean, clean, clearOpacity, clip, createShim, enableDisplayMode, enableDisplayMode, fadeIn, fadeIn, fadeOut, fadeOut, frame, frame, ghost, ghost, hasActiveFx, hasFxBlock, hide, hide, hide, highlight, highlight, highlight, move, move, move, moveTo, moveTo, moveTo, pause, puff, puff, radioClass, radioClass, remove, removeAllListeners, removeClass, removeClass, repaint, replaceClass, scale, scale, scroll, scroll, scrollTo, scrollTo, sequenceFx, setBottom, setBounds, setBounds, setBounds, setBox, setBox, setBox, setDisplayed, setHeight, setHeight, setLeft, setLeftTop, setLocation, setLocation, setOpacity, setOpacity, setRegion, setRegion, setRight, setSize, setSize, setStyle, setStyles, setTop, setVisibilityMode, setVisible, setVisible, setVisible, setWidth, setWidth, setWidth, setX, setX, setXY, setXY, setY, setY, shift, show, show, slideIn, slideIn, slideOut, slideOut, stopFx, swallowEvent, swallowEvent, switchOff, switchOff, syncFx, toggle, toggle, toggleClass, unselectable, update, update, wrap
 
Methods inherited from class com.gwtext.client.core.JsObject
getJsObj, getProperties, isCreated, setJsObj
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeElement

public CompositeElement(com.google.gwt.core.client.JavaScriptObject jsObj)
Create a CompositeElement using a native element.

Parameters:
jsObj - native object
Method Detail

add

public CompositeElement add(java.lang.String selector)
Adds elements to this composite.

Parameters:
selector - a CSS selector
Returns:
this

add

public CompositeElement add(ExtElement element)
Adds elements to this composite.

Parameters:
element - the elemetn to add
Returns:
this

clear

public void clear()
Removes all elements.


contains

public void contains(ExtElement element)
Returns true if this composite contains the passed element.

Parameters:
element - true if containts element

filter

public CompositeElement filter(java.lang.String selector)
Filters this composite to only elements that match the passed selector.

Parameters:
selector - a CSS selector
Returns:
this

first

public ExtElement first()
Returns the first Element

Returns:
the first element

getCount

public int getCount()
Returns the number of elements in this composite.

Returns:
the element count

indexOf

public int indexOf(ExtElement element)
Position of the Element in the CompositeElement list.

Parameters:
element - the element
Returns:
index of element

last

public ExtElement last()
Returns the last Element.

Returns:
the last element

removeElement

public CompositeElement removeElement(int index)
Removes the specified element.

Parameters:
index - element to remove
Returns:
this

removeElement

public CompositeElement removeElement(int index,
                                      boolean removeDom)
Removes the specified element.

Parameters:
index - element to remove
removeDom - true to also remove element from the document
Returns:
this

removeElement

public CompositeElement removeElement(ExtElement element)
Removes the specified element.

Parameters:
element - the element to remove
Returns:
this

removeElement

public CompositeElement removeElement(ExtElement element,
                                      boolean removeDom)
Removes the specified element.

Parameters:
element - the element to remove
removeDom - true to also remove element from the document
Returns:
this

replaceElement

public CompositeElement replaceElement(int index,
                                       ExtElement replacement)
Replaces the specified element with the passed element.

Parameters:
index - the index of the element in this composite to replace
replacement - the element to replace with
Returns:
this

replaceElement

public CompositeElement replaceElement(int index,
                                       ExtElement replacement,
                                       boolean removeDom)
Replaces the specified element with the passed element.

Parameters:
index - the index of the element in this composite to replace
replacement - the element to replace with
removeDom - true to remove and replace the element in the document too
Returns:
this

replaceElement

public CompositeElement replaceElement(ExtElement element,
                                       ExtElement replacement)
Replaces the specified element with the passed element.

Parameters:
element - the element in this composite to replace
replacement - the element to replace with
Returns:
this

replaceElement

public CompositeElement replaceElement(ExtElement element,
                                       ExtElement replacement,
                                       boolean removeDom)
Replaces the specified element with the passed element.

Parameters:
element - the element in this composite to replace
replacement - the element to replace with
removeDom - true to remove and replace the element in the document too
Returns:
this