com.extjs.gxt.ui.client
Class XDOM

java.lang.Object
  extended by com.extjs.gxt.ui.client.XDOM

public final class XDOM
extends java.lang.Object

Provides additional static methods that allow you to manipulate the browser's Document Object Model (DOM).

See Also:
DOM

Field Summary
static boolean isVisibleBox
          Returns true if the browser uses a visible box.
 
Method Summary
static com.google.gwt.user.client.Element create(java.lang.String html)
          Creates an element form the given markup.
static com.google.gwt.user.client.Element getBody()
          Returns the body element.
static El getBodyEl()
          Returns the body El.
static int getBodyScrollLeft()
          Returns the body elements horizontal scroll.
static int getBodyScrollTop()
          Return the body elements vertical scroll.
static Rectangle getBounds(com.google.gwt.user.client.Element elem, boolean content)
          Returns the element's bounds.
static com.google.gwt.user.client.Element getDocument()
          Returns the document element.
static com.google.gwt.user.client.Element getElementById(java.lang.String id)
          Returns the element with the unique id.
static com.google.gwt.user.client.Element getHead()
          Returns the HTML head element.
static int getScrollBarWidth()
          Returns the width of the scroll bar.
static int getTopZIndex()
          Increments and returns the top z-index value.
static java.lang.String getUniqueId()
          Returns an unique id.
static Size getViewportSize()
          Returns the viewports size.
static void insertAfter(com.google.gwt.user.client.Element elem, com.google.gwt.user.client.Element after)
          Inserts this element after the passed element in the DOM.
static void reload()
          Reloads the page.
static void setStyleName(com.google.gwt.user.client.Element elem, java.lang.String style)
          Sets the element's style name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isVisibleBox

public static boolean isVisibleBox
Returns true if the browser uses a visible box.

Method Detail

create

public static com.google.gwt.user.client.Element create(java.lang.String html)
Creates an element form the given markup.

Parameters:
html - the markup
Returns:
the new element

getBody

public static com.google.gwt.user.client.Element getBody()
Returns the body element.

Returns:
the body

getBodyEl

public static El getBodyEl()
Returns the body El.

Returns:
the body

reload

public static void reload()
Reloads the page.


getBodyScrollLeft

public static int getBodyScrollLeft()
Returns the body elements horizontal scroll.

Returns:
the scroll amount in pixels

getBodyScrollTop

public static int getBodyScrollTop()
Return the body elements vertical scroll.

Returns:
the scroll amount in pixels

getBounds

public static Rectangle getBounds(com.google.gwt.user.client.Element elem,
                                  boolean content)
Returns the element's bounds.

Parameters:
elem - the element
content - true to adjust for box model issues
Returns:
the elements bounds

getDocument

public static com.google.gwt.user.client.Element getDocument()
Returns the document element.

Returns:
the docuemnt

getElementById

public static com.google.gwt.user.client.Element getElementById(java.lang.String id)
Returns the element with the unique id.

Parameters:
id - the id
Returns:
the element, or null if no match

getHead

public static com.google.gwt.user.client.Element getHead()
Returns the HTML head element.

Returns:
the head

getScrollBarWidth

public static int getScrollBarWidth()
Returns the width of the scroll bar.

Returns:
the scroll bar width

getTopZIndex

public static int getTopZIndex()
Increments and returns the top z-index value.

Returns:
the z-index

getUniqueId

public static java.lang.String getUniqueId()
Returns an unique id.

Returns:
the id

getViewportSize

public static Size getViewportSize()
Returns the viewports size.

Returns:
the size

insertAfter

public static void insertAfter(com.google.gwt.user.client.Element elem,
                               com.google.gwt.user.client.Element after)
Inserts this element after the passed element in the DOM.

Parameters:
elem - the element
after - the element to insert after

setStyleName

public static void setStyleName(com.google.gwt.user.client.Element elem,
                                java.lang.String style)
Sets the element's style name.

Parameters:
elem - the element
style - the style name