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

java.lang.Object
  extended by com.extjs.gxt.ui.client.core.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

Method Summary
static com.google.gwt.user.client.Element create(java.lang.String html)
          Creates an element form the given markup.
static java.lang.String getAutoIdPrefix()
          Returns the auto id prefix.
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 java.lang.String getComputedStyle(com.google.gwt.user.client.Element e, java.lang.String style)
          Returns the element's computed style.
static com.google.gwt.user.client.Element getDocument()
          Returns the document element.
static int getDocumentHeight()
          Returns the document's height.
static int getDocumentWidth()
          Returns the document width.
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 int getTopZIndex(int i)
          Increments and returns the top z-index value.
static java.lang.String getUniqueId()
          Returns an unique id.
static int getViewHeight(boolean full)
          Returns the view height.
static int getViewportHeight()
          Returns the viewport height.
static Size getViewportSize()
          Returns the viewports size.
static int getViewportWidth()
          Returns the viewport width.
static int getViewWidth(boolean full)
          Returns the view width.
static void reload()
          Reloads the page.
static void setAutoIdPrefix(java.lang.String autoIdPrefix)
          Sets the auto id prefix which is prepended to the auto id counter when generating auto ids (defaults to 'x-auto').
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

getAutoIdPrefix

public static java.lang.String getAutoIdPrefix()
Returns the auto id prefix.

Returns:
the auto id prefix

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

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

getComputedStyle

public static java.lang.String getComputedStyle(com.google.gwt.user.client.Element e,
                                                java.lang.String style)
Returns the element's computed style.

Parameters:
e - the element
style - the style name
Returns:
the style value

getDocument

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

Returns:
the document

getDocumentHeight

public static int getDocumentHeight()
Returns the document's height.

Returns:
the document height

getDocumentWidth

public static int getDocumentWidth()
Returns the document width.

Returns:
the document width

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. Use this value to ensure the z-index is the highest value of all elements in the DOM.

Returns:
the z-index

getTopZIndex

public static int getTopZIndex(int i)
Increments and returns the top z-index value. Use this value to ensure the z-index is the highest value of all elements in the DOM.

Parameters:
i - the increment amount
Returns:
the z-index

getUniqueId

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

Returns:
the id

getViewHeight

public static int getViewHeight(boolean full)
Returns the view height.

Parameters:
full - true to return the document height, false for viewport height
Returns:
the view height

getViewportHeight

public static int getViewportHeight()
Returns the viewport height.

Returns:
the viewport height

getViewportSize

public static Size getViewportSize()
Returns the viewports size.

Returns:
the viewport size

getViewportWidth

public static int getViewportWidth()
Returns the viewport width.

Returns:
the viewport width

getViewWidth

public static int getViewWidth(boolean full)
Returns the view width.

Parameters:
full - true to return the document width, false for viewport width
Returns:
the view width

reload

public static void reload()
Reloads the page.


setAutoIdPrefix

public static void setAutoIdPrefix(java.lang.String autoIdPrefix)
Sets the auto id prefix which is prepended to the auto id counter when generating auto ids (defaults to 'x-auto').

Parameters:
autoIdPrefix - the auto id prefix