Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.gwtext.client.core
Class ExtElement

    java.lang.Object
      com.gwtext.client.core.JsObject
          com.gwtext.client.core.BaseElement
              com.gwtext.client.core.ExtElement

All Implemented Interfaces:
  Fx

Direct Known Subclasses:
  Layer

    public class ExtElement

extends BaseElement

Field Summary

Fields inherited from class com.gwtext.client.core.JsObject
`jsObj`

Constructor Summary
`protected` | `ExtElement()`
`` | `ExtElement(com.google.gwt.user.client.Element elem)` Create an ExtElement wrapper around en existing DOM Element.
`` | `ExtElement(com.google.gwt.user.client.Element elem, boolean forceNew)` Create an ExtElement wrapper around an existing DOM Element.
`` | `ExtElement(com.google.gwt.core.client.JavaScriptObject jsObj)` Create an ExtElement using an existing native element.

Method Summary
`ExtElement` | `appendChild(com.google.gwt.user.client.Element child)` Appends the passed element to this element.
`ExtElement` | `appendTo(com.google.gwt.user.client.Element el)` Appends this element to the passed element.
`ExtElement` | `blur()` Tries to blur the element.
`ExtElement` | `boxWrap()` Wraps the specified element with a special markup/CSS block that renders by default as a gray container with a gradient background, rounded corners and a 4-way shadow.
`ExtElement` | `boxWrap(java.lang.String boxClass)` Wraps the specified element with a special markup/CSS block that renders by default as a gray container with a gradient background, rounded corners and a 4-way shadow.
`ExtElement` | `center()` Centers the Element in the viewport.
`ExtElement` | `center(com.google.gwt.user.client.Element centerIn)` Centers the Element in another Element.
`com.google.gwt.user.client.Element` | `child(java.lang.String selector)` Selects a single child at any depth below this element based on the passed CSS selector (the selector should not contain an id).
`ExtElement` | `clearPositioning()` Clear positioning back to the default when the document was loaded.
`ExtElement` | `clearPositioning(Position value)` Clear positioning back to the default when the document was loaded
`boolean` | `contains(com.google.gwt.user.client.Element el)` Whether this element is an ancestor of the passed element.
`ExtElement` | `createChild(DomConfig config)` Creates the passed DomHelper config and appends it to this element
`ExtElement` | `createChild(DomConfig config, com.google.gwt.user.client.Element insertBefore)` Creates the passed DomHelper config and appends inserts it before the passed child element.
`ExtElement` | `createProxy(DomConfig config)` Creates a proxy element of this element.
`ExtElement` | `createProxy(DomConfig config, com.google.gwt.user.client.Element renderTo, boolean matchBox)` Creates a proxy element of this element.
`ExtElement` | `createProxy(java.lang.String cls)` Creates a proxy element of this element.
`ExtElement` | `createProxy(java.lang.String cls, com.google.gwt.user.client.Element renderTo, boolean matchBox)` Creates a proxy element of this element.
`com.google.gwt.user.client.Element` | `down(java.lang.String selector)` Selects a single *direct* child based on the passed CSS selector (the selector should not contain an id).
`com.google.gwt.user.client.Element` | `findParent(java.lang.String selector)` Looks at this node and then at parent nodes for a match of the passed simple selector (e.g.
`com.google.gwt.user.client.Element` | `findParent(java.lang.String selector, com.google.gwt.user.client.Element container)` Looks at this node and then at parent nodes for a match of the passed simple selector (e.g.
`com.google.gwt.user.client.Element` | `findParent(java.lang.String selector, int maxDepth)` Looks at this node and then at parent nodes for a match of the passed simple selector (e.g.
`com.google.gwt.user.client.Element` | `findParentNode(java.lang.String selector, com.google.gwt.user.client.Element container)` Looks at parent nodes for a match of the passed simple selector (e.g.
`com.google.gwt.user.client.Element` | `findParentNode(java.lang.String selector, int maxDepth)` Looks at parent nodes for a match of the passed simple selector (e.g.
`static ExtElement` | `fly(java.lang.String id)` Gets the globally shared flyweight Element, with the passed node as the active element.
`static ExtElement` | `fly(java.lang.String id, java.lang.String named)` Gets the globally shared flyweight ExtElement, with the passed node as the active element.
`ExtElement` | `focus()` Tries to focus the element.
`static ExtElement` | `get(java.lang.String id)` Static method to retrieve ExtElement objects.
`int[]` | `getAlignToXY(com.google.gwt.user.client.Element element, java.lang.String anchorPosition)` Gets the x,y coordinates to align this element with another element.
`int[]` | `getAlignToXY(com.google.gwt.user.client.Element element, java.lang.String anchorPosition, int[] offesets)` Gets the x,y coordinates to align this element with another element.
`int[]` | `getAnchorXY()` Gets the x,y coordinates specified by the anchor position on the element.
`int[]` | `getAnchorXY(java.lang.String anchorPosition, boolean local, int width, int height)` Gets the x,y coordinates specified by the anchor position on the element.
`java.lang.String` | `getAttributeNS(java.lang.String namespace, java.lang.String name)` Returns the value of a namespaced attribute from the element's underlying DOM node.
`int` | `getBorderWidth(Side side)` Gets the width of the border for the specified side.
`int` | `getBottom(boolean local)` Gets the bottom Y coordinate of the element (element Y position + element height)
`Box` | `getBox()` Return a Box that can be used to set another elements size/location to match this element.
`Box` | `getBox(boolean contentBox, boolean local)` Return a Box that can be used to set another elements size/location to match this element.
`int[]` | `getCenterXY()` Calculates the x, y to center this element on the screen
`int` | `getClientWidth()` Return the client width of the element.
`java.lang.String` | `getColor(java.lang.String attr, java.lang.String defaultValue)` Return the CSS color for the specified CSS attribute.
`java.lang.String` | `getColor(java.lang.String attr, java.lang.String defaultValue, java.lang.String prefix)` Return the CSS color for the specified CSS attribute.
`int` | `getComputedHeight()` Returns either the offsetHeight or the height of this element based on CSS height adjusted by padding or borders when needed to simulate offsetHeight when offsets aren't available.
`int` | `getComputedWidth()` Returns either the offsetWidth or the width of this element based on CSS width adjusted by padding or borders when needed to simulate offsetWidth when offsets aren't available.
`com.google.gwt.user.client.Element` | `getDOM()` Retursn the underlying DOM Element.
`com.google.gwt.user.client.Element` | `getFirstChild()` Return the first child of this element.
`int` | `getFrameWidth(Side side)` Returns the sum width of the padding and borders for the passed side.
`int` | `getHeight()` Returns the offset height of the element.
`int` | `getHeight(boolean contentHeight)` Returns the offset height of the element.
`int` | `getLeft()` Gets the left X coordinate
`int` | `getLeft(boolean local)` Gets the left X coordinate.
`Margins` | `getMargins()` Returns the margins of this element.
`int` | `getPadding(Side side)` Gets the width of the padding for the specified side.
`com.google.gwt.user.client.Element` | `getParentNode()` Return the parent node of this element,
`PositioningConfig` | `getPositioning()` Gets a `PositioningConfig` object with all CSS positioning properties.
`Region` | `getRegion()` Returns the region of the given element.
`int[]` | `getScroll()` Returns the current scroll position of the element.
`Size` | `getSize()` Returns the size of the element..
`java.lang.String` | `getStyle(java.lang.String property)` Normalizes currentStyle and computedStyle.
`int` | `getTop()` Returns the top Y coordinate.
`int` | `getTop(boolean local)` Returns the top Y coordinate.
`UpdateManager` | `getUpdateManager()` Gets this element's `UpdateManager`.
`java.lang.String` | `getValue()` Returns the value of the "value" attribute
`float` | `getValueAsNumber()` Returns the value of the "value" attribute as a number.
`Size` | `getViewSize()` Returns the width and height of the viewport.
`int` | `getWidth()` Returns the offset width of the element.
`int` | `getWidth(boolean contentWidth)` Returns the offset width of the element.
`int` | `getX()` Gets the current X position of the element based on page coordinates.
`int[]` | `getXY()` Gets the current position of the element based on page coordinates.
`int` | `getY()` Gets the current Y position of the element based on page coordinates.
`boolean` | `hasClass(java.lang.String className)` Checks if the specified CSS class exists on this element's DOM node.
`ExtElement` | `insertAfter(com.google.gwt.user.client.Element el)` Inserts this element after the passed element in the DOM.
`ExtElement` | `insertBefore(com.google.gwt.user.client.Element el)` Inserts this element before the passed element in the DOM.
`ExtElement` | `insertFirst(DomConfig config)` Creates an element as the first child of the this element.
`ExtElement` | `insertFirst(com.google.gwt.user.client.Element el)` Inserts an element as the first child of the this element.
`com.google.gwt.user.client.Element` | `insertHtmlAfterBegin(java.lang.String html)` Inserts an html fragment into this element.
`com.google.gwt.user.client.Element` | `insertHtmlAfterEnd(java.lang.String html)` Inserts an html fragment into this element.
`com.google.gwt.user.client.Element` | `insertHtmlBeforeBegin(java.lang.String html)` Inserts an html fragment into this element.
`com.google.gwt.user.client.Element` | `insertHtmlBeforeEnd(java.lang.String html)` Inserts an html fragment into this element.
`com.google.gwt.user.client.Element` | `insertSibling(DomConfig config)` Created the passed DomHelper config as a sibling of this element.
`ExtElement` | `insertSibling(DomConfig config, boolean before)` Created the passed DomHelper config as a sibling of this element.
`com.google.gwt.user.client.Element` | `insertSibling(com.google.gwt.user.client.Element el)` Inserts the passed element as a sibling of this element.
`ExtElement` | `insertSibling(com.google.gwt.user.client.Element el, boolean before)` Inserts the passed element as a sibling of this element.
`boolean` | `is(java.lang.String selector)` Returns true if this element matches the passed simple selector (e.g.
`boolean` | `isBorderBox()` Tests various css rules/browsers to determine if this element uses a border box
`boolean` | `isDisplayed()` Returns true if display is not "none".
`boolean` | `isMasked()` Returns true if this element is masked.
`boolean` | `isScrollable()` Returns true if this element is scrollable.
`boolean` | `isVisible()` Checks whether the element is currently visible using both visibility and display properties.
`boolean` | `isVisible(boolean deep)` Checks whether the element is currently visible using both visibility and display properties.
`ExtElement` | `mask()` Puts a mask over this element to disable user interaction.
`ExtElement` | `mask(java.lang.String msg)` Puts a mask over this element to disable user interaction.
`ExtElement` | `mask(java.lang.String msg, boolean animatedIcon)` Puts a mask over this element to disable user interaction.
`ExtElement` | `mask(java.lang.String msg, java.lang.String msgClass)` Puts a mask over this element to disable user interaction.
`com.google.gwt.user.client.Element` | `next()` Gets the next sibling, skipping text nodes.
`com.google.gwt.user.client.Element` | `next(java.lang.String selector)` Gets the next sibling, skipping text nodes.
`void` | `position()` Initializes positioning on this element.
`void` | `position(Positioning pos, int zIndex, int x, int y)` Initializes positioning on this element.
`com.google.gwt.user.client.Element` | `prev()` Gets the previous sibling, skipping text nodes.
`com.google.gwt.user.client.Element` | `prev(java.lang.String selector)` Gets the previous sibling, skipping text nodes.
`static com.google.gwt.user.client.Element[]` | `query(java.lang.String selector)` Selects child nodes based on the passed CSS selector (the selector should not contain an id).
`ExtElement` | `replace(com.google.gwt.user.client.Element el)` Replaces the passed element with this element.
`ExtElement` | `scrollIntoView()` Scrolls this element into view within the passed container.
`ExtElement` | `scrollIntoView(com.google.gwt.user.client.Element container, boolean hscroll)` Scrolls this element into view within the passed container
`CompositeElement` | `select(java.lang.String selector)` Creates a CompositeElement for child nodes based on the passed CSS selector (the selector should not contain an id).
`CompositeElement` | `select(java.lang.String selector, boolean unique)` Creates a CompositeElement for child nodes based on the passed CSS selector (the selector should not contain an id).
`BaseElement` | `setPositioning(PositioningConfig posCfg)` Set positioning with an object returned by getPositioning().
`int[]` | `translatePoints(int x, int y)` Translates the passed page coordinates into left/top css values for this element
`ExtElement` | `unclip()` Return clipping (overflow) to original clipping before clip() was called.
`void` | `unmask()` Removes a previously applied mask.
`ExtElement` | `up(java.lang.String selector, com.google.gwt.user.client.Element container)` Walks up the dom looking for a parent node that matches the passed simple selector (e.g.
`ExtElement` | `up(java.lang.String selector, int maxDepth)` Walks up the dom looking for a parent node that matches the passed simple selector (e.g.
`void` | `update(java.lang.String html, boolean loadScripts, Function callback)` Update the innerHTML of this element, optionally searching for and processing scripts.

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

### ExtElement

    protected ExtElement()

### ExtElement

    public ExtElement(com.google.gwt.core.client.JavaScriptObject jsObj)

  Create an ExtElement using an existing native element.

  Parameters:
    `jsObj` - native Element object

### ExtElement

    public ExtElement(com.google.gwt.user.client.Element elem)

  Create an ExtElement wrapper around en existing DOM Element.

  Parameters:
    `elem` - the DOM Element

### ExtElement

    public ExtElement(com.google.gwt.user.client.Element elem,
                      boolean forceNew)

  Create an ExtElement wrapper around an existing DOM Element.

  Parameters:
    `elem` - the DOM Element
    `forceNew` - by default the constructor checks to see if there is already an instance of this element in the cache and if there is it returns the same instance. Passing `true` will skip that check (useful for extending this class)

Method Detail

### fly

    public static ExtElement fly(java.lang.String id)

  Gets the globally shared flyweight Element, with the passed node as the active element. Do not store a reference to this element - the dom node can be overwritten by other code.

  Parameters:
    `id` - the Element id
  Returns:
    the shared ExtElement object

### fly

    public static ExtElement fly(java.lang.String id,
                                 java.lang.String named)

  Gets the globally shared flyweight ExtElement, with the passed node as the active element. Do not store a reference to this element - the dom node can be overwritten by other code.

  Parameters:
    `id` - the Element id
    `named` - allows for creation of named reusable flyweights to prevent conflicts (e.g. internally Ext uses "_internal")
  Returns:
    the shared ExtElement object

### get

    public static ExtElement get(java.lang.String id)

  Static method to retrieve ExtElement objects. Uses simple caching to consistently return the same object. Automatically fixes if an object was recreated with the same id via AJAX or DOM.

  Parameters:
    `id` - the id of Element
  Returns:
    the ExtElement object

### appendChild

    public ExtElement appendChild(com.google.gwt.user.client.Element child)

  Appends the passed element to this element.

  Parameters:
    `child` - the child element
  Returns:
    this

### appendTo

    public ExtElement appendTo(com.google.gwt.user.client.Element el)

  Appends this element to the passed element.

  Parameters:
    `el` - the new parent element
  Returns:
    this

### blur

    public ExtElement blur()

  Tries to blur the element. Any exceptions are caught and ignored.

  Returns:
    this

### boxWrap

    public ExtElement boxWrap()

  Wraps the specified element with a special markup/CSS block that renders by default as a gray container with a gradient background, rounded corners and a 4-way shadow.

  Returns:
    this

### boxWrap

    public ExtElement boxWrap(java.lang.String boxClass)

  Wraps the specified element with a special markup/CSS block that renders by default as a gray container with a gradient background, rounded corners and a 4-way shadow.

  Parameters:
    `boxClass` - A base CSS class to apply to the containing wrapper element (defaults to 'x-box'). Note that there are a number of CSS rules that are dependent on this name to make the overall effect work, so if you supply an alternate base class, make sure you also supply all of the necessary rules.
  Returns:
    this

### center

    public ExtElement center()

  Centers the Element in the viewport.

  Returns:
    this

### center

    public ExtElement center(com.google.gwt.user.client.Element centerIn)

  Centers the Element in another Element.

  Parameters:
    `centerIn` - the element in which to center the element.
  Returns:
    this

### child

    public com.google.gwt.user.client.Element child(java.lang.String selector)

  Selects a single child at any depth below this element based on the passed CSS selector (the selector should not contain an id).

  Parameters:
    `selector` - the CSS selector
  Returns:
    child element

### clearPositioning

    public ExtElement clearPositioning()

  Clear positioning back to the default when the document was loaded.

  Returns:
    this

### clearPositioning

    public ExtElement clearPositioning(Position value)

  Clear positioning back to the default when the document was loaded

  Parameters:
    `value` - the position value
  Returns:
    this

### contains

    public boolean contains(com.google.gwt.user.client.Element el)

  Whether this element is an ancestor of the passed element.

  Parameters:
    `el` - the element to check
  Returns:
    true if this element is an ancestor of the passed element

### createChild

    public ExtElement createChild(DomConfig config)

  Creates the passed DomHelper config and appends it to this element

  Parameters:
    `config` - DomHelper element config object. If no tag is specified (e.g., {tag:'input'}) then a div will be automatically generated with the specified attributes.
  Returns:
    the new child element

### createChild

    public ExtElement createChild(DomConfig config,
                                  com.google.gwt.user.client.Element insertBefore)

  Creates the passed DomHelper config and appends inserts it before the passed child element.

  Parameters:
    `config` - DomHelper element config object. If no tag is specified (e.g., {tag:'input'}) then a div will be automatically generated with the specified attributes.
    `insertBefore` - a child element of this element
  Returns:
    the new child element

### createProxy

    public ExtElement createProxy(DomConfig config)

  Creates a proxy element of this element.

  Parameters:
    `config` - DomHelper config object
  Returns:
    the new proxy element

### createProxy

    public ExtElement createProxy(DomConfig config,
                                  com.google.gwt.user.client.Element renderTo,
                                  boolean matchBox)

  Creates a proxy element of this element.

  Parameters:
    `config` - DomHelper config object
    `renderTo` - The element render the proxy to
    `matchBox` - true to align and size the proxy to this element now (defaults to false)
  Returns:
    the new proxy element

### createProxy

    public ExtElement createProxy(java.lang.String cls)

  Creates a proxy element of this element.

  Parameters:
    `cls` - the class name of the proxy element
  Returns:
    the new proxy element

### createProxy

    public ExtElement createProxy(java.lang.String cls,
                                  com.google.gwt.user.client.Element renderTo,
                                  boolean matchBox)

  Creates a proxy element of this element.

  Parameters:
    `cls` - the class name of the proxy element
    `renderTo` - The element render the proxy to
    `matchBox` - true to align and size the proxy to this element now (defaults to false)
  Returns:
    the new proxy element

### down

    public com.google.gwt.user.client.Element down(java.lang.String selector)

  Selects a single *direct* child based on the passed CSS selector (the selector should not contain an id).

  Parameters:
    `selector` - the CSS selector
  Returns:
    the child element

### findParent

    public com.google.gwt.user.client.Element findParent(java.lang.String selector)

  Looks at this node and then at parent nodes for a match of the passed simple selector (e.g. div.some-class or span:first-child)

  Parameters:
    `selector` - the simple selector to test
  Returns:
    the matching element of null if no node found

### findParent

    public com.google.gwt.user.client.Element findParent(java.lang.String selector,
                                                         com.google.gwt.user.client.Element container)

  Looks at this node and then at parent nodes for a match of the passed simple selector (e.g. div.some-class or span:first-child)

  Parameters:
    `selector` - the simple selector to test
    `container` - search until container element is reached
  Returns:
    the matching element of null if no node found

### findParent

    public com.google.gwt.user.client.Element findParent(java.lang.String selector,
                                                         int maxDepth)

  Looks at this node and then at parent nodes for a match of the passed simple selector (e.g. div.some-class or span:first-child)

  Parameters:
    `selector` - the simple selector to test
    `maxDepth` - the max depth to search as a number (defaults to 10)
  Returns:
    the matching element of null if no node found

### findParentNode

    public com.google.gwt.user.client.Element findParentNode(java.lang.String selector,
                                                             com.google.gwt.user.client.Element container)

  Looks at parent nodes for a match of the passed simple selector (e.g. div.some-class or span:first-child)

  Parameters:
    `selector` - the simple selector to test
    `container` - search until container element is reached
  Returns:
    the matching element of null if no node found

### findParentNode

    public com.google.gwt.user.client.Element findParentNode(java.lang.String selector,
                                                             int maxDepth)

  Looks at parent nodes for a match of the passed simple selector (e.g. div.some-class or span:first-child)

  Parameters:
    `selector` - the simple selector to test
    `maxDepth` - the max depth to search as a number (defaults to 10)
  Returns:
    the matching element of null if no node found

### focus

    public ExtElement focus()

  Tries to focus the element. Any exceptions are caught and ignored.

  Returns:
    this

### getAlignToXY

    public int[] getAlignToXY(com.google.gwt.user.client.Element element,
                              java.lang.String anchorPosition)

  Gets the x,y coordinates to align this element with another element.

  Parameters:
    `element` - The element to align to
    `anchorPosition` - the element's anchor point
  Returns:
    an array containing the element's x and y coordinates

### getAlignToXY

    public int[] getAlignToXY(com.google.gwt.user.client.Element element,
                              java.lang.String anchorPosition,
                              int[] offesets)

  Gets the x,y coordinates to align this element with another element.

  Parameters:
    `element` - The element to align to.
    `anchorPosition` - the element's anchor point
    `offesets` - offset the positioning by [x, y]
  Returns:
    an array containing the element's x and y coordinates

### getAnchorXY

    public int[] getAnchorXY()

  Gets the x,y coordinates specified by the anchor position on the element.

  Returns:
    an array containing the element's x and y coordinates

### getAnchorXY

    public int[] getAnchorXY(java.lang.String anchorPosition,
                             boolean local,
                             int width,
                             int height)

  Gets the x,y coordinates specified by the anchor position on the element.

  Parameters:
    `anchorPosition` - the specified anchor position.
    `local` - true to get the local (element top/left-relative) anchor position instead of page coordinates
    `width` - width to use for calculating anchor position
    `height` - height to use for calculating anchor position
  Returns:
    an array containing the element's x and y coordinates

### getAttributeNS

    public java.lang.String getAttributeNS(java.lang.String namespace,
                                           java.lang.String name)

  Returns the value of a namespaced attribute from the element's underlying DOM node.

  Parameters:
    `namespace` - the namespace in which to look for the attribute
    `name` - the attribute name
  Returns:
    the attribute value

### getBorderWidth

    public int getBorderWidth(Side side)

  Gets the width of the border for the specified side.

  Parameters:
    `side` - the side
  Returns:
    width of the side

### getBottom

    public int getBottom(boolean local)

  Gets the bottom Y coordinate of the element (element Y position + element height)

  Parameters:
    `local` - true to get the local css position instead of page coordinate
  Returns:
    the bottom Y coordinate

### getBox

    public Box getBox()

  Return a Box that can be used to set another elements size/location to match this element.

  Returns:
    the box object

### getBox

    public Box getBox(boolean contentBox,
                      boolean local)

  Return a Box that can be used to set another elements size/location to match this element.

  Parameters:
    `contentBox` - if true a box for the content of the element is returned.
    `local` - if true the element's left and top are returned instead of page x/y
  Returns:
    the box object

### getCenterXY

    public int[] getCenterXY()

  Calculates the x, y to center this element on the screen

  Returns:
    the x, y values [

### getColor

    public java.lang.String getColor(java.lang.String attr,
                                     java.lang.String defaultValue)

  Return the CSS color for the specified CSS attribute. rgb, 3 digit (like #fff) and valid values are convert to standard 6 digit hex color.

  Parameters:
    `attr` - the css attribute
    `defaultValue` - the default value to use when a valid color isn't found
  Returns:
    the css color

### getColor

    public java.lang.String getColor(java.lang.String attr,
                                     java.lang.String defaultValue,
                                     java.lang.String prefix)

  Return the CSS color for the specified CSS attribute. rgb, 3 digit (like #fff) and valid values are convert to standard 6 digit hex color.

  Parameters:
    `attr` - the css attribute
    `defaultValue` - the default value to use when a valid color isn't found
    `prefix` - defaults to #. Use an empty string when working with YUI color anims.
  Returns:
    the css color

### getComputedHeight

    public int getComputedHeight()

  Returns either the offsetHeight or the height of this element based on CSS height adjusted by padding or borders when needed to simulate offsetHeight when offsets aren't available. This may not work on display:none elements if a height has not been set using CSS.

  Returns:
    the computed height

### getComputedWidth

    public int getComputedWidth()

  Returns either the offsetWidth or the width of this element based on CSS width adjusted by padding or borders when needed to simulate offsetWidth when offsets aren't available. This may not work on display:none elements if a width has not been set using CSS.

  Returns:
    the computed width

### getDOM

    public com.google.gwt.user.client.Element getDOM()

  Retursn the underlying DOM Element.

  Returns:
    the DOM element

### getFrameWidth

    public int getFrameWidth(Side side)

  Returns the sum width of the padding and borders for the passed side.

  Parameters:
    `side` - the side
  Returns:
    sum of padding and border for the side

### getHeight

    public int getHeight()

  Returns the offset height of the element.

  Returns:
    the element's height

### getHeight

    public int getHeight(boolean contentHeight)

  Returns the offset height of the element.

  Parameters:
    `contentHeight` - true to get the height minus borders and padding
  Returns:
    the element's height

### getLeft

    public int getLeft()

  Gets the left X coordinate

  Returns:
    the left coordinate.

### getLeft

    public int getLeft(boolean local)

  Gets the left X coordinate.

  Parameters:
    `local` - true to get the local css position instead of page coordinate
  Returns:
    the X cooridinate

### getMargins

    public Margins getMargins()

  Returns the margins of this element.

  Returns:
    the margin

### next

    public com.google.gwt.user.client.Element next()

  Gets the next sibling, skipping text nodes.

  Returns:
    the next sibling or null

### next

    public com.google.gwt.user.client.Element next(java.lang.String selector)

  Gets the next sibling, skipping text nodes.

  Parameters:
    `selector` - Find the next sibling that matches the passed simple selector
  Returns:
    the next sibling or null

### getPadding

    public int getPadding(Side side)

  Gets the width of the padding for the specified side.

  Parameters:
    `side` - the side
  Returns:
    padding

### getPositioning

    public PositioningConfig getPositioning()

  Gets a `PositioningConfig` object with all CSS positioning properties. Useful along with setPostioning to get snapshot before performing an update and then restoring the element.

  Returns:
    positioning config object

### setPositioning

    public BaseElement setPositioning(PositioningConfig posCfg)

  Set positioning with an object returned by getPositioning().

  Parameters:
    `posCfg` - the position config
  Returns:
    this

### prev

    public com.google.gwt.user.client.Element prev()

  Gets the previous sibling, skipping text nodes.

  Returns:
    the previous sibling or null

### prev

    public com.google.gwt.user.client.Element prev(java.lang.String selector)

  Gets the previous sibling, skipping text nodes.

  Parameters:
    `selector` - Find the previous sibling that matches the passed simple selector
  Returns:
    the previous sibling or null

### getRegion

    public Region getRegion()

  Returns the region of the given element. The element must be part of the DOM tree to have a region (display:none or elements not appended return false).

  Returns:
    region of the element

### getScroll

    public int[] getScroll()

  Returns the current scroll position of the element.

  Returns:
    array of left and top scroll position

### getSize

    public Size getSize()

  Returns the size of the element..

  Returns:
    element size

### getStyle

    public java.lang.String getStyle(java.lang.String property)

  Normalizes currentStyle and computedStyle.

  Parameters:
    `property` - the style property whose value is returned
  Returns:
    the current value of the style property for this element

### getTop

    public int getTop()

  Returns the top Y coordinate.

  Returns:
    the Y coordinate

### getTop

    public int getTop(boolean local)

  Returns the top Y coordinate.

  Parameters:
    `local` - true to get the local css position instead of page coordinate
  Returns:
    the top Y coordinate

### getUpdateManager

    public UpdateManager getUpdateManager()

  Gets this element's `UpdateManager`.

  Returns:
    the UpdateManager

### getValue

    public java.lang.String getValue()

  Returns the value of the "value" attribute

  Returns:
    the value

### getValueAsNumber

    public float getValueAsNumber()

  Returns the value of the "value" attribute as a number.

  Returns:
    tried to parse the value as number

### getViewSize

    public Size getViewSize()

  Returns the width and height of the viewport.

  Returns:
    the viewport's Size

### getWidth

    public int getWidth()

  Returns the offset width of the element.

  Returns:
    the elements width

### getWidth

    public int getWidth(boolean contentWidth)

  Returns the offset width of the element.

  Parameters:
    `contentWidth` - true to get the width minus borders and padding
  Returns:
    the elemetns width

### getX

    public int getX()

  Gets the current X position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).

  Returns:
    the X position of the element

### getXY

    public int[] getXY()

  Gets the current position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).

  Returns:
    the XY position of the element

### getY

    public int getY()

  Gets the current Y position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).

  Returns:
    the Y position of the element

### hasClass

    public boolean hasClass(java.lang.String className)

  Checks if the specified CSS class exists on this element's DOM node.

  Parameters:
    `className` - the CSS class to check for
  Returns:
    true if the class exists, else false

### insertAfter

    public ExtElement insertAfter(com.google.gwt.user.client.Element el)

  Inserts this element after the passed element in the DOM.

  Parameters:
    `el` - the element to insert after
  Returns:
    this

### insertBefore

    public ExtElement insertBefore(com.google.gwt.user.client.Element el)

  Inserts this element before the passed element in the DOM.

  Parameters:
    `el` - the element to insert before
  Returns:
    this

### insertFirst

    public ExtElement insertFirst(com.google.gwt.user.client.Element el)

  Inserts an element as the first child of the this element.

  Parameters:
    `el` - the element to insert
  Returns:
    this

### insertFirst

    public ExtElement insertFirst(DomConfig config)

  Creates an element as the first child of the this element.

  Parameters:
    `config` - DomHelper config to create element
  Returns:
    the new child i

### insertHtmlBeforeBegin

    public com.google.gwt.user.client.Element insertHtmlBeforeBegin(java.lang.String html)

  Inserts an html fragment into this element.

  Parameters:
    `html` - the html fragment
  Returns:
    the inserted node (or nearest related if more than 1 inserted)

### insertHtmlAfterBegin

    public com.google.gwt.user.client.Element insertHtmlAfterBegin(java.lang.String html)

  Inserts an html fragment into this element.

  Parameters:
    `html` - the html fragment
  Returns:
    the inserted node (or nearest related if more than 1 inserted)

### insertHtmlBeforeEnd

    public com.google.gwt.user.client.Element insertHtmlBeforeEnd(java.lang.String html)

  Inserts an html fragment into this element.

  Parameters:
    `html` - the html fragment
  Returns:
    the inserted node (or nearest related if more than 1 inserted)

### insertHtmlAfterEnd

    public com.google.gwt.user.client.Element insertHtmlAfterEnd(java.lang.String html)

  Inserts an html fragment into this element.

  Parameters:
    `html` - the html fragment
  Returns:
    the inserted node (or nearest related if more than 1 inserted)

### insertSibling

    public com.google.gwt.user.client.Element insertSibling(com.google.gwt.user.client.Element el)

  Inserts the passed element as a sibling of this element.

  Parameters:
    `el` - the element to insert
  Returns:
    the inserted element

### insertSibling

    public ExtElement insertSibling(com.google.gwt.user.client.Element el,
                                    boolean before)

  Inserts the passed element as a sibling of this element.

  Parameters:
    `el` - the element to insert
    `before` - insert before or after
  Returns:
    the inserted element

### insertSibling

    public com.google.gwt.user.client.Element insertSibling(DomConfig config)

  Created the passed DomHelper config as a sibling of this element.

  Parameters:
    `config` - the DomHelper config
  Returns:
    the inserted element

### insertSibling

    public ExtElement insertSibling(DomConfig config,
                                    boolean before)

  Created the passed DomHelper config as a sibling of this element.

  Parameters:
    `config` - the DomHelper config
    `before` - to insert before or after
  Returns:
    the inserted element

### is

    public boolean is(java.lang.String selector)

  Returns true if this element matches the passed simple selector (e.g. div.some-class or span:first-child)

  Parameters:
    `selector` - the simple selector to test
  Returns:
    true if this element matches the selector, else false

### isBorderBox

    public boolean isBorderBox()

  Tests various css rules/browsers to determine if this element uses a border box

  Returns:
    true is element uses border box

### isDisplayed

    public boolean isDisplayed()

  Returns true if display is not "none".

  Returns:
    true if display is not "none"

### isMasked

    public boolean isMasked()

  Returns true if this element is masked.

  Returns:
    true if this element is masked

### isScrollable

    public boolean isScrollable()

  Returns true if this element is scrollable.

  Returns:
    true if this element is scrollable

### isVisible

    public boolean isVisible()

  Checks whether the element is currently visible using both visibility and display properties.

  Returns:
    true if visible

### isVisible

    public boolean isVisible(boolean deep)

  Checks whether the element is currently visible using both visibility and display properties.

  Parameters:
    `deep` - true to walk the dom and see if parent elements are hidden (defaults to false)
  Returns:
    true if visible

### mask

    public ExtElement mask()

  Puts a mask over this element to disable user interaction. This method can only be applied to elements which accept child nodes.

  Returns:
    the mask element

### mask

    public ExtElement mask(java.lang.String msg)

  Puts a mask over this element to disable user interaction. This method can only be applied to elements which accept child nodes. By default an animated loading icon is added.

  Parameters:
    `msg` - a message to display in the mask
  Returns:
    the mask element

### mask

    public ExtElement mask(java.lang.String msg,
                           boolean animatedIcon)

  Puts a mask over this element to disable user interaction. This method can only be applied to elements which accept child nodes. By default an animated loading icon is added.

  Parameters:
    `msg` - a message to display in the mask
    `animatedIcon` - true to add animated loading icon, false to skip
  Returns:
    the mask element

### mask

    public ExtElement mask(java.lang.String msg,
                           java.lang.String msgClass)

  Puts a mask over this element to disable user interaction. This method can only be applied to elements which accept child nodes.

  Parameters:
    `msg` - a message to display in the mask
    `msgClass` - a css class to apply to the msg element
  Returns:
    the mask element

### position

    public void position()

  Initializes positioning on this element. The element will be positioned relative IF it is not already positioned

### position

    public void position(Positioning pos,
                         int zIndex,
                         int x,
                         int y)

  Initializes positioning on this element.

  Parameters:
    `pos` - positioning to use
    `zIndex` - the zIndex to apply
    `x` - set the page X position
    `y` - set the page Y position

### query

    public static com.google.gwt.user.client.Element[] query(java.lang.String selector)

  Selects child nodes based on the passed CSS selector (the selector should not contain an id).

  Parameters:
    `selector` - the CSS selector
  Returns:
    an array of the matched nodes

### replace

    public ExtElement replace(com.google.gwt.user.client.Element el)

  Replaces the passed element with this element.

  Parameters:
    `el` - the element to replace
  Returns:
    this

### scrollIntoView

    public ExtElement scrollIntoView()

  Scrolls this element into view within the passed container.

  Returns:
    this

### scrollIntoView

    public ExtElement scrollIntoView(com.google.gwt.user.client.Element container,
                                     boolean hscroll)

  Scrolls this element into view within the passed container

  Parameters:
    `container` - the container element to scroll (defaults to document.body)
    `hscroll` - false to disable horizontal scroll (defaults to true)
  Returns:
    this

### select

    public CompositeElement select(java.lang.String selector)

  Creates a CompositeElement for child nodes based on the passed CSS selector (the selector should not contain an id).

  Parameters:
    `selector` - the CSS selector
  Returns:
    the CompositeElement

### select

    public CompositeElement select(java.lang.String selector,
                                   boolean unique)

  Creates a CompositeElement for child nodes based on the passed CSS selector (the selector should not contain an id).

  Parameters:
    `selector` - the CSS selector
    `unique` - true to create a unique ExtElement for each child (defaults to false, which creates a single shared flyweight object)
  Returns:
    the CompositeElement

### translatePoints

    public int[] translatePoints(int x,
                                 int y)

  Translates the passed page coordinates into left/top css values for this element

  Parameters:
    `x` - the page x
    `y` - the page y
  Returns:
    array of left, top values

### unclip

    public ExtElement unclip()

  Return clipping (overflow) to original clipping before clip() was called.

  Returns:
    this

### unmask

    public void unmask()

  Removes a previously applied mask. If removeEl is true the mask overlay is destroyed, otherwise it is cached for reuse.

### update

    public void update(java.lang.String html,
                       boolean loadScripts,
                       Function callback)

  Update the innerHTML of this element, optionally searching for and processing scripts.

  Parameters:
    `html` - the new HTML
    `loadScripts` - true to look for and process scripts
    `callback` - for async script loading you can be notified when the update completes

### up

    public ExtElement up(java.lang.String selector,
                         com.google.gwt.user.client.Element container)

  Walks up the dom looking for a parent node that matches the passed simple selector (e.g. div.some-class or span:first-child). This is a shortcut for findParentNode() that always returns an ExtElement

  Parameters:
    `selector` - the simple selector to test
    `container` - the container to stop at
  Returns:
    the matching DOM or null if no match was found

### up

    public ExtElement up(java.lang.String selector,
                         int maxDepth)

  Walks up the dom looking for a parent node that matches the passed simple selector (e.g. div.some-class or span:first-child). This is a shortcut for findParentNode() that always returns an ExtElement

  Parameters:
    `selector` - the simple selector to test
    `maxDepth` - The max depth to search (defaults to 10 || document.body)
  Returns:
    the matching DOM or null if no match was found

### getFirstChild

    public com.google.gwt.user.client.Element getFirstChild()

  Return the first child of this element.

  Returns:
    the first child

### getParentNode

    public com.google.gwt.user.client.Element getParentNode()

  Return the parent node of this element,

  Returns:
    the parent node

### getClientWidth

    public int getClientWidth()

  Return the client width of the element.

  Returns:
    the client width

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD