com.google.gwt.widgetideas.client.overrides
Class DOMHelper

java.lang.Object
  extended by com.google.gwt.widgetideas.client.overrides.DOMHelper

public class DOMHelper
extends java.lang.Object

Useful DOM methods not included in Window or DOM.


Field Summary
static int OTHER_KEY_DOWN
           
static int OTHER_KEY_LEFT
           
static int OTHER_KEY_RIGHT
           
static int OTHER_KEY_UP
           
 
Constructor Summary
DOMHelper()
           
 
Method Summary
static com.google.gwt.user.client.Element clone(com.google.gwt.user.client.Element elem, boolean deep)
          Clones a DOM element.
static boolean confirm(java.lang.String msg)
          Displays a message in a modal dialog box.
static com.google.gwt.user.client.Element getRecursiveFirstChild(com.google.gwt.user.client.Element elem, int index)
           
static boolean isArrowKey(int code)
           
static com.google.gwt.user.client.Element rawFirstChild(com.google.gwt.user.client.Element elem)
          Gets the first child.
static int standardizeKeycode(int code)
          Normalized key codes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OTHER_KEY_UP

public static final int OTHER_KEY_UP
See Also:
Constant Field Values

OTHER_KEY_DOWN

public static final int OTHER_KEY_DOWN
See Also:
Constant Field Values

OTHER_KEY_LEFT

public static final int OTHER_KEY_LEFT
See Also:
Constant Field Values

OTHER_KEY_RIGHT

public static final int OTHER_KEY_RIGHT
See Also:
Constant Field Values
Constructor Detail

DOMHelper

public DOMHelper()
Method Detail

clone

public static com.google.gwt.user.client.Element clone(com.google.gwt.user.client.Element elem,
                                                       boolean deep)
Clones a DOM element.


confirm

public static boolean confirm(java.lang.String msg)
Displays a message in a modal dialog box. Should eventually be moved to Window.

Parameters:
msg - the message to be displayed.

getRecursiveFirstChild

public static com.google.gwt.user.client.Element getRecursiveFirstChild(com.google.gwt.user.client.Element elem,
                                                                        int index)

isArrowKey

public static boolean isArrowKey(int code)

rawFirstChild

public static com.google.gwt.user.client.Element rawFirstChild(com.google.gwt.user.client.Element elem)
Gets the first child. You must *KNOW* that the first child exists and is an element to use this method safely.


standardizeKeycode

public static int standardizeKeycode(int code)
Normalized key codes. Also switches KEY_RIGHT and KEY_LEFT in RTL languages.