public class El extends Object
Modifier and Type | Class and Description |
---|---|
static class |
El.VisMode
VisMode enumeration.
|
Modifier and Type | Field and Description |
---|---|
com.google.gwt.user.client.Element |
dom
The wrapped dom element.
|
Constructor and Description |
---|
El(com.google.gwt.user.client.Element element)
Creates a new el instance.
|
El(String html)
Creates a new El instance from the HTML fragment.
|
Modifier and Type | Method and Description |
---|---|
El |
addEventsSunk(int event)
Adds the event type to the element's sunk events.
|
El |
addStyleName(String... styleNames)
Adds the style name to the element.
|
static String |
addUnits(String v,
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,
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(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(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(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(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(String html)
Creates and adds a child using the HTML fragment.
|
El |
createChild(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(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(String display)
Convenience method for setVisibilityMode(VisibilityMode.DISPLAY).
|
boolean |
equals(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(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(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,
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,
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,
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,
String p,
int ox,
int oy) |
com.extjs.gxt.ui.client.util.Point |
getAnchorXY(String anchor,
boolean local)
Returns the x,y coordinates specified by the anchor position on the
element.
|
int |
getBorderWidth(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 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(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.
|
String |
getId()
Returns the element's id.
|
String |
getInnerHtml()
Returns the element's inner HTML.
|
int |
getIntStyleAttribute(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(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.
|
String |
getOuterHtml()
Returns the element's outer HTML.
|
int |
getPadding(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<String> |
getStyleAttribute(List<String> attr) |
String |
getStyleAttribute(String attr)
Normalizes currentStyle and computedStyle.
|
int |
getStyleHeight()
Returns the style width.
|
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.
|
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(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(String html)
Creates and inserts a child element.
|
El |
insertHtml(String where,
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,
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,
String where)
Inserts the passed element as a sibling of this element.
|
boolean |
is(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(Map<String,String> map,
boolean matchAll) |
boolean |
isStyleAttribute(String attr,
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(String message)
Puts a mask over this element to disable user interaction.
|
El |
mask(String message,
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(String... styleNames)
Removes the style names(s) from the element.
|
El |
removeStyleName(String styleName)
Removes a style name.
|
El |
repaint()
Forces the Browser to repaint this element.
|
El |
replaceStyleName(String oldStyle,
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(String side,
int value)
Scrolls this element the specified scroll point.
|
El |
scrollTo(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(String selector)
Selects child nodes based on the passed CSS selector (the selector should
not contain an id).
|
El |
selectNode(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(String display)
Sets the CSS display property.
|
El |
setElementAttribute(String attr,
boolean value)
Sets an element's attribute.
|
El |
setElementAttribute(String attr,
int value)
Sets an element's attribute.
|
El |
setElementAttribute(String attr,
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(String height)
Sets the elements height.
|
El |
setIconStyle(String style)
Sets the the icon for an element either as a CSS style name or image path.
|
El |
setId(String id)
Sets the element's id.
|
El |
setInnerHtml(String html)
Sets the element's inner html.
|
El |
setIntElementProperty(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(String width,
String height)
Sets the element's size.
|
El |
setStyleAttribute(String attr,
Object value)
Sets a style attribute.
|
El |
setStyleName(String style)
Sets the element's style name.
|
El |
setStyleName(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(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(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(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(String styleName)
Toggles the given style name, adding if not already present, removing if
present.
|
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(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.
|
public El(com.google.gwt.user.client.Element element)
element
- the element to be wrappedpublic El(String html)
html
- the htmlpublic static String addUnits(String v, String defaultUnit)
v
- the valuepublic static El fly(com.google.gwt.dom.client.Element element)
public static El fly(com.google.gwt.dom.client.Element element, String s)
element
- the elementpublic static El fly(com.google.gwt.user.client.Element element)
public static El fly(com.google.gwt.user.client.Element element, String s)
element
- the element to be wrappedpublic static boolean isBorderBox(com.google.gwt.user.client.Element element)
element
- the element to testpublic El addEventsSunk(int event)
event
- the events to addpublic El addStyleName(String... styleNames)
styleNames
- the new style namespublic El toggleStyleName(String styleName)
styleName
- the style name to togglepublic com.extjs.gxt.ui.client.util.Point adjustForConstraints(com.extjs.gxt.ui.client.util.Point p)
p
- the target destinationpublic El alignTo(com.google.gwt.user.client.Element align, String pos, int[] offsets)
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:
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
align
- the element to align topos
- the position to align tooffsets
- the offsets or null
public El appendChild(com.google.gwt.user.client.Element child)
child
- the element to addpublic El applyStyles(String styles)
setStyleAttribute(java.lang.String, java.lang.Object)
for setting style
properties. Style attribute names must be in lower camel case, e.g.
"backgroundColor:white"styles
- a style specification stringpublic El blink(com.extjs.gxt.ui.client.fx.FxConfig config)
config
- the fx configpublic El blur()
public El boxWrap(String style)
style
- a base CSS class to apply to the containing wrapper element
(defaults to 'x-box').public El center()
public El center(boolean constrainViewport)
constrainViewport
- true to constrain the element position to the
viewport.public El center(com.google.gwt.user.client.Element container)
container
- the container elementpublic El child(String selector)
selector
- the css selectorpublic com.google.gwt.user.client.Element childElement(String selector)
selector
- the css selectorpublic El childNode(int index)
index
- the index of the child elementpublic El clearOpacity()
public El click()
public El clip()
public com.google.gwt.user.client.Element cloneNode(boolean deep)
deep
- true to clone childrenpublic El createChild(String html)
html
- the html fragmentpublic El createChild(String html, com.google.gwt.user.client.Element insertBefore)
html
- the html fragmentinsertBefore
- a child element of this elementpublic El disable()
public El disableContextMenu(boolean disable)
Component
source for an example.disable
- true to disable, false to enablepublic El disableTextSelection(boolean disable)
Component
source for an
example.disable
- true to disable, false to enablepublic El down(String selector)
selector
- the CSS selectorpublic El enable()
public El enableDisplayMode(String display)
display
- what to set display to when visiblepublic El fadeIn(com.extjs.gxt.ui.client.fx.FxConfig config)
config
- the fx configpublic El fadeOut(com.extjs.gxt.ui.client.fx.FxConfig config)
config
- the fx configpublic El fadeToggle(com.extjs.gxt.ui.client.fx.FxConfig config)
config
- the fx configpublic El findParent(String selector, int maxDepth)
selector
- the simple selector to testpublic com.google.gwt.user.client.Element findParentElement(String selector, int maxDepth)
selector
- the simple selector to testmaxDepth
- the max depthpublic El firstChild()
public El focus()
public com.extjs.gxt.ui.client.util.Point getAlignToXY(com.google.gwt.user.client.Element elem, String p, int ox, int oy)
public com.extjs.gxt.ui.client.util.Point getAlignToXY(com.google.gwt.user.client.Element align, String pos, int[] offsets)
alignTo(com.google.gwt.user.client.Element, java.lang.String, int[])
for more info on the supported position values.align
- the element to align topos
- the position to align tooffsets
- the offsets or null
public com.extjs.gxt.ui.client.util.Point getAnchorXY(String anchor, boolean local)
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 coordinatespublic int getBorderWidth(String sides)
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.public int getBottom(boolean local)
local
- public com.extjs.gxt.ui.client.util.Rectangle getBounds()
public com.extjs.gxt.ui.client.util.Rectangle getBounds(boolean local)
local
- if true the element's left and top are returned instead of
page coordinatespublic com.extjs.gxt.ui.client.util.Rectangle getBounds(boolean local, boolean adjust)
local
- if true the element's left and top are returned instead of
page coordinatesadjust
- if true sizes get adjustedpublic El getChild(int index)
index
- the child indexpublic com.google.gwt.user.client.Element getChildElement(int index)
index
- the child indexpublic int getChildIndex(com.google.gwt.user.client.Element child)
public int getClientHeight()
public int getClientWidth()
public int getComputedHeight()
public int getComputedWidth()
public com.extjs.gxt.ui.client.util.Size getFrameSize()
public int getFrameWidth(String sides)
sides
- sidespublic int getHeight()
public int getHeight(boolean content)
content
- true to get the height minus borders and paddingpublic String getId()
public String getInnerHtml()
public int getIntStyleAttribute(String attr)
attr
- the attribute namepublic com.extjs.gxt.ui.client.util.Rectangle getLayoutBounds()
public int getLeft()
public int getLeft(boolean local)
local
- true to get the local css position instead of page coordinatepublic int getMargins(String sides)
sides
- any combination of l, r, t, b to get the sum of those sidespublic com.extjs.gxt.ui.client.util.Point getOffsetsTo(com.google.gwt.user.client.Element to)
to
- the to elementpublic String getOuterHtml()
public int getPadding(String sides)
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.public El getParent()
public com.extjs.gxt.ui.client.util.Region getRegion()
public int getRight(boolean local)
local
- true
to get the local css position instead of
page coordinatepublic com.extjs.gxt.ui.client.util.Scroll getScroll()
public int getScrollLeft()
public int getScrollTop()
public com.extjs.gxt.ui.client.util.Size getSize()
public com.extjs.gxt.ui.client.util.Size getSize(boolean content)
content
- true to get the size minus borders and paddingpublic com.extjs.gxt.ui.client.core.FastMap<String> getStyleAttribute(List<String> attr)
public String getStyleAttribute(String attr)
attr
- the style attribute whose value is returned.public int getStyleHeight()
public String getStyleName()
public com.extjs.gxt.ui.client.util.Size getStyleSize()
public com.extjs.gxt.ui.client.util.Size getStyleSize(boolean contentOnly)
public int getStyleWidth()
public com.google.gwt.user.client.Element getSubChild(int depth)
depth
- the child node depthpublic int getTextWidth()
public int getTop()
public int getTop(boolean local)
local
- true to get the local css position instead of page coordinatepublic String getValue()
public int getWidth()
public int getWidth(boolean content)
content
- true to get the width minus borders and paddingpublic int getX()
public com.extjs.gxt.ui.client.util.Point getXY()
public int getY()
public int getZIndex()
public boolean hasStyleName(String style)
style
- the style namepublic El hide()
public El insertBefore(com.google.gwt.user.client.Element before)
before
- the element to insert beforepublic El insertBefore(com.google.gwt.user.client.Element child, com.google.gwt.user.client.Element before)
child
- the element to insertbefore
- the element the child will be inserted beforepublic El insertBefore(com.google.gwt.user.client.Element[] elements, com.google.gwt.user.client.Element before)
elements
- the elements to insertbefore
- the element the children will be inserted beforepublic El insertChild(com.google.gwt.user.client.Element child, int index)
child
- the child elementindex
- the insert locationpublic El insertChild(com.google.gwt.user.client.Element[] children, int index)
children
- the children to addindex
- the insert locationpublic El insertFirst(com.google.gwt.user.client.Element element)
element
- the child elementpublic El insertFirst(com.google.gwt.user.client.Element[] elems)
elems
- the child elementspublic El insertFirst(String html)
html
- the HTML fragmentpublic El insertHtml(String where, String html)
where
- where to insert the html in relation to el - beforeBegin,
afterBegin, beforeEnd, afterEnd.html
- the HTML fragmentpublic El insertInto(com.google.gwt.user.client.Element parent)
parent
- the parent elementpublic El insertInto(com.google.gwt.user.client.Element parent, int index)
parent
- the parent elementindex
- the insert indexpublic El insertLast(com.google.gwt.user.client.Element child)
child
- the element to insertpublic com.google.gwt.user.client.Element insertSibling(com.google.gwt.user.client.Element elem, String where)
elem
- the element to insertwhere
- 'before' or 'after'public El insertSibling(com.google.gwt.user.client.Element[] elems, String where)
elems
- the elements to insertwhere
- where 'before' or 'after'public boolean is(String selector)
selector
- selectorpublic boolean isBorderBox()
public boolean isConnected()
public boolean isMasked()
public boolean isOrHasChild(com.google.gwt.user.client.Element child)
child
- the child elementpublic boolean isScrollable()
public boolean isScrollableX()
public boolean isScrollableY()
public boolean isVisibility()
true
if the element is visible using the css
'visibiliy' attribute.public boolean isVisible()
public boolean isVisible(boolean deep)
deep
- true to deep testpublic El lastChild()
public com.google.gwt.http.client.Request load(com.google.gwt.http.client.RequestBuilder builder)
This method is subject to change.
builder
- the request builderpublic El makePositionable()
public El makePositionable(boolean absolute)
absolute
- true
to position absolutelypublic El mask()
public El mask(String message)
message
- a message to display in the maskpublic El mask(String message, String messageStyleName)
message
- a message to display in the maskmessageStyleName
- a CSS style name to be applied to the message textpublic com.google.gwt.user.client.Element nextSibling()
public com.google.gwt.user.client.Element previousSibling()
public El remove()
public El removeChild(com.google.gwt.user.client.Element child)
child
- the child to removepublic El removeChildren()
public El removeFromParent()
public El removeStyleName(String... styleNames)
styleNames
- the style namespublic El removeStyleName(String styleName)
styleName
- the style names to removepublic El repaint()
public El replaceStyleName(String oldStyle, String newStyle)
oldStyle
- the style to replacenewStyle
- the new stylepublic El scrollIntoView(com.google.gwt.user.client.Element container, boolean hscroll)
public El scrollIntoView(com.google.gwt.user.client.Element container, boolean hscroll, int[] offsets)
container
- the container elementhscroll
- false
to disable horizontal scrolling.public El scrollTo(String side, int value)
side
- either "left" for scrollLeft values or "top" for scrollTop
values.value
- the new scroll valuepublic El scrollTo(String side, int value, com.extjs.gxt.ui.client.fx.FxConfig config)
side
- side either "left" for scrollLeft values or "top" for scrollTop
values.value
- the new scroll valueconfig
- the fx configpublic com.google.gwt.dom.client.NodeList<com.google.gwt.user.client.Element> select(String selector)
selector
- the selector/xpath querypublic El selectNode(String selector)
selector
- the CSS selectorpublic El setBorders(boolean show)
show
- the show statepublic El setBounds(int x, int y, int width, int height)
x
- the x coordinatey
- the y coordinatewidth
- the new widthheight
- the new heightpublic El setBounds(int x, int y, int width, int height, boolean adjust)
x
- the x coordinatey
- the y coordinatewidth
- the new widthheight
- the new heightadjust
- true to adjust for box model issuespublic El setBounds(com.extjs.gxt.ui.client.util.Rectangle bounds)
bounds
- the new boundspublic El setBounds(com.extjs.gxt.ui.client.util.Rectangle bounds, boolean content)
bounds
- the new boundscontent
- true
to adjust for box model issuespublic El setDisplayed(boolean display)
display
- true to display the element using its default displaypublic El setDisplayed(String display)
display
- the display valuepublic El setElementAttribute(String attr, boolean value)
attr
- the attribute namevalue
- the valuepublic El setElementAttribute(String attr, int value)
attr
- the attribute namevalue
- the valuepublic El setElementAttribute(String attr, String value)
attr
- the attribute namevalue
- the valuepublic void setEnabled(boolean enabled)
enabled
- the enabled statepublic El setFocus(boolean focus)
focus
- the new focus statepublic El setHeight(int height)
height
- the heightpublic El setHeight(int height, boolean adjust)
height
- the heightadjust
- true
to adjust for box model issuespublic El setHeight(String height)
height
- the heightpublic El setIconStyle(String style)
style
- the style are image pathpublic El setInnerHtml(String html)
html
- the new HTMLpublic El setIntElementProperty(String property, int value)
property
- the property namevalue
- the valuepublic El setLeft(int left)
setX(int)
).left
- the left valuepublic El setLeftTop(int left, int top)
left
- the left valuetop
- the top valuepublic El setMargins(com.extjs.gxt.ui.client.util.Margins margin)
margin
- the marginpublic El setPadding(com.extjs.gxt.ui.client.util.Padding padding)
padding
- the paddingpublic El setPagePosition(int x, int y)
x
- the x coordinatey
- the y coordinatepublic El setScrollLeft(int left)
left
- the left valuepublic El setScrollTop(int top)
top
- the top valuepublic El setSize(int width, int height)
width
- the new widthheight
- the new heightpublic El setSize(int width, int height, boolean adjust)
width
- the new widthheight
- the new heightadjust
- true
to adjust for box model issuespublic El setSize(com.extjs.gxt.ui.client.util.Size size)
size
- the sizepublic El setSize(String width, String height)
width
- the new sizeheight
- the new heightpublic El setStyleAttribute(String attr, Object value)
attr
- the attribute namevalue
- the int valuepublic El setStyleName(String style)
style
- the style namepublic El setStyleName(String style, boolean add)
style
- the style nameadd
- true to add, false to removepublic El setStyleSize(int width, int height)
width
- the widthheight
- the heightpublic El setTabIndex(int index)
index
- the tab indexpublic El setTitle(String title)
title
- the new titlepublic El setTop(int top)
setY(int)
).top
- the top valuepublic El setValue(String value)
value
- the valuepublic El setVisibility(boolean visible)
visible
- true
to show, false
to hidepublic El setVisibilityMode(El.VisMode visMode)
visMode
- value {link VisMode#VISIBILITY}} or El.VisMode.DISPLAY
public El setVisible(boolean visible)
visible
- whether the element is visiblepublic El setWidth(int width)
width
- the new widthpublic El setWidth(int width, boolean adjust)
width
- the new widthadjust
- true
to adjust for box model issuespublic El setWidth(String width)
width
- the new widthpublic El setX(int x)
x
- the x coordinatepublic El setXY(int x, int y)
x
- the x coordinatey
- the y coordinatepublic El setXY(int x, int y, com.extjs.gxt.ui.client.fx.FxConfig config)
x
- the x coordinatey
- the y coordinatepublic El setXY(com.extjs.gxt.ui.client.util.Point p)
p
- the positionpublic El setY(int y)
y
- the y coordinatepublic El setZIndex(int zIndex)
zIndex
- the z-index valuepublic El show()
public El slideIn(com.extjs.gxt.ui.client.Style.Direction direction, com.extjs.gxt.ui.client.fx.FxConfig config)
direction
- the directionconfig
- the fx configpublic El slideOut(com.extjs.gxt.ui.client.Style.Direction direction, com.extjs.gxt.ui.client.fx.FxConfig config)
direction
- the directionconfig
- the fx configpublic El subChild(int depth)
depth
- the child node depthpublic El sync(boolean show)
show
- true to showpublic com.extjs.gxt.ui.client.util.Point translatePoints(com.extjs.gxt.ui.client.util.Point p)
public El unclip()
public El unmask()
public El unwrap(com.google.gwt.user.client.Element child, com.extjs.gxt.ui.client.util.Rectangle bounds)
bounds
- the original boundspublic El update(String html)
html
- the htmlpublic El updateZIndex(int adj)
XDOM.getTopZIndex()
to ensure it
has the highest values.adj
- the adjustment to be applied to the z-index valuepublic com.extjs.gxt.ui.client.util.Rectangle wrap(com.google.gwt.user.client.Element wrapper)
wrapper
- the wrapper elementprotected com.extjs.gxt.ui.client.util.Point getConstrainToXY(com.google.gwt.user.client.Element elem, com.extjs.gxt.ui.client.util.Point proposedXY)
public static String getClassName(com.google.gwt.user.client.Element dom)
Copyright © 2018. All Rights Reserved.