Checkstyle fixes.


git-svn-id: https://google-web-toolkit.googlecode.com/svn/releases/1.6@4585 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/dom/client/DOMImpl.java b/user/src/com/google/gwt/dom/client/DOMImpl.java
index 6763044..864a1f3 100644
--- a/user/src/com/google/gwt/dom/client/DOMImpl.java
+++ b/user/src/com/google/gwt/dom/client/DOMImpl.java
@@ -25,6 +25,9 @@
     return $doc.createElement(tag);
   }-*/;
 
+  public abstract NativeEvent createHtmlEvent(Document doc, String type, boolean canBubble,
+      boolean cancelable);
+
   public native InputElement createInputElement(String type) /*-{
     var e = $doc.createElement("INPUT");
     e.type = type;
@@ -33,6 +36,15 @@
 
   public abstract InputElement createInputRadioElement(String name);
 
+  public abstract NativeEvent createKeyEvent(Document doc, String type,
+      boolean canBubble, boolean cancelable, boolean ctrlKey, boolean altKey,
+      boolean shiftKey, boolean metaKey, int keyCode, int charCode);
+
+  public abstract NativeEvent createMouseEvent(Document doc, String type,
+      boolean canBubble, boolean cancelable, int detail, int screenX,
+      int screenY, int clientX, int clientY, boolean ctrlKey, boolean altKey,
+      boolean shiftKey, boolean metaKey, int button, Element relatedTarget);
+
   public ScriptElement createScriptElement(String source) {
     ScriptElement elem = (ScriptElement) createElement("script");
     elem.setText(source);
@@ -47,6 +59,8 @@
     return select;
   }
 
+  public abstract void dispatchEvent(Element target, NativeEvent evt);
+
   public native boolean eventGetAltKey(NativeEvent evt) /*-{
     return !!evt.altKey;
   }-*/;
@@ -275,18 +289,4 @@
   public native String toString(Element elem) /*-{
     return elem.outerHTML;
   }-*/;
-
-  public abstract NativeEvent createHtmlEvent(Document doc, String type, boolean canBubble,
-      boolean cancelable);
-
-  public abstract NativeEvent createKeyEvent(Document doc, String type,
-      boolean canBubble, boolean cancelable, boolean ctrlKey, boolean altKey,
-      boolean shiftKey, boolean metaKey, int keyCode, int charCode);
-
-  public abstract NativeEvent createMouseEvent(Document doc, String type,
-      boolean canBubble, boolean cancelable, int detail, int screenX,
-      int screenY, int clientX, int clientY, boolean ctrlKey, boolean altKey,
-      boolean shiftKey, boolean metaKey, int button, Element relatedTarget);
-
-  public abstract void dispatchEvent(Element target, NativeEvent evt);
 }
diff --git a/user/src/com/google/gwt/dom/client/DOMImplIE6.java b/user/src/com/google/gwt/dom/client/DOMImplIE6.java
index ff7045b..3f062bc 100644
--- a/user/src/com/google/gwt/dom/client/DOMImplIE6.java
+++ b/user/src/com/google/gwt/dom/client/DOMImplIE6.java
@@ -107,8 +107,8 @@
 
   @Override
   public native Element eventGetRelatedTarget(NativeEvent evt) /*-{
-  	// Prefer 'relatedTarget' if it's set (see createMouseEvent(), which
-  	// explicitly sets relatedTarget when synthesizing mouse events).
+    // Prefer 'relatedTarget' if it's set (see createMouseEvent(), which
+    // explicitly sets relatedTarget when synthesizing mouse events).
     return evt.relatedTarget ||
            (evt.type == "mouseout" ? evt.toElement:evt.fromElement);
   }-*/;
diff --git a/user/src/com/google/gwt/dom/client/DOMImplSafari.java b/user/src/com/google/gwt/dom/client/DOMImplSafari.java
index f29c8bd..34c50dd 100644
--- a/user/src/com/google/gwt/dom/client/DOMImplSafari.java
+++ b/user/src/com/google/gwt/dom/client/DOMImplSafari.java
@@ -20,16 +20,6 @@
  */
 class DOMImplSafari extends DOMImplStandard {
 
-  /**
-   * Safari 2 does not support {@link ScriptElement#setText(String)}.
-   */
-  @Override
-  public ScriptElement createScriptElement(String source) {
-    ScriptElement elem = (ScriptElement) createElement("script");
-    elem.setInnerText(source);
-    return elem;
-  }
-
   @Override
   public native NativeEvent createKeyEvent(Document doc, String type, boolean canBubble,
       boolean cancelable, boolean ctrlKey, boolean altKey, boolean shiftKey,
@@ -47,6 +37,16 @@
     return evt;
   }-*/;
 
+  /**
+   * Safari 2 does not support {@link ScriptElement#setText(String)}.
+   */
+  @Override
+  public ScriptElement createScriptElement(String source) {
+    ScriptElement elem = (ScriptElement) createElement("script");
+    elem.setInnerText(source);
+    return elem;
+  }
+
   @Override
   public native int eventGetClientX(NativeEvent evt) /*-{
     // In Safari2: clientX is wrong and pageX is returned instead.
diff --git a/user/src/com/google/gwt/dom/client/Document.java b/user/src/com/google/gwt/dom/client/Document.java
index 3920d0e..b19540e 100644
--- a/user/src/com/google/gwt/dom/client/Document.java
+++ b/user/src/com/google/gwt/dom/client/Document.java
@@ -72,6 +72,13 @@
   }
 
   /**
+   * Creates a 'blur' event.
+   */
+  public final NativeEvent createBlurEvent() {
+    return createHtmlEvent("blur", false, false);
+  }
+
+  /**
    * Creates a <br> element.
    * 
    * @return the newly created element
@@ -99,6 +106,13 @@
   }
 
   /**
+   * Creates a 'change' event.
+   */
+  public final NativeEvent createChangeEvent() {
+    return createHtmlEvent("change", false, true);
+  }
+
+  /**
    * Creates an <input type='checkbox'> element.
    * 
    * @return the newly created element
@@ -108,6 +122,35 @@
   }
 
   /**
+   * Creates a 'click' event.
+   * 
+   * <p>
+   * Note that this method does not allow the event's 'button' field to be
+   * specified, because not all browsers support it reliably for click events.
+   * </p>
+   * 
+   * @param detail the event's detail property
+   * @param screenX the event's screen-relative x-position
+   * @param screenY the event's screen-relative y-position
+   * @param clientX the event's client-relative x-position
+   * @param clientY the event's client-relative y-position
+   * @param ctrlKey <code>true</code> if the ctrl key is depressed
+   * @param altKey <code>true</code> if the alt key is depressed
+   * @param shiftKey <code>true</code> if the shift key is depressed
+   * @param metaKey <code>true</code> if the meta key is depressed
+   * @return the event object
+   */
+  public final NativeEvent createClickEvent(int detail, int screenX, int screenY,
+      int clientX, int clientY, boolean ctrlKey, boolean altKey,
+      boolean shiftKey, boolean metaKey) {
+    // We disallow setting the button here, because IE doesn't provide the
+    // button property for click events.
+    return createMouseEvent("click", true, true, detail, screenX, screenY,
+        clientX, clientY, ctrlKey, altKey, shiftKey, metaKey,
+        NativeEvent.BUTTON_LEFT, null);
+  }
+
+  /**
    * Creates a &lt;col&gt; element.
    * 
    * @return the newly created element
@@ -126,6 +169,52 @@
   }
 
   /**
+   * Creates a 'contextmenu' event.
+   * 
+   * Note: Contextmenu events will not dispatch properly on Firefox 2 and
+   * earlier.
+   * 
+   * @return the event object
+   */
+  public final NativeEvent createContextMenuEvent() {
+    return createHtmlEvent("contextmenu", true, true);
+  }
+
+  /**
+   * Creates a 'dblclick' event.
+   * 
+   * <p>
+   * Note that this method does not allow the event's 'button' field to be
+   * specified, because not all browsers support it reliably for click events.
+   * </p>
+   * 
+   * <p>
+   * Note that on some browsers, this may cause 'click' events to be synthesized
+   * as well.
+   * </p>
+   * 
+   * @param detail the event's detail property
+   * @param screenX the event's screen-relative x-position
+   * @param screenY the event's screen-relative y-position
+   * @param clientX the event's client-relative x-position
+   * @param clientY the event's client-relative y-position
+   * @param ctrlKey <code>true</code> if the ctrl key is depressed
+   * @param altKey <code>true</code> if the alt key is depressed
+   * @param shiftKey <code>true</code> if the shift key is depressed
+   * @param metaKey <code>true</code> if the meta key is depressed
+   * @return the event object
+   */
+  public final NativeEvent createDblClickEvent(int detail, int screenX, int screenY,
+      int clientX, int clientY, boolean ctrlKey, boolean altKey,
+      boolean shiftKey, boolean metaKey) {
+    // We disallow setting the button here, because IE doesn't provide the
+    // button property for click events.
+    return createMouseEvent("dblclick", true, true, detail, screenX, screenY,
+        clientX, clientY, ctrlKey, altKey, shiftKey, metaKey,
+        NativeEvent.BUTTON_LEFT, null);
+  }
+
+  /**
    * Creates a &lt;del&gt; element.
    * 
    * @return the newly created element
@@ -163,6 +252,15 @@
   }
 
   /**
+   * Creates an 'error' event.
+   * 
+   * @return the event object
+   */
+  public final NativeEvent createErrorEvent() {
+    return createHtmlEvent("error", false, false);
+  }
+
+  /**
    * Creates a &lt;fieldset&gt; element.
    * 
    * @return the newly created element
@@ -181,6 +279,15 @@
   }
 
   /**
+   * Creates a 'focus' event.
+   * 
+   * @return the event object
+   */
+  public final NativeEvent createFocusEvent() {
+    return createHtmlEvent("focus", false, false);
+  }
+
+  /**
    * Creates a &lt;form&gt; element.
    * 
    * @return the newly created element
@@ -246,6 +353,31 @@
   }
 
   /**
+   * Creates an event.
+   * 
+   * <p>
+   * While this method may be used to create events directly, it is generally
+   * preferable to use existing helper methods such as
+   * {@link #createFocusEvent()}.
+   * </p>
+   * 
+   * <p>
+   * Also, note that on Internet Explorer the 'canBubble' and 'cancelable'
+   * arguments will be ignored (the event's behavior is inferred by the browser
+   * based upon its type).
+   * </p>
+   * 
+   * @param type the type of event (e.g., "focus", "load", etc)
+   * @param canBubble <code>true</code> if the event should bubble
+   * @param cancelable <code>true</code> if the event should be cancelable
+   * @return the event object
+   */
+  public final NativeEvent createHtmlEvent(String type, boolean canBubble,
+      boolean cancelable) {
+    return DOMImpl.impl.createHtmlEvent(this, type, canBubble, cancelable);
+  }
+
+  /**
    * Creates an &lt;iframe&gt; element.
    * 
    * @return the newly created element
@@ -282,6 +414,91 @@
   }
 
   /**
+   * Creates a 'keydown' event.
+   * 
+   * @param ctrlKey <code>true</code> if the ctrl key is depressed
+   * @param altKey <code>true</code> if the alt key is depressed
+   * @param shiftKey <code>true</code> if the shift key is depressed
+   * @param metaKey <code>true</code> if the meta key is depressed
+   * @param keyCode the key-code to be set on the event
+   * @param charCode the char-code to be set on the event
+   * @return the event object
+   */
+  public final NativeEvent createKeyDownEvent(boolean ctrlKey, boolean altKey,
+      boolean shiftKey, boolean metaKey, int keyCode, int charCode) {
+    return createKeyEvent("keydown", true, true, ctrlKey, altKey, shiftKey,
+        metaKey, keyCode, charCode);
+  }
+
+  /**
+   * Creates a key event.
+   * 
+   * <p>
+   * While this method may be used to create events directly, it is generally
+   * preferable to use existing helper methods such as
+   * {@link #createKeyPressEvent(boolean, boolean, boolean, boolean, int, int)}
+   * .
+   * </p>
+   * 
+   * <p>
+   * Also, note that on Internet Explorer the 'canBubble' and 'cancelable'
+   * arguments will be ignored (the event's behavior is inferred by the browser
+   * based upon its type).
+   * </p>
+   * 
+   * @param type the type of event (e.g., "focus", "load", etc)
+   * @param canBubble <code>true</code> if the event should bubble
+   * @param cancelable <code>true</code> if the event should be cancelable
+   * @param ctrlKey <code>true</code> if the ctrl key is depressed
+   * @param altKey <code>true</code> if the alt key is depressed
+   * @param shiftKey <code>true</code> if the shift key is depressed
+   * @param metaKey <code>true</code> if the meta key is depressed
+   * @param keyCode the key-code to be set on the event
+   * @param charCode the char-code to be set on the event
+   * @return the event object
+   */
+  public final NativeEvent createKeyEvent(String type, boolean canBubble,
+      boolean cancelable, boolean ctrlKey, boolean altKey, boolean shiftKey,
+      boolean metaKey, int keyCode, int charCode) {
+    return DOMImpl.impl.createKeyEvent(this, type, canBubble, cancelable,
+        ctrlKey, altKey, shiftKey, metaKey, keyCode, charCode);
+  }
+
+  /**
+   * Creates a 'keypress' event.
+   * 
+   * @param ctrlKey <code>true</code> if the ctrl key is depressed
+   * @param altKey <code>true</code> if the alt key is depressed
+   * @param shiftKey <code>true</code> if the shift key is depressed
+   * @param metaKey <code>true</code> if the meta key is depressed
+   * @param keyCode the key-code to be set on the event
+   * @param charCode the char-code to be set on the event
+   * @return the event object
+   */
+  public final NativeEvent createKeyPressEvent(boolean ctrlKey, boolean altKey,
+      boolean shiftKey, boolean metaKey, int keyCode, int charCode) {
+    return createKeyEvent("keypress", true, true, ctrlKey, altKey, shiftKey,
+        metaKey, keyCode, charCode);
+  }
+
+  /**
+   * Creates a 'keyup' event.
+   * 
+   * @param ctrlKey <code>true</code> if the ctrl key is depressed
+   * @param altKey <code>true</code> if the alt key is depressed
+   * @param shiftKey <code>true</code> if the shift key is depressed
+   * @param metaKey <code>true</code> if the meta key is depressed
+   * @param keyCode the key-code to be set on the event
+   * @param charCode the char-code to be set on the event
+   * @return the event object
+   */
+  public final NativeEvent createKeyUpEvent(boolean ctrlKey, boolean altKey,
+      boolean shiftKey, boolean metaKey, int keyCode, int charCode) {
+    return createKeyEvent("keyup", true, true, ctrlKey, altKey, shiftKey,
+        metaKey, keyCode, charCode);
+  }
+
+  /**
    * Creates a &lt;label&gt; element.
    * 
    * @return the newly created element
@@ -318,6 +535,15 @@
   }
 
   /**
+   * Creates a 'load' event.
+   * 
+   * @return the event object
+   */
+  public final NativeEvent createLoadEvent() {
+    return createHtmlEvent("load", false, false);
+  }
+
+  /**
    * Creates a &lt;map&gt; element.
    * 
    * @return the newly created element
@@ -336,6 +562,174 @@
   }
 
   /**
+   * Creates a 'mousedown' event.
+   * 
+   * @param detail the event's detail property
+   * @param screenX the event's screen-relative x-position
+   * @param screenY the event's screen-relative y-position
+   * @param clientX the event's client-relative x-position
+   * @param clientY the event's client-relative y-position
+   * @param ctrlKey <code>true</code> if the ctrl key is depressed
+   * @param altKey <code>true</code> if the alt key is depressed
+   * @param shiftKey <code>true</code> if the shift key is depressed
+   * @param metaKey <code>true</code> if the meta key is depressed
+   * @param button the event's button property (values from
+   *          {@link Event#BUTTON_LEFT} et al)
+   * @return the event object
+   */
+  public final NativeEvent createMouseDownEvent(int detail, int screenX, int screenY,
+      int clientX, int clientY, boolean ctrlKey, boolean altKey,
+      boolean shiftKey, boolean metaKey, int button) {
+    return createMouseEvent("mousedown", true, true, detail, screenX, screenY,
+        clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, null);
+  }
+
+  /**
+   * Creates an mouse event.
+   * 
+   * <p>
+   * While this method may be used to create events directly, it is generally
+   * preferable to use existing helper methods such as
+   * {@link #createClickEvent(int, int, int, int, int, boolean, boolean, boolean, boolean)}
+   * .
+   * </p>
+   * 
+   * <p>
+   * Also, note that on Internet Explorer the 'canBubble' and 'cancelable'
+   * arguments will be ignored (the event's behavior is inferred by the browser
+   * based upon its type).
+   * </p>
+   * 
+   * @param type the type of event (e.g., "focus", "load", etc)
+   * @param canBubble <code>true</code> if the event should bubble
+   * @param cancelable <code>true</code> if the event should be cancelable
+   * @param detail the event's detail property
+   * @param screenX the event's screen-relative x-position
+   * @param screenY the event's screen-relative y-position
+   * @param clientX the event's client-relative x-position
+   * @param clientY the event's client-relative y-position
+   * @param ctrlKey <code>true</code> if the ctrl key is depressed
+   * @param altKey <code>true</code> if the alt key is depressed
+   * @param shiftKey <code>true</code> if the shift key is depressed
+   * @param metaKey <code>true</code> if the meta key is depressed
+   * @param button the event's button property (values from
+   *          {@link Event#BUTTON_LEFT} et al)
+   * @param relatedTarget the event's related target (only relevant for
+   *          mouseover and mouseout events)
+   * @return the event object
+   */
+  public final NativeEvent createMouseEvent(String type, boolean canBubble,
+      boolean cancelable, int detail, int screenX, int screenY, int clientX,
+      int clientY, boolean ctrlKey, boolean altKey, boolean shiftKey,
+      boolean metaKey, int button, Element relatedTarget) {
+    return DOMImpl.impl.createMouseEvent(this, type, canBubble, cancelable,
+        detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey,
+        metaKey, button, relatedTarget);
+  }
+
+  /**
+   * Creates a 'mousemove' event.
+   * 
+   * @param detail the event's detail property
+   * @param screenX the event's screen-relative x-position
+   * @param screenY the event's screen-relative y-position
+   * @param clientX the event's client-relative x-position
+   * @param clientY the event's client-relative y-position
+   * @param ctrlKey <code>true</code> if the ctrl key is depressed
+   * @param altKey <code>true</code> if the alt key is depressed
+   * @param shiftKey <code>true</code> if the shift key is depressed
+   * @param metaKey <code>true</code> if the meta key is depressed
+   * @param button the event's button property (values from
+   *          {@link Event#BUTTON_LEFT} et al)
+   * @return the event object
+   */
+  public final NativeEvent createMouseMoveEvent(int detail, int screenX, int screenY,
+      int clientX, int clientY, boolean ctrlKey, boolean altKey,
+      boolean shiftKey, boolean metaKey, int button) {
+    return createMouseEvent("mousemove", true, true, detail, screenX, screenY,
+        clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, null);
+  }
+
+  /**
+   * Creates a 'mouseout' event.
+   * 
+   * Note: The 'relatedTarget' parameter will be ignored on Firefox 2 and
+   * earlier.
+   * 
+   * @param detail the event's detail property
+   * @param screenX the event's screen-relative x-position
+   * @param screenY the event's screen-relative y-position
+   * @param clientX the event's client-relative x-position
+   * @param clientY the event's client-relative y-position
+   * @param ctrlKey <code>true</code> if the ctrl key is depressed
+   * @param altKey <code>true</code> if the alt key is depressed
+   * @param shiftKey <code>true</code> if the shift key is depressed
+   * @param metaKey <code>true</code> if the meta key is depressed
+   * @param button the event's button property (values from
+   *          {@link Event#BUTTON_LEFT} et al)
+   * @param relatedTarget the event's related target
+   * @return the event object
+   */
+  public final NativeEvent createMouseOutEvent(int detail, int screenX, int screenY,
+      int clientX, int clientY, boolean ctrlKey, boolean altKey,
+      boolean shiftKey, boolean metaKey, int button, Element relatedTarget) {
+    return createMouseEvent("mouseout", true, true, detail, screenX, screenY,
+        clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button,
+        relatedTarget);
+  }
+
+  /**
+   * Creates a 'mouseover' event.
+   * 
+   * Note: The 'relatedTarget' parameter will be ignored on Firefox 2 and
+   * earlier.
+   * 
+   * @param detail the event's detail property
+   * @param screenX the event's screen-relative x-position
+   * @param screenY the event's screen-relative y-position
+   * @param clientX the event's client-relative x-position
+   * @param clientY the event's client-relative y-position
+   * @param ctrlKey <code>true</code> if the ctrl key is depressed
+   * @param altKey <code>true</code> if the alt key is depressed
+   * @param shiftKey <code>true</code> if the shift key is depressed
+   * @param metaKey <code>true</code> if the meta key is depressed
+   * @param button the event's button property (values from
+   *          {@link Event#BUTTON_LEFT} et al)
+   * @param relatedTarget the event's related target
+   * @return the event object
+   */
+  public final NativeEvent createMouseOverEvent(int detail, int screenX, int screenY,
+      int clientX, int clientY, boolean ctrlKey, boolean altKey,
+      boolean shiftKey, boolean metaKey, int button, Element relatedTarget) {
+    return createMouseEvent("mouseover", true, true, detail, screenX, screenY,
+        clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button,
+        relatedTarget);
+  }
+
+  /**
+   * Creates a 'mouseup' event.
+   * 
+   * @param detail the event's detail property
+   * @param screenX the event's screen-relative x-position
+   * @param screenY the event's screen-relative y-position
+   * @param clientX the event's client-relative x-position
+   * @param clientY the event's client-relative y-position
+   * @param ctrlKey <code>true</code> if the ctrl key is depressed
+   * @param altKey <code>true</code> if the alt key is depressed
+   * @param shiftKey <code>true</code> if the shift key is depressed
+   * @param metaKey <code>true</code> if the meta key is depressed
+   * @param button the event's button property (values from
+   *          {@link Event#BUTTON_LEFT} et al)
+   * @return the event object
+   */
+  public final NativeEvent createMouseUpEvent(int detail, int screenX, int screenY,
+      int clientX, int clientY, boolean ctrlKey, boolean altKey,
+      boolean shiftKey, boolean metaKey, int button) {
+    return createMouseEvent("mouseup", true, true, detail, screenX, screenY,
+        clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, null);
+  }
+
+  /**
    * Creates a &lt;object&gt; element.
    * 
    * @return the newly created element
@@ -446,6 +840,18 @@
   }
 
   /**
+   * Creates a 'scroll' event.
+   * 
+   * Note: Contextmenu events will not dispatch properly on Firefox 2 and
+   * earlier.
+   * 
+   * @return the event object
+   */
+  public final NativeEvent createScrollEvent() {
+    return createHtmlEvent("scroll", false, false);
+  }
+
+  /**
    * Creates a &lt;select&gt; element.
    * 
    * @return the newly created element
@@ -760,410 +1166,4 @@
   public final native void setTitle(String title) /*-{
     this.title = title;
   }-*/;
-
-  /**
-   * Creates a 'blur' event.
-   */
-  public final NativeEvent createBlurEvent() {
-    return createHtmlEvent("blur", false, false);
-  }
-
-  /**
-   * Creates a 'change' event.
-   */
-  public final NativeEvent createChangeEvent() {
-    return createHtmlEvent("change", false, true);
-  }
-
-  /**
-   * Creates a 'click' event.
-   * 
-   * <p>
-   * Note that this method does not allow the event's 'button' field to be
-   * specified, because not all browsers support it reliably for click events.
-   * </p>
-   * 
-   * @param detail the event's detail property
-   * @param screenX the event's screen-relative x-position
-   * @param screenY the event's screen-relative y-position
-   * @param clientX the event's client-relative x-position
-   * @param clientY the event's client-relative y-position
-   * @param ctrlKey <code>true</code> if the ctrl key is depressed
-   * @param altKey <code>true</code> if the alt key is depressed
-   * @param shiftKey <code>true</code> if the shift key is depressed
-   * @param metaKey <code>true</code> if the meta key is depressed
-   * @return the event object
-   */
-  public final NativeEvent createClickEvent(int detail, int screenX, int screenY,
-      int clientX, int clientY, boolean ctrlKey, boolean altKey,
-      boolean shiftKey, boolean metaKey) {
-    // We disallow setting the button here, because IE doesn't provide the
-    // button property for click events.
-    return createMouseEvent("click", true, true, detail, screenX, screenY,
-        clientX, clientY, ctrlKey, altKey, shiftKey, metaKey,
-        NativeEvent.BUTTON_LEFT, null);
-  }
-
-  /**
-   * Creates a 'contextmenu' event.
-   * 
-   * Note: Contextmenu events will not dispatch properly on Firefox 2 and
-   * earlier.
-   * 
-   * @return the event object
-   */
-  public final NativeEvent createContextMenuEvent() {
-    return createHtmlEvent("contextmenu", true, true);
-  }
-
-  /**
-   * Creates a 'dblclick' event.
-   * 
-   * <p>
-   * Note that this method does not allow the event's 'button' field to be
-   * specified, because not all browsers support it reliably for click events.
-   * </p>
-   * 
-   * <p>
-   * Note that on some browsers, this may cause 'click' events to be synthesized
-   * as well.
-   * </p>
-   * 
-   * @param detail the event's detail property
-   * @param screenX the event's screen-relative x-position
-   * @param screenY the event's screen-relative y-position
-   * @param clientX the event's client-relative x-position
-   * @param clientY the event's client-relative y-position
-   * @param ctrlKey <code>true</code> if the ctrl key is depressed
-   * @param altKey <code>true</code> if the alt key is depressed
-   * @param shiftKey <code>true</code> if the shift key is depressed
-   * @param metaKey <code>true</code> if the meta key is depressed
-   * @return the event object
-   */
-  public final NativeEvent createDblClickEvent(int detail, int screenX, int screenY,
-      int clientX, int clientY, boolean ctrlKey, boolean altKey,
-      boolean shiftKey, boolean metaKey) {
-    // We disallow setting the button here, because IE doesn't provide the
-    // button property for click events.
-    return createMouseEvent("dblclick", true, true, detail, screenX, screenY,
-        clientX, clientY, ctrlKey, altKey, shiftKey, metaKey,
-        NativeEvent.BUTTON_LEFT, null);
-  }
-
-  /**
-   * Creates an 'error' event.
-   * 
-   * @return the event object
-   */
-  public final NativeEvent createErrorEvent() {
-    return createHtmlEvent("error", false, false);
-  }
-
-  /**
-   * Creates a 'focus' event.
-   * 
-   * @return the event object
-   */
-  public final NativeEvent createFocusEvent() {
-    return createHtmlEvent("focus", false, false);
-  }
-
-  /**
-   * Creates an event.
-   * 
-   * <p>
-   * While this method may be used to create events directly, it is generally
-   * preferable to use existing helper methods such as
-   * {@link #createFocusEvent()}.
-   * </p>
-   * 
-   * <p>
-   * Also, note that on Internet Explorer the 'canBubble' and 'cancelable'
-   * arguments will be ignored (the event's behavior is inferred by the browser
-   * based upon its type).
-   * </p>
-   * 
-   * @param type the type of event (e.g., "focus", "load", etc)
-   * @param canBubble <code>true</code> if the event should bubble
-   * @param cancelable <code>true</code> if the event should be cancelable
-   * @return the event object
-   */
-  public final NativeEvent createHtmlEvent(String type, boolean canBubble,
-      boolean cancelable) {
-    return DOMImpl.impl.createHtmlEvent(this, type, canBubble, cancelable);
-  }
-
-  /**
-   * Creates a 'keydown' event.
-   * 
-   * @param ctrlKey <code>true</code> if the ctrl key is depressed
-   * @param altKey <code>true</code> if the alt key is depressed
-   * @param shiftKey <code>true</code> if the shift key is depressed
-   * @param metaKey <code>true</code> if the meta key is depressed
-   * @param keyCode the key-code to be set on the event
-   * @param charCode the char-code to be set on the event
-   * @return the event object
-   */
-  public final NativeEvent createKeyDownEvent(boolean ctrlKey, boolean altKey,
-      boolean shiftKey, boolean metaKey, int keyCode, int charCode) {
-    return createKeyEvent("keydown", true, true, ctrlKey, altKey, shiftKey,
-        metaKey, keyCode, charCode);
-  }
-
-  /**
-   * Creates a key event.
-   * 
-   * <p>
-   * While this method may be used to create events directly, it is generally
-   * preferable to use existing helper methods such as
-   * {@link #createKeyPressEvent(boolean, boolean, boolean, boolean, int, int)}
-   * .
-   * </p>
-   * 
-   * <p>
-   * Also, note that on Internet Explorer the 'canBubble' and 'cancelable'
-   * arguments will be ignored (the event's behavior is inferred by the browser
-   * based upon its type).
-   * </p>
-   * 
-   * @param type the type of event (e.g., "focus", "load", etc)
-   * @param canBubble <code>true</code> if the event should bubble
-   * @param cancelable <code>true</code> if the event should be cancelable
-   * @param ctrlKey <code>true</code> if the ctrl key is depressed
-   * @param altKey <code>true</code> if the alt key is depressed
-   * @param shiftKey <code>true</code> if the shift key is depressed
-   * @param metaKey <code>true</code> if the meta key is depressed
-   * @param keyCode the key-code to be set on the event
-   * @param charCode the char-code to be set on the event
-   * @return the event object
-   */
-  public final NativeEvent createKeyEvent(String type, boolean canBubble,
-      boolean cancelable, boolean ctrlKey, boolean altKey, boolean shiftKey,
-      boolean metaKey, int keyCode, int charCode) {
-    return DOMImpl.impl.createKeyEvent(this, type, canBubble, cancelable,
-        ctrlKey, altKey, shiftKey, metaKey, keyCode, charCode);
-  }
-
-  /**
-   * Creates a 'keypress' event.
-   * 
-   * @param ctrlKey <code>true</code> if the ctrl key is depressed
-   * @param altKey <code>true</code> if the alt key is depressed
-   * @param shiftKey <code>true</code> if the shift key is depressed
-   * @param metaKey <code>true</code> if the meta key is depressed
-   * @param keyCode the key-code to be set on the event
-   * @param charCode the char-code to be set on the event
-   * @return the event object
-   */
-  public final NativeEvent createKeyPressEvent(boolean ctrlKey, boolean altKey,
-      boolean shiftKey, boolean metaKey, int keyCode, int charCode) {
-    return createKeyEvent("keypress", true, true, ctrlKey, altKey, shiftKey,
-        metaKey, keyCode, charCode);
-  }
-
-  /**
-   * Creates a 'keyup' event.
-   * 
-   * @param ctrlKey <code>true</code> if the ctrl key is depressed
-   * @param altKey <code>true</code> if the alt key is depressed
-   * @param shiftKey <code>true</code> if the shift key is depressed
-   * @param metaKey <code>true</code> if the meta key is depressed
-   * @param keyCode the key-code to be set on the event
-   * @param charCode the char-code to be set on the event
-   * @return the event object
-   */
-  public final NativeEvent createKeyUpEvent(boolean ctrlKey, boolean altKey,
-      boolean shiftKey, boolean metaKey, int keyCode, int charCode) {
-    return createKeyEvent("keyup", true, true, ctrlKey, altKey, shiftKey,
-        metaKey, keyCode, charCode);
-  }
-
-  /**
-   * Creates a 'load' event.
-   * 
-   * @return the event object
-   */
-  public final NativeEvent createLoadEvent() {
-    return createHtmlEvent("load", false, false);
-  }
-
-  /**
-   * Creates a 'mousedown' event.
-   * 
-   * @param detail the event's detail property
-   * @param screenX the event's screen-relative x-position
-   * @param screenY the event's screen-relative y-position
-   * @param clientX the event's client-relative x-position
-   * @param clientY the event's client-relative y-position
-   * @param ctrlKey <code>true</code> if the ctrl key is depressed
-   * @param altKey <code>true</code> if the alt key is depressed
-   * @param shiftKey <code>true</code> if the shift key is depressed
-   * @param metaKey <code>true</code> if the meta key is depressed
-   * @param button the event's button property (values from
-   *          {@link Event#BUTTON_LEFT} et al)
-   * @return the event object
-   */
-  public final NativeEvent createMouseDownEvent(int detail, int screenX, int screenY,
-      int clientX, int clientY, boolean ctrlKey, boolean altKey,
-      boolean shiftKey, boolean metaKey, int button) {
-    return createMouseEvent("mousedown", true, true, detail, screenX, screenY,
-        clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, null);
-  }
-
-  /**
-   * Creates an mouse event.
-   * 
-   * <p>
-   * While this method may be used to create events directly, it is generally
-   * preferable to use existing helper methods such as
-   * {@link #createClickEvent(int, int, int, int, int, boolean, boolean, boolean, boolean)}
-   * .
-   * </p>
-   * 
-   * <p>
-   * Also, note that on Internet Explorer the 'canBubble' and 'cancelable'
-   * arguments will be ignored (the event's behavior is inferred by the browser
-   * based upon its type).
-   * </p>
-   * 
-   * @param type the type of event (e.g., "focus", "load", etc)
-   * @param canBubble <code>true</code> if the event should bubble
-   * @param cancelable <code>true</code> if the event should be cancelable
-   * @param detail the event's detail property
-   * @param screenX the event's screen-relative x-position
-   * @param screenY the event's screen-relative y-position
-   * @param clientX the event's client-relative x-position
-   * @param clientY the event's client-relative y-position
-   * @param ctrlKey <code>true</code> if the ctrl key is depressed
-   * @param altKey <code>true</code> if the alt key is depressed
-   * @param shiftKey <code>true</code> if the shift key is depressed
-   * @param metaKey <code>true</code> if the meta key is depressed
-   * @param button the event's button property (values from
-   *          {@link Event#BUTTON_LEFT} et al)
-   * @param relatedTarget the event's related target (only relevant for
-   *          mouseover and mouseout events)
-   * @return the event object
-   */
-  public final NativeEvent createMouseEvent(String type, boolean canBubble,
-      boolean cancelable, int detail, int screenX, int screenY, int clientX,
-      int clientY, boolean ctrlKey, boolean altKey, boolean shiftKey,
-      boolean metaKey, int button, Element relatedTarget) {
-    return DOMImpl.impl.createMouseEvent(this, type, canBubble, cancelable,
-        detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey,
-        metaKey, button, relatedTarget);
-  }
-
-  /**
-   * Creates a 'mousemove' event.
-   * 
-   * @param detail the event's detail property
-   * @param screenX the event's screen-relative x-position
-   * @param screenY the event's screen-relative y-position
-   * @param clientX the event's client-relative x-position
-   * @param clientY the event's client-relative y-position
-   * @param ctrlKey <code>true</code> if the ctrl key is depressed
-   * @param altKey <code>true</code> if the alt key is depressed
-   * @param shiftKey <code>true</code> if the shift key is depressed
-   * @param metaKey <code>true</code> if the meta key is depressed
-   * @param button the event's button property (values from
-   *          {@link Event#BUTTON_LEFT} et al)
-   * @return the event object
-   */
-  public final NativeEvent createMouseMoveEvent(int detail, int screenX, int screenY,
-      int clientX, int clientY, boolean ctrlKey, boolean altKey,
-      boolean shiftKey, boolean metaKey, int button) {
-    return createMouseEvent("mousemove", true, true, detail, screenX, screenY,
-        clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, null);
-  }
-
-  /**
-   * Creates a 'mouseout' event.
-   * 
-   * Note: The 'relatedTarget' parameter will be ignored on Firefox 2 and
-   * earlier.
-   * 
-   * @param detail the event's detail property
-   * @param screenX the event's screen-relative x-position
-   * @param screenY the event's screen-relative y-position
-   * @param clientX the event's client-relative x-position
-   * @param clientY the event's client-relative y-position
-   * @param ctrlKey <code>true</code> if the ctrl key is depressed
-   * @param altKey <code>true</code> if the alt key is depressed
-   * @param shiftKey <code>true</code> if the shift key is depressed
-   * @param metaKey <code>true</code> if the meta key is depressed
-   * @param button the event's button property (values from
-   *          {@link Event#BUTTON_LEFT} et al)
-   * @param relatedTarget the event's related target
-   * @return the event object
-   */
-  public final NativeEvent createMouseOutEvent(int detail, int screenX, int screenY,
-      int clientX, int clientY, boolean ctrlKey, boolean altKey,
-      boolean shiftKey, boolean metaKey, int button, Element relatedTarget) {
-    return createMouseEvent("mouseout", true, true, detail, screenX, screenY,
-        clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button,
-        relatedTarget);
-  }
-
-  /**
-   * Creates a 'mouseover' event.
-   * 
-   * Note: The 'relatedTarget' parameter will be ignored on Firefox 2 and
-   * earlier.
-   * 
-   * @param detail the event's detail property
-   * @param screenX the event's screen-relative x-position
-   * @param screenY the event's screen-relative y-position
-   * @param clientX the event's client-relative x-position
-   * @param clientY the event's client-relative y-position
-   * @param ctrlKey <code>true</code> if the ctrl key is depressed
-   * @param altKey <code>true</code> if the alt key is depressed
-   * @param shiftKey <code>true</code> if the shift key is depressed
-   * @param metaKey <code>true</code> if the meta key is depressed
-   * @param button the event's button property (values from
-   *          {@link Event#BUTTON_LEFT} et al)
-   * @param relatedTarget the event's related target
-   * @return the event object
-   */
-  public final NativeEvent createMouseOverEvent(int detail, int screenX, int screenY,
-      int clientX, int clientY, boolean ctrlKey, boolean altKey,
-      boolean shiftKey, boolean metaKey, int button, Element relatedTarget) {
-    return createMouseEvent("mouseover", true, true, detail, screenX, screenY,
-        clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button,
-        relatedTarget);
-  }
-
-  /**
-   * Creates a 'mouseup' event.
-   * 
-   * @param detail the event's detail property
-   * @param screenX the event's screen-relative x-position
-   * @param screenY the event's screen-relative y-position
-   * @param clientX the event's client-relative x-position
-   * @param clientY the event's client-relative y-position
-   * @param ctrlKey <code>true</code> if the ctrl key is depressed
-   * @param altKey <code>true</code> if the alt key is depressed
-   * @param shiftKey <code>true</code> if the shift key is depressed
-   * @param metaKey <code>true</code> if the meta key is depressed
-   * @param button the event's button property (values from
-   *          {@link Event#BUTTON_LEFT} et al)
-   * @return the event object
-   */
-  public final NativeEvent createMouseUpEvent(int detail, int screenX, int screenY,
-      int clientX, int clientY, boolean ctrlKey, boolean altKey,
-      boolean shiftKey, boolean metaKey, int button) {
-    return createMouseEvent("mouseup", true, true, detail, screenX, screenY,
-        clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, null);
-  }
-
-  /**
-   * Creates a 'scroll' event.
-   * 
-   * Note: Contextmenu events will not dispatch properly on Firefox 2 and
-   * earlier.
-   * 
-   * @return the event object
-   */
-  public final NativeEvent createScrollEvent() {
-    return createHtmlEvent("scroll", false, false);
-  }
 }
diff --git a/user/src/com/google/gwt/user/client/impl/DOMImpl.java b/user/src/com/google/gwt/user/client/impl/DOMImpl.java
index 93e170f..a42eaa5 100644
--- a/user/src/com/google/gwt/user/client/impl/DOMImpl.java
+++ b/user/src/com/google/gwt/user/client/impl/DOMImpl.java
@@ -48,7 +48,6 @@
   public native void eventCancelBubble(Event evt, boolean cancel) /*-{
     evt.cancelBubble = cancel;
   }-*/;
-
   
   public native Element eventGetCurrentTarget(Event evt) /*-{
     return evt.currentTarget;