com.extjs.gxt.ui.client.core
Class El

java.lang.Object
  extended by com.extjs.gxt.ui.client.core.El

public class El
extends java.lang.Object

Represents an Element in the DOM.


Nested Class Summary
static class El.VisMode
          VisMode enumeration.
 
Field Summary
 com.google.gwt.user.client.Element dom
          The wrapped dom element.
 
Constructor Summary
El(com.google.gwt.user.client.Element element)
          Creates a new el instance.
El(java.lang.String html)
          Creates a new El instance from the HTML fragment.
 
Method Summary
 El addEventsSunk(int event)
          Adds the event type to the element's sunk events.
 El addStyleName(java.lang.String... styleNames)
          Adds the style name to the element.
static java.lang.String addUnits(java.lang.String v, java.lang.String defaultUnit)
          Tests to see if the value has units, otherwise appends the default (px).
 com.extjs.gxt.ui.client.util.Point adjustForConstraints(com.extjs.gxt.ui.client.util.Point p)
          Ensures the element is within the browser viewport.
 El alignTo(com.google.gwt.user.client.Element align, java.lang.String pos, int[] offsets)
          Aligns the element with another element relative to the specified anchor points.
 El appendChild(com.google.gwt.user.client.Element child)
          Appends a element.
 El applyStyles(java.lang.String styles)
          More flexible version of setStyleAttribute(java.lang.String, java.lang.Object) for setting style properties.
 El blink(com.extjs.gxt.ui.client.fx.FxConfig config)
          Blinks the element.
 El blur()
          Removes focus.
 El boxWrap(java.lang.String style)
          Wraps the specified element with a special markup/CSS block.
 El center()
          Centers the element in the viewport.
 El center(boolean constrainViewport)
          Centers the element.
 El center(com.google.gwt.user.client.Element container)
          Centers an element.
 El child(java.lang.String selector)
          Selects a single child at any depth below this element based on the passed CSS selector.
 com.google.gwt.user.client.Element childElement(java.lang.String selector)
          Selects a single child at any depth below this element based on the passed CSS selector.
 El childNode(int index)
          Returns the element's child.
 El clearOpacity()
          Clears the set opacity correctly.
 El click()
          Generators a native dom click on the element.
 El clip()
          Clips overflow on the element.
 com.google.gwt.user.client.Element cloneNode(boolean deep)
          Clones the element.
 El createChild(java.lang.String html)
          Creates and adds a child using the HTML fragment.
 El createChild(java.lang.String html, com.google.gwt.user.client.Element insertBefore)
          Creates and inserts a child using the HTML fragment.
 El disable()
          Disables the element.
 El disableContextMenu(boolean disable)
          Enables and disables the browsers default context menu for the specified element.A circular reference will be created when disabling text selection.
 El disableTextSelection(boolean disable)
          Enables or disables text selection for the element.
 El down(java.lang.String selector)
          Selects a single *direct* child based on the passed CSS selector (the selector should not contain an id).
 El enable()
          Enables the element.
 El enableDisplayMode(java.lang.String display)
          Convenience method for setVisibilityMode(VisibilityMode.DISPLAY).
 boolean equals(java.lang.Object obj)
           
 El fadeIn(com.extjs.gxt.ui.client.fx.FxConfig config)
          Fades in the element.
 El fadeOut(com.extjs.gxt.ui.client.fx.FxConfig config)
          Fades out the element.
 El fadeToggle(com.extjs.gxt.ui.client.fx.FxConfig config)
          Toggles the element visibility using a fade effect.
 El 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 findParentElement(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.
 El firstChild()
          Returns the element's first child.
static El fly(com.google.gwt.dom.client.Element element)
           
static El fly(com.google.gwt.user.client.Element element)
           
static El fly(com.google.gwt.dom.client.Element element, java.lang.String s)
          Gets the globally shared flyweight El, with the passed node as the active element.
static El fly(com.google.gwt.user.client.Element element, java.lang.String s)
          Gets the globally shared flyweight El, with the passed node as the active element.
 El focus()
          Tries to focus the element.
 com.extjs.gxt.ui.client.util.Point getAlignToXY(com.google.gwt.user.client.Element align, java.lang.String pos, int[] offsets)
          Gets the x,y coordinates to align this element with another element.
 com.extjs.gxt.ui.client.util.Point getAlignToXY(com.google.gwt.user.client.Element elem, java.lang.String p, int ox, int oy)
           
 com.extjs.gxt.ui.client.util.Point getAnchorXY(java.lang.String anchor, boolean local)
          Returns the x,y coordinates specified by the anchor position on the element.
 int getBorderWidth(java.lang.String sides)
          Returns the width of the border(s) for the specified side(s).
 int getBottom(boolean local)
          Returns the bottom Y coordinate of the element (element Y position + element height).
 com.extjs.gxt.ui.client.util.Rectangle getBounds()
          Returns the elements bounds in page coordinates.
 com.extjs.gxt.ui.client.util.Rectangle getBounds(boolean local)
          Returns the elements bounds in page coordinates.
 com.extjs.gxt.ui.client.util.Rectangle getBounds(boolean local, boolean adjust)
          Returns the element's bounds in page coordinates.
 El getChild(int index)
          Returns a child element.
 com.google.gwt.user.client.Element getChildElement(int index)
          Returns a child element.
 int getChildIndex(com.google.gwt.user.client.Element child)
          Returns the index of the child element.
static java.lang.String getClassName(com.google.gwt.user.client.Element dom)
           
 int getClientHeight()
          Returns the element's client height property.
 int getClientWidth()
          Returns the element's client width property.
 int getComputedHeight()
          Returns either the offsetHeight or the height of this element based on it's CSS height.
 int getComputedWidth()
          Returns either the offsetWidth or the width of this element based on it's CSS width.
protected  com.extjs.gxt.ui.client.util.Point getConstrainToXY(com.google.gwt.user.client.Element elem, com.extjs.gxt.ui.client.util.Point proposedXY)
           
 com.extjs.gxt.ui.client.util.Size getFrameSize()
          Returns the sum width of the padding and borders for all "sides".
 int getFrameWidth(java.lang.String sides)
          Returns the sum width of the padding and borders for the passed "sides".
 int getHeight()
          Returns the offset height of the element.
 int getHeight(boolean content)
          Returns the element's height.
 java.lang.String getId()
          Returns the element's id.
 java.lang.String getInnerHtml()
          Returns the element's inner HTML.
 int getIntStyleAttribute(java.lang.String attr)
          Returns the element's style value.
 com.extjs.gxt.ui.client.util.Rectangle getLayoutBounds()
          Returns the element's content area bounds.
 int getLeft()
          Returns the top Y coordinate.
 int getLeft(boolean local)
          Gets the left X coordinate.
 int getMargins(java.lang.String sides)
          Returns an object with properties top, left, right and bottom representing the margins of this element unless sides is passed, then it returns the calculated width of the sides (see #getPadding).
 com.extjs.gxt.ui.client.util.Point getOffsetsTo(com.google.gwt.user.client.Element to)
          Returns the offsets between two elements.
 java.lang.String getOuterHtml()
          Returns the element's outer HTML.
 int getPadding(java.lang.String sides)
          Gets the width of the padding(s) for the specified side(s).
 El getParent()
          Returns the element's parent.
 com.extjs.gxt.ui.client.util.Region getRegion()
          Returns the region of the given element.
 int getRight(boolean local)
          Returns the right X coordinate of the element (element X position + element width).
 com.extjs.gxt.ui.client.util.Scroll getScroll()
          Returns the body elements current scroll position.
 int getScrollLeft()
          Returns the horizontal scroll position.
 int getScrollTop()
          Returns the current vertical scroll position.
 com.extjs.gxt.ui.client.util.Size getSize()
          Returns the size of the element.
 com.extjs.gxt.ui.client.util.Size getSize(boolean content)
          Returns the element's size.
 com.extjs.gxt.ui.client.core.FastMap<java.lang.String> getStyleAttribute(java.util.List<java.lang.String> attr)
           
 java.lang.String getStyleAttribute(java.lang.String attr)
          Normalizes currentStyle and computedStyle.
 int getStyleHeight()
          Returns the style width.
 java.lang.String getStyleName()
          Returns the element's style name.
 com.extjs.gxt.ui.client.util.Size getStyleSize()
           
 com.extjs.gxt.ui.client.util.Size getStyleSize(boolean contentOnly)
          Returns the element's size, using style attribute before offsets.
 int getStyleWidth()
          Returns the style width.
 com.google.gwt.user.client.Element getSubChild(int depth)
          Returns the element's sub child.
 int getTextWidth()
          Returns the measured width of the element's text.
 int getTop()
          Returns the top Y coordinate.
 int getTop(boolean local)
          Gets the top Y coordinate.
 java.lang.String getValue()
          Returns the the "value" attribute.
 int getWidth()
          Returns the offset width.
 int getWidth(boolean content)
          Returns the element's width.
 int getX()
          Gets the current X position of the element based on page coordinates.
 com.extjs.gxt.ui.client.util.Point 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.
 int getZIndex()
          Returns the element's z-index.
 boolean hasStyleName(java.lang.String style)
          Checks if the specified CSS style name exists on this element's DOM node.
 El hide()
          Hides this element
 El insertBefore(com.google.gwt.user.client.Element before)
          Inserts this element before the passed element.
 El insertBefore(com.google.gwt.user.client.Element[] elements, com.google.gwt.user.client.Element before)
          Inserts the elements as a child before the given element.
 El insertBefore(com.google.gwt.user.client.Element child, com.google.gwt.user.client.Element before)
          Inserts the element as a child before the given element.
 El insertChild(com.google.gwt.user.client.Element[] children, int index)
          Inserts the children at the specified index.
 El insertChild(com.google.gwt.user.client.Element child, int index)
          Inserts an element at the specified index.
 El insertFirst(com.google.gwt.user.client.Element element)
          Inserts an element as the first child.
 El insertFirst(com.google.gwt.user.client.Element[] elems)
          Inserts the children.
 El insertFirst(java.lang.String html)
          Creates and inserts a child element.
 El insertHtml(java.lang.String where, java.lang.String html)
          Inserts an html fragment into this element
 El insertInto(com.google.gwt.user.client.Element parent)
          Inserts the element into the given parent.
 El insertInto(com.google.gwt.user.client.Element parent, int index)
          Inserts a element.
 El insertLast(com.google.gwt.user.client.Element child)
          Inserts the child element as the last child.
 El insertSibling(com.google.gwt.user.client.Element[] elems, java.lang.String where)
          Inserts the passed elements as a sibling of this element.
 com.google.gwt.user.client.Element insertSibling(com.google.gwt.user.client.Element elem, java.lang.String where)
          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()
          Returns true if the element is a border box.
static boolean isBorderBox(com.google.gwt.user.client.Element element)
          Returns true if the passed element has a border box.
 boolean isConnected()
          Returns true if the element is part of the browser's DOM.
 boolean isMasked()
          Returns true if this element is masked.
 boolean isOrHasChild(com.google.gwt.user.client.Element child)
          Returns true if the child element is or a child of this element.
 boolean isScrollable()
          Returns whether the element is scrollable (x or y).
 boolean isScrollableX()
          Returns whether the element is scrollable on the x-axis.
 boolean isScrollableY()
          Returns whether the element is scrollable on the y-axis.
 boolean isStyleAttribute(java.util.Map<java.lang.String,java.lang.String> map, boolean matchAll)
           
 boolean isStyleAttribute(java.lang.String attr, java.lang.String value)
           
 boolean isVisibility()
          Returns true if the element is visible using the css 'visibiliy' attribute.
 boolean isVisible()
          Returns whether the element is currently visible.
 boolean isVisible(boolean deep)
          Returns whether the element is currently visible.
 El lastChild()
          Returns the element's last child.
 com.google.gwt.http.client.Request load(com.google.gwt.http.client.RequestBuilder builder)
          Retrieves the data using the request builder and updates the element'c contents.
 El makePositionable()
          Makes an element positionable.
 El makePositionable(boolean absolute)
          Makes an element positionable.
 El mask()
          Puts a mask over this element to disable user interaction.
 El mask(java.lang.String message)
          Puts a mask over this element to disable user interaction.
 El mask(java.lang.String message, java.lang.String messageStyleName)
          Puts a mask over this element to disable user interaction.
 com.google.gwt.user.client.Element nextSibling()
          Returns the elements next sibling.
 com.google.gwt.user.client.Element previousSibling()
          Returns the elements previous sibling.
 El remove()
          Removes this element from the DOM
 El removeChild(com.google.gwt.user.client.Element child)
          Removes a child.
 El removeChildren()
          Removes all the elements children.
 El removeFromParent()
          Removes the element from it's parent.
 El removeStyleName(java.lang.String... styleNames)
          Removes the style names(s) from the element.
 El removeStyleName(java.lang.String styleName)
          Removes a style name.
 El repaint()
          Forces the Browser to repaint this element.
 El replaceStyleName(java.lang.String oldStyle, java.lang.String newStyle)
          Replaces a style name on the element with another.
 El scrollIntoView(com.google.gwt.user.client.Element container, boolean hscroll)
           
 El scrollIntoView(com.google.gwt.user.client.Element container, boolean hscroll, int[] offsets)
          Scrolls the element into view.
 El scrollTo(java.lang.String side, int value)
          Scrolls this element the specified scroll point.
 El scrollTo(java.lang.String side, int value, com.extjs.gxt.ui.client.fx.FxConfig config)
          Scrolls this element the specified scroll point.
 com.google.gwt.dom.client.NodeList<com.google.gwt.user.client.Element> select(java.lang.String selector)
          Selects child nodes based on the passed CSS selector (the selector should not contain an id).
 El selectNode(java.lang.String selector)
          Selects a single element.
 El setBorders(boolean show)
          Adds or removes a border.
 El setBounds(int x, int y, int width, int height)
          Sets the element's bounds.
 El setBounds(int x, int y, int width, int height, boolean adjust)
          Sets the element's bounds.
 El setBounds(com.extjs.gxt.ui.client.util.Rectangle bounds)
          Sets the element's bounds.
 El setBounds(com.extjs.gxt.ui.client.util.Rectangle bounds, boolean content)
          Sets the element's bounds.
 El setDisplayed(boolean display)
          Sets the CSS display property.
 El setDisplayed(java.lang.String display)
          Sets the CSS display property.
 El setElementAttribute(java.lang.String attr, boolean value)
          Sets an element's attribute.
 El setElementAttribute(java.lang.String attr, int value)
          Sets an element's attribute.
 El setElementAttribute(java.lang.String attr, java.lang.String value)
          Sets an element's attribute.
 void setEnabled(boolean enabled)
          Convenience function for setting disabled/enabled by boolean.
 El setFocus(boolean focus)
          True to focus, false to blur.
 El setHeight(int height)
          Sets the elements height.
 El setHeight(int height, boolean adjust)
          Sets the elements height.
 El setHeight(java.lang.String height)
          Sets the elements height.
 El setIconStyle(java.lang.String style)
          Sets the the icon for an element either as a CSS style name or image path.
 El setId(java.lang.String id)
          Sets the element's id.
 El setInnerHtml(java.lang.String html)
          Sets the element's inner html.
 El setIntElementProperty(java.lang.String property, int value)
          Sets an element's property.
 El setLeft(int left)
          Sets the element's left position directly using CSS style (instead of setX(int)).
 El setLeftTop(int left, int top)
          Quick set left and top adding default units.
 El setMargins(com.extjs.gxt.ui.client.util.Margins margin)
          Sets the elements's margin.
 El setPadding(com.extjs.gxt.ui.client.util.Padding padding)
          Sets the elements's padding.
 El setPagePosition(int x, int y)
          Sets the element's position in page coordinates.
 El setScrollLeft(int left)
          Sets the element's horizontal scroll position.
 El setScrollTop(int top)
          Sets the element's vertical scroll position.
 El setSize(int width, int height)
          Sets the element's size.
 El setSize(int width, int height, boolean adjust)
          Set the size of the element.
 El setSize(com.extjs.gxt.ui.client.util.Size size)
          Sets the element's size.
 El setSize(java.lang.String width, java.lang.String height)
          Sets the element's size.
 El setStyleAttribute(java.lang.String attr, java.lang.Object value)
          Sets a style attribute.
 El setStyleName(java.lang.String style)
          Sets the element's style name.
 El setStyleName(java.lang.String style, boolean add)
          Adds or removes the style name.
 El setStyleSize(int width, int height)
          Sets the element's size using style attributes.
 El setTabIndex(int index)
          Sets the element's tab index.
 El setTitle(java.lang.String title)
          Sets the element's title property.
 El setTop(int top)
          Sets the element's top position directly using CSS style (instead of setY(int)).
 El setValue(java.lang.String value)
          Sets the element's value property.
 El setVisibility(boolean visible)
          Sets the elements css 'visibility' property.
 El setVisibilityMode(El.VisMode visMode)
          Sets the element's visibility mode.
 El setVisible(boolean visible)
          Sets the visibility of the element (see details).
 El setWidth(int width)
          Sets the element's width.
 El setWidth(int width, boolean adjust)
          Sets the elements's width.
 El setWidth(java.lang.String width)
          Sets the element's width.
 El setX(int x)
          Sets the X position of the element based on page coordinates.
 El setXY(int x, int y)
          Sets the elements position in page coordinates.
 El setXY(int x, int y, com.extjs.gxt.ui.client.fx.FxConfig config)
          Sets the elements position in page coordinates.
 El setXY(com.extjs.gxt.ui.client.util.Point p)
          Sets the element's position in page coordinates.
 El setY(int y)
          Sets the Y position of the element based on page coordinates.
 El setZIndex(int zIndex)
          Sets the element's z-index.
 El show()
          Shows this element
 El slideIn(com.extjs.gxt.ui.client.Style.Direction direction, com.extjs.gxt.ui.client.fx.FxConfig config)
          Slides the element in.
 El slideOut(com.extjs.gxt.ui.client.Style.Direction direction, com.extjs.gxt.ui.client.fx.FxConfig config)
          Slides the element out.
 El subChild(int depth)
          Returns the element's sub child.
 El sync(boolean show)
          Synchronizes the layer.
 El toggleStyleName(java.lang.String styleName)
          Toggles the given style name, adding if not already present, removing if present.
 java.lang.String toString()
           
 com.extjs.gxt.ui.client.util.Point translatePoints(com.extjs.gxt.ui.client.util.Point p)
           
 El unclip()
          Return clipping (overflow) to original clipping before clip() was called.
 El unmask()
          Removes a previously applied mask.
 El unwrap(com.google.gwt.user.client.Element child, com.extjs.gxt.ui.client.util.Rectangle bounds)
          Unwraps the child element.
 El update(java.lang.String html)
          Sets the innerHTML to the given markup.
 El updateZIndex(int adj)
          Sets the element's z-index using XDOM.getTopZIndex() to ensure it has the highest values.
 com.extjs.gxt.ui.client.util.Rectangle wrap(com.google.gwt.user.client.Element wrapper)
          Wraps the element with the specified wrapper.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dom

public com.google.gwt.user.client.Element dom
The wrapped dom element.

Constructor Detail

El

public El(com.google.gwt.user.client.Element element)
Creates a new el instance.

Parameters:
element - the element to be wrapped

El

public El(java.lang.String html)
Creates a new El instance from the HTML fragment.

Parameters:
html - the html
Method Detail

addUnits

public static java.lang.String addUnits(java.lang.String v,
                                        java.lang.String defaultUnit)
Tests to see if the value has units, otherwise appends the default (px).

Parameters:
v - the value
Returns:
the value with units

fly

public static El fly(com.google.gwt.dom.client.Element element)

fly

public static El fly(com.google.gwt.dom.client.Element element,
                     java.lang.String s)
Gets the globally shared flyweight El, 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:
element - the element
Returns:
the el instance

fly

public static El fly(com.google.gwt.user.client.Element element)

fly

public static El fly(com.google.gwt.user.client.Element element,
                     java.lang.String s)
Gets the globally shared flyweight El, 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:
element - the element to be wrapped
Returns:
the global El object

isBorderBox

public static boolean isBorderBox(com.google.gwt.user.client.Element element)
Returns true if the passed element has a border box.

Parameters:
element - the element to test
Returns:
true if the passed element has a border box

addEventsSunk

public El addEventsSunk(int event)
Adds the event type to the element's sunk events.

Parameters:
event - the events to add
Returns:
this

addStyleName

public El addStyleName(java.lang.String... styleNames)
Adds the style name to the element. Duplicate styles are automatically filtered out.

Parameters:
styleNames - the new style names
Returns:
this

toggleStyleName

public El toggleStyleName(java.lang.String styleName)
Toggles the given style name, adding if not already present, removing if present.

Parameters:
styleName - the style name to toggle
Returns:
this

adjustForConstraints

public com.extjs.gxt.ui.client.util.Point adjustForConstraints(com.extjs.gxt.ui.client.util.Point p)
Ensures the element is within the browser viewport.

Parameters:
p - the target destination
Returns:
the new location

alignTo

public El alignTo(com.google.gwt.user.client.Element align,
                  java.lang.String pos,
                  int[] offsets)
Aligns the element with another element relative to the specified anchor points. Two values from the table below should be passed separated by a dash, the first value is used as the element's anchor point, and the second value is used as the target's anchor point.

In addition to the anchor points, the position parameter also supports the "?" character. If "?" is passed at the end of the position string, the element will attempt to align as specified, but the position will be adjusted to constrain to the viewport if necessary. Note that the element being aligned might be swapped to align to a different position than that specified in order to enforce the viewport constraints. Following are all of the supported anchor positions:

Following are all of the supported anchor positions:
  Value  Description
  -----  -----------------------------
  tl     The top left corner (default)
  t      The center of the top edge
  tr     The top right corner
  l      The center of the left edge
  c      In the center of the element
  r      The center of the right edge
  bl     The bottom left corner
  b      The center of the bottom edge
  br     The bottom right corner
 

Parameters:
align - the element to align to
pos - the position to align to
offsets - the offsets or null
Returns:
this

appendChild

public El appendChild(com.google.gwt.user.client.Element child)
Appends a element.

Parameters:
child - the element to add
Returns:
the child element

applyStyles

public El applyStyles(java.lang.String styles)
More flexible version of setStyleAttribute(java.lang.String, java.lang.Object) for setting style properties. Style attribute names must be in lower camel case, e.g. "backgroundColor:white"

Parameters:
styles - a style specification string
Returns:
this

blink

public El blink(com.extjs.gxt.ui.client.fx.FxConfig config)
Blinks the element.

Parameters:
config - the fx config
Returns:
this

blur

public El blur()
Removes focus.

Returns:
this

boxWrap

public El boxWrap(java.lang.String style)
Wraps the specified element with a special markup/CSS block.

Parameters:
style - a base CSS class to apply to the containing wrapper element (defaults to 'x-box').
Returns:
this

center

public El center()
Centers the element in the viewport.

Returns:
this

center

public El center(boolean constrainViewport)
Centers the element.

Parameters:
constrainViewport - true to constrain the element position to the viewport.
Returns:
this

center

public El center(com.google.gwt.user.client.Element container)
Centers an element.

Parameters:
container - the container element
Returns:
this

child

public El child(java.lang.String selector)
Selects a single child at any depth below this element based on the passed CSS selector.

Parameters:
selector - the css selector
Returns:
the child element

childElement

public com.google.gwt.user.client.Element childElement(java.lang.String selector)
Selects a single child at any depth below this element based on the passed CSS selector.

Parameters:
selector - the css selector
Returns:
the child element

childNode

public El childNode(int index)
Returns the element's child.

Parameters:
index - the index of the child element
Returns:
the child element

clearOpacity

public El clearOpacity()
Clears the set opacity correctly. This is mostly needed only on IE.

Returns:
this

click

public El click()
Generators a native dom click on the element.

Returns:
this

clip

public El clip()
Clips overflow on the element.

Returns:
this

cloneNode

public com.google.gwt.user.client.Element cloneNode(boolean deep)
Clones the element.

Parameters:
deep - true to clone children
Returns:
the new element

createChild

public El createChild(java.lang.String html)
Creates and adds a child using the HTML fragment.

Parameters:
html - the html fragment
Returns:
the new child

createChild

public El createChild(java.lang.String html,
                      com.google.gwt.user.client.Element insertBefore)
Creates and inserts a child using the HTML fragment.

Parameters:
html - the html fragment
insertBefore - a child element of this element
Returns:
the new child

disable

public El disable()
Disables the element.

Returns:
this

disableContextMenu

public El disableContextMenu(boolean disable)
Enables and disables the browsers default context menu for the specified element.A circular reference will be created when disabling text selection. Disabling should be cleared when the element is detached. See the Component source for an example.

Parameters:
disable - true to disable, false to enable
Returns:
this

disableTextSelection

public El disableTextSelection(boolean disable)
Enables or disables text selection for the element. A circular reference will be created when disabling text selection. Disabling should be cleared when the element is detached. See the Component source for an example.

Parameters:
disable - true to disable, false to enable
Returns:
this

down

public El 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

enable

public El enable()
Enables the element.

Returns:
this

enableDisplayMode

public El enableDisplayMode(java.lang.String display)
Convenience method for setVisibilityMode(VisibilityMode.DISPLAY).

Parameters:
display - what to set display to when visible
Returns:
this

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

fadeIn

public El fadeIn(com.extjs.gxt.ui.client.fx.FxConfig config)
Fades in the element.

Parameters:
config - the fx config
Returns:
this

fadeOut

public El fadeOut(com.extjs.gxt.ui.client.fx.FxConfig config)
Fades out the element.

Parameters:
config - the fx config
Returns:
this

fadeToggle

public El fadeToggle(com.extjs.gxt.ui.client.fx.FxConfig config)
Toggles the element visibility using a fade effect.

Parameters:
config - the fx config
Returns:
this

findParent

public El 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
Returns:
the matching element

findParentElement

public com.google.gwt.user.client.Element findParentElement(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
Returns:
the matching element

firstChild

public El firstChild()
Returns the element's first child.

Returns:
the first child

focus

public El focus()
Tries to focus the element.

Returns:
this

getAlignToXY

public com.extjs.gxt.ui.client.util.Point getAlignToXY(com.google.gwt.user.client.Element elem,
                                                       java.lang.String p,
                                                       int ox,
                                                       int oy)

getAlignToXY

public com.extjs.gxt.ui.client.util.Point getAlignToXY(com.google.gwt.user.client.Element align,
                                                       java.lang.String pos,
                                                       int[] offsets)
Gets the x,y coordinates to align this element with another element. See alignTo(com.google.gwt.user.client.Element, java.lang.String, int[]) for more info on the supported position values.

Parameters:
align - the element to align to
pos - the position to align to
offsets - the offsets or null
Returns:
the point

getAnchorXY

public com.extjs.gxt.ui.client.util.Point getAnchorXY(java.lang.String anchor,
                                                      boolean local)
Returns the x,y coordinates specified by the anchor position on the element.

Parameters:
anchor - the specified anchor position (defaults to "c"). See alignTo(com.google.gwt.user.client.Element, java.lang.String, int[]) for details on supported anchor positions.
local - true to get the local (element top/left-relative) anchor position instead of page coordinates
Returns:
the position

getBorderWidth

public int getBorderWidth(java.lang.String sides)
Returns the width of the border(s) for the specified side(s).

Parameters:
sides - can be t, l, r, b or any combination of those to add multiple values. For example, passing lr would get the border (l)eft width + the border (r)ight width.
Returns:
the width of the sides passed added together

getBottom

public int getBottom(boolean local)
Returns the bottom Y coordinate of the element (element Y position + element height).

Parameters:
local -
Returns:
the bottom value

getBounds

public com.extjs.gxt.ui.client.util.Rectangle getBounds()
Returns the elements bounds in page coordinates.

Returns:
the bounds

getBounds

public com.extjs.gxt.ui.client.util.Rectangle getBounds(boolean local)
Returns the elements bounds in page coordinates.

Parameters:
local - if true the element's left and top are returned instead of page coordinates
Returns:
the bounds

getBounds

public com.extjs.gxt.ui.client.util.Rectangle getBounds(boolean local,
                                                        boolean adjust)
Returns the element's bounds in page coordinates.

Parameters:
local - if true the element's left and top are returned instead of page coordinates
adjust - if true sizes get adjusted
Returns:
the element's bounds

getChild

public El getChild(int index)
Returns a child element.

Parameters:
index - the child index
Returns:
the child

getChildElement

public com.google.gwt.user.client.Element getChildElement(int index)
Returns a child element.

Parameters:
index - the child index
Returns:
the child

getChildIndex

public int getChildIndex(com.google.gwt.user.client.Element child)
Returns the index of the child element.

Returns:
the index

getClientHeight

public int getClientHeight()
Returns the element's client height property.

Returns:
the client width value

getClientWidth

public int getClientWidth()
Returns the element's client width property.

Returns:
the client width value

getComputedHeight

public int getComputedHeight()
Returns either the offsetHeight or the height of this element based on it's CSS height.

Returns:
the height

getComputedWidth

public int getComputedWidth()
Returns either the offsetWidth or the width of this element based on it's CSS width.

Returns:
the width

getFrameSize

public com.extjs.gxt.ui.client.util.Size getFrameSize()
Returns the sum width of the padding and borders for all "sides". See #getBorderWidth() for more information about the sides.

Returns:
the frame size

getFrameWidth

public int getFrameWidth(java.lang.String sides)
Returns the sum width of the padding and borders for the passed "sides". See #getBorderWidth() for more information about the sides.

Parameters:
sides - sides
Returns:
the width

getHeight

public int getHeight()
Returns the offset height of the element.

Returns:
the height

getHeight

public int getHeight(boolean content)
Returns the element's height.

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

getId

public java.lang.String getId()
Returns the element's id.

Returns:
the id

getInnerHtml

public java.lang.String getInnerHtml()
Returns the element's inner HTML.

Returns:
the inner html

getIntStyleAttribute

public int getIntStyleAttribute(java.lang.String attr)
Returns the element's style value.

Parameters:
attr - the attribute name
Returns:
the value

getLayoutBounds

public com.extjs.gxt.ui.client.util.Rectangle getLayoutBounds()
Returns the element's content area bounds.

Returns:
the bounds

getLeft

public int getLeft()
Returns the top Y coordinate.

Returns:
the top value

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 left value

getMargins

public int getMargins(java.lang.String sides)
Returns an object with properties top, left, right and bottom representing the margins of this element unless sides is passed, then it returns the calculated width of the sides (see #getPadding).

Parameters:
sides - any combination of l, r, t, b to get the sum of those sides
Returns:
the margins

getOffsetsTo

public com.extjs.gxt.ui.client.util.Point getOffsetsTo(com.google.gwt.user.client.Element to)
Returns the offsets between two elements. Both element must be part of the DOM tree and not have display:none to have page coordinates.

Parameters:
to - the to element
Returns:
the xy page offsets

getOuterHtml

public java.lang.String getOuterHtml()
Returns the element's outer HTML.

Returns:
the inner html

getPadding

public int getPadding(java.lang.String sides)
Gets the width of the padding(s) for the specified side(s).

Parameters:
sides - can be t, l, r, b or any combination of those to add multiple values. For example, passing lr would get the border (l)eft width + the border (r)ight width.
Returns:
the width of the sides passed added together

getParent

public El getParent()
Returns the element's parent.

Returns:
the parent

getRegion

public com.extjs.gxt.ui.client.util.Region getRegion()
Returns the region of the given element. The element must be part of the DOM tree to have a region.

Returns:
a region containing top, left, bottom, right

getRight

public int getRight(boolean local)
Returns the right X coordinate of the element (element X position + element width).

Parameters:
local - true to get the local css position instead of page coordinate
Returns:
the right value

getScroll

public com.extjs.gxt.ui.client.util.Scroll getScroll()
Returns the body elements current scroll position.

Returns:
the scroll position

getScrollLeft

public int getScrollLeft()
Returns the horizontal scroll position.

Returns:
the scroll position

getScrollTop

public int getScrollTop()
Returns the current vertical scroll position.

Returns:
the scroll position

getSize

public com.extjs.gxt.ui.client.util.Size getSize()
Returns the size of the element.

Returns:
the size

getSize

public com.extjs.gxt.ui.client.util.Size getSize(boolean content)
Returns the element's size.

Parameters:
content - true to get the size minus borders and padding
Returns:
the size

getStyleAttribute

public com.extjs.gxt.ui.client.core.FastMap<java.lang.String> getStyleAttribute(java.util.List<java.lang.String> attr)

getStyleAttribute

public java.lang.String getStyleAttribute(java.lang.String attr)
Normalizes currentStyle and computedStyle.

Parameters:
attr - the style attribute whose value is returned.
Returns:
the current value of the style attribute for this element.

getStyleHeight

public int getStyleHeight()
Returns the style width.

Returns:
the style width

getStyleName

public java.lang.String getStyleName()
Returns the element's style name.

Returns:
the style name

getStyleSize

public com.extjs.gxt.ui.client.util.Size getStyleSize()

getStyleSize

public com.extjs.gxt.ui.client.util.Size getStyleSize(boolean contentOnly)
Returns the element's size, using style attribute before offsets.

Returns:
the size

getStyleWidth

public int getStyleWidth()
Returns the style width. A value is only returned if the specified style is in pixels.

Returns:
the style width

getSubChild

public com.google.gwt.user.client.Element getSubChild(int depth)
Returns the element's sub child.

Parameters:
depth - the child node depth
Returns:
the child element

getTextWidth

public int getTextWidth()
Returns the measured width of the element's text.

Returns:
the width

getTop

public int getTop()
Returns the top Y coordinate.

Returns:
the top value

getTop

public int getTop(boolean local)
Gets the top Y coordinate.

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

getValue

public java.lang.String getValue()
Returns the the "value" attribute.

Returns:
the value

getWidth

public int getWidth()
Returns the offset width.

Returns:
the width

getWidth

public int getWidth(boolean content)
Returns the element's width.

Parameters:
content - true to get the width minus borders and padding
Returns:
the 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.

Returns:
the x position of the element

getXY

public com.extjs.gxt.ui.client.util.Point getXY()
Gets the current position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates.

Returns:
the location

getY

public int getY()
Gets the current Y position of the element based on page coordinates.

Returns:
the y position of the element

getZIndex

public int getZIndex()
Returns the element's z-index.

Returns:
the z-index

hasStyleName

public boolean hasStyleName(java.lang.String style)
Checks if the specified CSS style name exists on this element's DOM node.

Parameters:
style - the style name
Returns:
true if the style name exists, else false

hide

public El hide()
Hides this element

Returns:
this

insertBefore

public El insertBefore(com.google.gwt.user.client.Element before)
Inserts this element before the passed element.

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

insertBefore

public El insertBefore(com.google.gwt.user.client.Element child,
                       com.google.gwt.user.client.Element before)
Inserts the element as a child before the given element.

Parameters:
child - the element to insert
before - the element the child will be inserted before
Returns:
this

insertBefore

public El insertBefore(com.google.gwt.user.client.Element[] elements,
                       com.google.gwt.user.client.Element before)
Inserts the elements as a child before the given element.

Parameters:
elements - the elements to insert
before - the element the children will be inserted before
Returns:
this

insertChild

public El insertChild(com.google.gwt.user.client.Element child,
                      int index)
Inserts an element at the specified index.

Parameters:
child - the child element
index - the insert location
Returns:
this

insertChild

public El insertChild(com.google.gwt.user.client.Element[] children,
                      int index)
Inserts the children at the specified index.

Parameters:
children - the children to add
index - the insert location
Returns:
this

insertFirst

public El insertFirst(com.google.gwt.user.client.Element element)
Inserts an element as the first child.

Parameters:
element - the child element
Returns:
this

insertFirst

public El insertFirst(com.google.gwt.user.client.Element[] elems)
Inserts the children.

Parameters:
elems - the child elements
Returns:
this

insertFirst

public El insertFirst(java.lang.String html)
Creates and inserts a child element.

Parameters:
html - the HTML fragment
Returns:
the new child

insertHtml

public El insertHtml(java.lang.String where,
                     java.lang.String html)
Inserts an html fragment into this element

Parameters:
where - where to insert the html in relation to el - beforeBegin, afterBegin, beforeEnd, afterEnd.
html - the HTML fragment
Returns:
the inserted node (or nearest related if more than 1 inserted)

insertInto

public El insertInto(com.google.gwt.user.client.Element parent)
Inserts the element into the given parent.

Parameters:
parent - the parent element
Returns:
this

insertInto

public El insertInto(com.google.gwt.user.client.Element parent,
                     int index)
Inserts a element.

Parameters:
parent - the parent element
index - the insert index
Returns:
this

insertLast

public El insertLast(com.google.gwt.user.client.Element child)
Inserts the child element as the last child.

Parameters:
child - the element to insert
Returns:
this

insertSibling

public com.google.gwt.user.client.Element insertSibling(com.google.gwt.user.client.Element elem,
                                                        java.lang.String where)
Inserts the passed element as a sibling of this element.

Parameters:
elem - the element to insert
where - 'before' or 'after'
Returns:
the inserted element

insertSibling

public El insertSibling(com.google.gwt.user.client.Element[] elems,
                        java.lang.String where)
Inserts the passed elements as a sibling of this element.

Parameters:
elems - the elements to insert
where - where 'before' or 'after'
Returns:
this

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 - selector
Returns:
true if the element matches the selector, else false

isBorderBox

public boolean isBorderBox()
Returns true if the element is a border box.

Returns:
true for border box

isConnected

public boolean isConnected()
Returns true if the element is part of the browser's DOM.

Returns:
the dom state

isMasked

public boolean isMasked()
Returns true if this element is masked.

Returns:
the masked state

isOrHasChild

public boolean isOrHasChild(com.google.gwt.user.client.Element child)
Returns true if the child element is or a child of this element.

Parameters:
child - the child element
Returns:
true if is or child of element

isScrollable

public boolean isScrollable()
Returns whether the element is scrollable (x or y).

Returns:
true if scrollable

isScrollableX

public boolean isScrollableX()
Returns whether the element is scrollable on the x-axis.

Returns:
true if scrollable on the x-axis

isScrollableY

public boolean isScrollableY()
Returns whether the element is scrollable on the y-axis.

Returns:
true if scrollable on the y-axis

isStyleAttribute

public boolean isStyleAttribute(java.util.Map<java.lang.String,java.lang.String> map,
                                boolean matchAll)

isStyleAttribute

public boolean isStyleAttribute(java.lang.String attr,
                                java.lang.String value)

isVisibility

public boolean isVisibility()
Returns true if the element is visible using the css 'visibiliy' attribute.

Returns:
the visible state

isVisible

public boolean isVisible()
Returns whether the element is currently visible.

Returns:
true if visible

isVisible

public boolean isVisible(boolean deep)
Returns whether the element is currently visible.

Parameters:
deep - true to deep test
Returns:
true if visible

lastChild

public El lastChild()
Returns the element's last child.

Returns:
the last child

load

public com.google.gwt.http.client.Request load(com.google.gwt.http.client.RequestBuilder builder)
Retrieves the data using the request builder and updates the element'c contents.

This method is subject to change.

Parameters:
builder - the request builder

makePositionable

public El makePositionable()
Makes an element positionable.


makePositionable

public El makePositionable(boolean absolute)
Makes an element positionable.

Parameters:
absolute - true to position absolutely
Returns:
this

mask

public El mask()
Puts a mask over this element to disable user interaction.

Returns:
the mask element

mask

public El mask(java.lang.String message)
Puts a mask over this element to disable user interaction.

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

mask

public El mask(java.lang.String message,
               java.lang.String messageStyleName)
Puts a mask over this element to disable user interaction.

Parameters:
message - a message to display in the mask
messageStyleName - a CSS style name to be applied to the message text
Returns:
the mask element

nextSibling

public com.google.gwt.user.client.Element nextSibling()
Returns the elements next sibling.

Returns:
the sibling element

previousSibling

public com.google.gwt.user.client.Element previousSibling()
Returns the elements previous sibling.

Returns:
the previous sibling

remove

public El remove()
Removes this element from the DOM


removeChild

public El removeChild(com.google.gwt.user.client.Element child)
Removes a child.

Parameters:
child - the child to remove
Returns:
this

removeChildren

public El removeChildren()
Removes all the elements children.


removeFromParent

public El removeFromParent()
Removes the element from it's parent.


removeStyleName

public El removeStyleName(java.lang.String... styleNames)
Removes the style names(s) from the element.

Parameters:
styleNames - the style names
Returns:
this

removeStyleName

public El removeStyleName(java.lang.String styleName)
Removes a style name.

Parameters:
styleName - the style names to remove
Returns:
this

repaint

public El repaint()
Forces the Browser to repaint this element.

Returns:
this

replaceStyleName

public El replaceStyleName(java.lang.String oldStyle,
                           java.lang.String newStyle)
Replaces a style name on the element with another. If the old name does not exist, the new name will simply be added.

Parameters:
oldStyle - the style to replace
newStyle - the new style
Returns:
this

scrollIntoView

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

scrollIntoView

public El scrollIntoView(com.google.gwt.user.client.Element container,
                         boolean hscroll,
                         int[] offsets)
Scrolls the element into view.

Parameters:
container - the container element
hscroll - false to disable horizontal scrolling.

scrollTo

public El scrollTo(java.lang.String side,
                   int value)
Scrolls this element the specified scroll point.

Parameters:
side - either "left" for scrollLeft values or "top" for scrollTop values.
value - the new scroll value
Returns:
this

scrollTo

public El scrollTo(java.lang.String side,
                   int value,
                   com.extjs.gxt.ui.client.fx.FxConfig config)
Scrolls this element the specified scroll point.

Parameters:
side - side either "left" for scrollLeft values or "top" for scrollTop values.
value - the new scroll value
config - the fx config
Returns:
this

select

public com.google.gwt.dom.client.NodeList<com.google.gwt.user.client.Element> select(java.lang.String selector)
Selects child nodes based on the passed CSS selector (the selector should not contain an id).

Parameters:
selector - the selector/xpath query
Returns:
the matching elements

selectNode

public El selectNode(java.lang.String selector)
Selects a single element.

Parameters:
selector - the CSS selector
Returns:
the matching element

setBorders

public El setBorders(boolean show)
Adds or removes a border. The style name 'x-border' is added to the widget to display a border.

Parameters:
show - the show state
Returns:
this

setBounds

public El setBounds(int x,
                    int y,
                    int width,
                    int height)
Sets the element's bounds.

Parameters:
x - the x coordinate
y - the y coordinate
width - the new width
height - the new height
Returns:
this

setBounds

public El setBounds(int x,
                    int y,
                    int width,
                    int height,
                    boolean adjust)
Sets the element's bounds.

Parameters:
x - the x coordinate
y - the y coordinate
width - the new width
height - the new height
adjust - true to adjust for box model issues
Returns:
this

setBounds

public El setBounds(com.extjs.gxt.ui.client.util.Rectangle bounds)
Sets the element's bounds.

Parameters:
bounds - the new bounds
Returns:
this

setBounds

public El setBounds(com.extjs.gxt.ui.client.util.Rectangle bounds,
                    boolean content)
Sets the element's bounds.

Parameters:
bounds - the new bounds
content - true to adjust for box model issues
Returns:
this

setDisplayed

public El setDisplayed(boolean display)
Sets the CSS display property.

Parameters:
display - true to display the element using its default display
Returns:
this

setDisplayed

public El setDisplayed(java.lang.String display)
Sets the CSS display property.

Parameters:
display - the display value
Returns:
this

setElementAttribute

public El setElementAttribute(java.lang.String attr,
                              boolean value)
Sets an element's attribute.

Parameters:
attr - the attribute name
value - the value
Returns:
this

setElementAttribute

public El setElementAttribute(java.lang.String attr,
                              int value)
Sets an element's attribute.

Parameters:
attr - the attribute name
value - the value
Returns:
this

setElementAttribute

public El setElementAttribute(java.lang.String attr,
                              java.lang.String value)
Sets an element's attribute.

Parameters:
attr - the attribute name
value - the value
Returns:
this

setEnabled

public void setEnabled(boolean enabled)
Convenience function for setting disabled/enabled by boolean.

Parameters:
enabled - the enabled state

setFocus

public El setFocus(boolean focus)
True to focus, false to blur.

Parameters:
focus - the new focus state

setHeight

public El setHeight(int height)
Sets the elements height.

Parameters:
height - the height
Returns:
this

setHeight

public El setHeight(int height,
                    boolean adjust)
Sets the elements height.

Parameters:
height - the height
adjust - true to adjust for box model issues
Returns:
this

setHeight

public El setHeight(java.lang.String height)
Sets the elements height.

Parameters:
height - the height
Returns:
this

setIconStyle

public El setIconStyle(java.lang.String style)
Sets the the icon for an element either as a CSS style name or image path.

Parameters:
style - the style are image path

setId

public El setId(java.lang.String id)
Sets the element's id.

Parameters:
id - the new id
Returns:
this

setInnerHtml

public El setInnerHtml(java.lang.String html)
Sets the element's inner html.

Parameters:
html - the new HTML
Returns:
this

setIntElementProperty

public El setIntElementProperty(java.lang.String property,
                                int value)
Sets an element's property.

Parameters:
property - the property name
value - the value
Returns:
this

setLeft

public El setLeft(int left)
Sets the element's left position directly using CSS style (instead of setX(int)).

Parameters:
left - the left value
Returns:
this

setLeftTop

public El setLeftTop(int left,
                     int top)
Quick set left and top adding default units.

Parameters:
left - the left value
top - the top value
Returns:
this

setMargins

public El setMargins(com.extjs.gxt.ui.client.util.Margins margin)
Sets the elements's margin.

Parameters:
margin - the margin
Returns:
this

setPadding

public El setPadding(com.extjs.gxt.ui.client.util.Padding padding)
Sets the elements's padding.

Parameters:
padding - the padding
Returns:
this

setPagePosition

public El setPagePosition(int x,
                          int y)
Sets the element's position in page coordinates.

Parameters:
x - the x coordinate
y - the y coordinate
Returns:
this

setScrollLeft

public El setScrollLeft(int left)
Sets the element's horizontal scroll position.

Parameters:
left - the left value
Returns:
this

setScrollTop

public El setScrollTop(int top)
Sets the element's vertical scroll position.

Parameters:
top - the top value
Returns:
this

setSize

public El setSize(int width,
                  int height)
Sets the element's size.

Parameters:
width - the new width
height - the new height
Returns:
this

setSize

public El setSize(int width,
                  int height,
                  boolean adjust)
Set the size of the element.

Parameters:
width - the new width
height - the new height
adjust - true to adjust for box model issues
Returns:
this

setSize

public El setSize(com.extjs.gxt.ui.client.util.Size size)
Sets the element's size.

Parameters:
size - the size
Returns:
this

setSize

public El setSize(java.lang.String width,
                  java.lang.String height)
Sets the element's size.

Parameters:
width - the new size
height - the new height
Returns:
this

setStyleAttribute

public El setStyleAttribute(java.lang.String attr,
                            java.lang.Object value)
Sets a style attribute.

Parameters:
attr - the attribute name
value - the int value
Returns:
this

setStyleName

public El setStyleName(java.lang.String style)
Sets the element's style name.

Parameters:
style - the style name
Returns:
this

setStyleName

public El setStyleName(java.lang.String style,
                       boolean add)
Adds or removes the style name.

Parameters:
style - the style name
add - true to add, false to remove
Returns:
this

setStyleSize

public El setStyleSize(int width,
                       int height)
Sets the element's size using style attributes.

Parameters:
width - the width
height - the height
Returns:
this

setTabIndex

public El setTabIndex(int index)
Sets the element's tab index.

Parameters:
index - the tab index
Returns:
this

setTitle

public El setTitle(java.lang.String title)
Sets the element's title property.

Parameters:
title - the new title
Returns:
this

setTop

public El setTop(int top)
Sets the element's top position directly using CSS style (instead of setY(int)).

Parameters:
top - the top value
Returns:
this

setValue

public El setValue(java.lang.String value)
Sets the element's value property.

Parameters:
value - the value

setVisibility

public El setVisibility(boolean visible)
Sets the elements css 'visibility' property. Behavior is different than using the 'display' property.

Parameters:
visible - true to show, false to hide
Returns:
this

setVisibilityMode

public El setVisibilityMode(El.VisMode visMode)
Sets the element's visibility mode. When setVisible() is called it will use this to determine whether to set the visibility or the display property.

Parameters:
visMode - value {link VisMode#VISIBILITY}} or El.VisMode.DISPLAY
Returns:
this

setVisible

public El setVisible(boolean visible)
Sets the visibility of the element (see details). If the vis mode is set to DISPLAY, it will use the display property to hide the element, otherwise it uses visibility. The default is to hide and show using the DISPLAY property.

Parameters:
visible - whether the element is visible
Returns:
this

setWidth

public El setWidth(int width)
Sets the element's width.

Parameters:
width - the new width
Returns:
this

setWidth

public El setWidth(int width,
                   boolean adjust)
Sets the elements's width.

Parameters:
width - the new width
adjust - true to adjust for box model issues
Returns:
this

setWidth

public El setWidth(java.lang.String width)
Sets the element's width.

Parameters:
width - the new width
Returns:
this

setX

public El setX(int x)
Sets the X position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates.

Parameters:
x - the x coordinate
Returns:
this

setXY

public El setXY(int x,
                int y)
Sets the elements position in page coordinates.

Parameters:
x - the x coordinate
y - the y coordinate
Returns:
this

setXY

public El setXY(int x,
                int y,
                com.extjs.gxt.ui.client.fx.FxConfig config)
Sets the elements position in page coordinates.

Parameters:
x - the x coordinate
y - the y coordinate
Returns:
this

setXY

public El setXY(com.extjs.gxt.ui.client.util.Point p)
Sets the element's position in page coordinates.

Parameters:
p - the position
Returns:
this

setY

public El setY(int y)
Sets the Y position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates.

Parameters:
y - the y coordinate
Returns:
this

setZIndex

public El setZIndex(int zIndex)
Sets the element's z-index.

Parameters:
zIndex - the z-index value
Returns:
this

show

public El show()
Shows this element

Returns:
this

slideIn

public El slideIn(com.extjs.gxt.ui.client.Style.Direction direction,
                  com.extjs.gxt.ui.client.fx.FxConfig config)
Slides the element in.

Parameters:
direction - the direction
config - the fx config
Returns:
this

slideOut

public El slideOut(com.extjs.gxt.ui.client.Style.Direction direction,
                   com.extjs.gxt.ui.client.fx.FxConfig config)
Slides the element out.

Parameters:
direction - the direction
config - the fx config
Returns:
this

subChild

public El subChild(int depth)
Returns the element's sub child.

Parameters:
depth - the child node depth
Returns:
the child element

sync

public El sync(boolean show)
Synchronizes the layer.

Parameters:
show - true to show

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

translatePoints

public com.extjs.gxt.ui.client.util.Point translatePoints(com.extjs.gxt.ui.client.util.Point p)

unclip

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

Returns:
this

unmask

public El unmask()
Removes a previously applied mask. return this


unwrap

public El unwrap(com.google.gwt.user.client.Element child,
                 com.extjs.gxt.ui.client.util.Rectangle bounds)
Unwraps the child element.

Parameters:
bounds - the original bounds

update

public El update(java.lang.String html)
Sets the innerHTML to the given markup.

Parameters:
html - the html
Returns:
this

updateZIndex

public El updateZIndex(int adj)
Sets the element's z-index using XDOM.getTopZIndex() to ensure it has the highest values.

Parameters:
adj - the adjustment to be applied to the z-index value
Returns:
this

wrap

public com.extjs.gxt.ui.client.util.Rectangle wrap(com.google.gwt.user.client.Element wrapper)
Wraps the element with the specified wrapper. The wrapper will have the same size and position of the element. The original bounds can be used to 'unwrap' the element.

Parameters:
wrapper - the wrapper element
Returns:
the original bounds

getConstrainToXY

protected com.extjs.gxt.ui.client.util.Point getConstrainToXY(com.google.gwt.user.client.Element elem,
                                                              com.extjs.gxt.ui.client.util.Point proposedXY)

getClassName

public static java.lang.String getClassName(com.google.gwt.user.client.Element dom)


Copyright © 2010. All Rights Reserved.