Author: [EMAIL PROTECTED]
Date: Fri Nov  7 10:59:17 2008
New Revision: 3987

Added:
     
branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/HandlesAllFocusEvents.java
    
(contents, props changed)
       - copied, changed from r3979,  
/branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/AllFocusHandlers.java
     
branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/HandlesAllKeyEvents.java
    
(contents, props changed)
       - copied, changed from r3979,  
/branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/AllKeyHandlers.java
     
branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/HandlesAllMouseEvents.java
    
(contents, props changed)
       - copied, changed from r3979,  
/branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/AllMouseHandlers.java
     
branches/1_6_clean_events/user/src/com/google/gwt/event/shared/DefaultHandlerRegistration.java
    
(contents, props changed)
       - copied, changed from r3979,  
/branches/1_6_clean_events/user/src/com/google/gwt/event/shared/HandlerRegistration.java
     
branches/1_6_clean_events/user/src/com/google/gwt/event/shared/HandlerRegistration.java
    
(contents, props changed)
     
branches/1_6_clean_events/user/test/com/google/gwt/event/dom/client/DomEventTest.java
    
(contents, props changed)
       - copied, changed from r3979,  
/branches/1_6_clean_events/user/test/com/google/gwt/event/dom/client/GWTEventsTest.java
Removed:
     
branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/AllFocusHandlers.java
     
branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/AllKeyHandlers.java
     
branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/AllMouseHandlers.java
     
branches/1_6_clean_events/user/test/com/google/gwt/event/dom/client/GWTEventsTest.java
Modified:
     
branches/1_6_clean_events/reference/code-museum/src/com/google/gwt/museum/client/common/EventReporter.java
     
branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/HasKeyCodes.java
     
branches/1_6_clean_events/user/src/com/google/gwt/event/shared/HandlerManager.java
     
branches/1_6_clean_events/user/src/com/google/gwt/user/client/ui/DialogBox.java
    branches/1_6_clean_events/user/src/com/google/gwt/user/client/ui/L.java
     
branches/1_6_clean_events/user/src/com/google/gwt/user/client/ui/SuggestBox.java
    branches/1_6_clean_events/user/test/com/google/gwt/event/EventSuite.java
     
branches/1_6_clean_events/user/test/com/google/gwt/event/shared/HandlerManagerTest.java

Log:
AllKeyHandles --> HandlesAllKeyEvents, etc.
Got rid of all checkstyle errors we could from HasKeyCodes.
HandlerRegistration now an interface
Fixing whitespace errors in DialogBox
Renamed GWTEventsTest to see if the name is what was confusing the junit  
test on linux.
Suppressing deprecation warnings in EventSuite

Modified:  
branches/1_6_clean_events/reference/code-museum/src/com/google/gwt/museum/client/common/EventReporter.java
==============================================================================
---  
branches/1_6_clean_events/reference/code-museum/src/com/google/gwt/museum/client/common/EventReporter.java
       
(original)
+++  
branches/1_6_clean_events/reference/code-museum/src/com/google/gwt/museum/client/common/EventReporter.java
       
Fri Nov  7 10:59:17 2008
@@ -16,7 +16,7 @@

  package com.google.gwt.museum.client.common;

-import com.google.gwt.event.dom.client.AllKeyHandlers;
+import com.google.gwt.event.dom.client.HandlesAllKeyEvents;
  import com.google.gwt.event.dom.client.BlurEvent;
  import com.google.gwt.event.dom.client.BlurHandler;
  import com.google.gwt.event.dom.client.ChangeEvent;
@@ -59,7 +59,7 @@
   * @param <T> target type
   */
  @SuppressWarnings("deprecation")
-public class EventReporter<V, T> extends AllKeyHandlers implements
+public class EventReporter<V, T> extends HandlesAllKeyEvents implements
      ChangeListener, FocusListener, ValueChangeHandler<V>,
      SelectionHandler<Suggestion>, SuggestionHandler, KeyboardListener,
      ChangeHandler, BlurHandler, FocusHandler, ClickHandler, ClickListener,

Copied:  
branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/HandlesAllFocusEvents.java
  
(from r3979,  
/branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/AllFocusHandlers.java)
==============================================================================
---  
/branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/AllFocusHandlers.java
        
(original)
+++  
branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/HandlesAllFocusEvents.java
    
Fri Nov  7 10:59:17 2008
@@ -17,36 +17,39 @@
  package com.google.gwt.event.dom.client;

  /**
- * Adaptor used to create and add all focus events at once.
+ * Receiver used to handle all focus events at once.
   */
-public abstract class AllFocusHandlers implements FocusHandler,  
BlurHandler {
+public abstract class HandlesAllFocusEvents implements FocusHandler,
+    BlurHandler {

    /**
-   * Convenience method to add both focus handlers at once to an event  
source.
+   * Convenience method used to handle both focus and blur events from an  
event
+   * source.
     *
-   * @param <EventHandlerType> handler type that implements both focus and  
blur
-   *          events.
-   * @param source the event source
-   * @param handlers the focus and blur handlers
+   * @param <H> receiver type, must implement both [EMAIL PROTECTED] 
FocusHandler} and
+   * [EMAIL PROTECTED] BlurHandler} handlers
+   * @param eventSource the event source
+   * @param reciever the receiver implementing both focus and blur handlers
     */
-  public static <EventHandlerType extends BlurHandler & FocusHandler> void  
addHandlers(
-      HasAllFocusHandlers source, EventHandlerType handlers) {
-    source.addBlurHandler(handlers);
-    source.addFocusHandler(handlers);
+  public static <H extends BlurHandler & FocusHandler> void handle(
+      HasAllFocusHandlers eventSource, H reciever) {
+    eventSource.addBlurHandler(reciever);
+    eventSource.addFocusHandler(reciever);
    }

    /**
     * Constructor.
     */
-  public AllFocusHandlers() {
+  public HandlesAllFocusEvents() {
    }

    /**
-   * Convenience method to add both focus handlers at once.
+   * Convenience method to handle both focus and blur events from an event
+   * source.
     *
     * @param source the event source
     */
-  public void addFocusHandlersTo(HasAllFocusHandlers source) {
-    addHandlers(source, this);
+  public void handle(HasAllFocusHandlers source) {
+    handle(source, this);
    }
  }

Copied:  
branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/HandlesAllKeyEvents.java
  
(from r3979,  
/branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/AllKeyHandlers.java)
==============================================================================
---  
/branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/AllKeyHandlers.java
  
(original)
+++  
branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/HandlesAllKeyEvents.java
      
Fri Nov  7 10:59:17 2008
@@ -17,38 +17,38 @@
  package com.google.gwt.event.dom.client;

  /**
- * Adaptor used to create and add all the Key handlers at once.
+ * Receiver used to handle all key events at once.
   *
- * <br/> WARNING, PLEASE READ: As this class is intended for developers  
who wish
- * to create all key events in GWT, new key handlers will be added to it.
+ * WARNING, PLEASE READ: As this class is intended for developers who wish  
to
+ * handle all key events in GWT, new key handler interfaces will be added  
to it.
   * Therefore, updates to GWT could cause breaking API changes.
   *
   */
-public abstract class AllKeyHandlers implements KeyDownHandler,  
KeyUpHandler,
-    KeyPressHandler {
+public abstract class HandlesAllKeyEvents implements KeyDownHandler,
+    KeyUpHandler, KeyPressHandler {

    /**
-   * Convenience method to add all key handlers at once.
+   * Convenience method used to handle all key events from an event source.
     *
-   * @param <EventHandler> event handler type
-   * @param source event source
-   * @param handlers handlers to add
+   * @param <H> receiver type, must implement all key handlers
+   * @param eventSource the event source
+   * @param reciever the receiver implementing all key handlers
     */
-  public static <EventHandler extends KeyDownHandler & KeyUpHandler &  
KeyPressHandler> void addHandlers(
-      HasAllKeyHandlers source, EventHandler handlers) {
-    source.addKeyDownHandler(handlers);
-    source.addKeyPressHandler(handlers);
-    source.addKeyUpHandler(handlers);
+  public static <H extends KeyDownHandler & KeyUpHandler &  
KeyPressHandler> void addHandlers(
+      HasAllKeyHandlers eventSource, H reciever) {
+    eventSource.addKeyDownHandler(reciever);
+    eventSource.addKeyPressHandler(reciever);
+    eventSource.addKeyUpHandler(reciever);
    }

    /**
     * Constructor.
     */
-  public AllKeyHandlers() {
+  public HandlesAllKeyEvents() {
    }

    /**
-   * Adds all the key handlers to the given event source.
+   * Convenience method to handle all key events from an event source.
     *
     * @param source the event source
     */

Copied:  
branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/HandlesAllMouseEvents.java
  
(from r3979,  
/branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/AllMouseHandlers.java)
==============================================================================
---  
/branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/AllMouseHandlers.java
        
(original)
+++  
branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/HandlesAllMouseEvents.java
    
Fri Nov  7 10:59:17 2008
@@ -17,38 +17,46 @@
  package com.google.gwt.event.dom.client;

  /**
- * Adaptor used to create and add all the mouse events at once.
+ * Receiver used to handle all mouse events at once.
   *
- * <br/> WARNING, PLEASE READ: As this class is intended for developers  
who wish
- * to create all mouse handlers, new mouse handler events will be added to  
it.
- * Therefore, updates can cause breaking API changes.
+ * WARNING, PLEASE READ: As this class is intended for developers who wish  
to
+ * handle all mouse events in GWT, new mouse handler interfaces will be  
added to
+ * it. Therefore, updates to GWT could cause breaking API changes.
   *
   */
-public abstract class AllMouseHandlers implements HasMouseDownHandlers,
-    HasMouseUpHandlers, HasMouseOutHandlers, HasMouseOverHandlers,
-    HasMouseMoveHandlers, HasMouseWheelHandlers {
+public abstract class HandlesAllMouseEvents implements MouseDownHandler,
+    MouseUpHandler, MouseMoveHandler, MouseOutHandler, MouseOverHandler,
+    MouseWheelHandler {

    /**
-   * Convenience method to add all key handlers at once.
+   * Convenience method used to handle all mouse events from an event  
source.
     *
-   * @param <EventHandler> event handler type
-   * @param source event source
-   * @param handlers handlers to add
+   * @param <H> receiver type, must implement all mouse handlers
+   * @param source the event source
+   * @param reciever the receiver implementing all mouse handlers
     */
-  public static <EventHandler extends MouseDownHandler & MouseUpHandler &  
MouseOutHandler & MouseOverHandler & MouseMoveHandler & MouseWheelHandler>  
void addHandlers(
-      HasAllMouseHandlers source, EventHandler handlers) {
-    source.addMouseDownHandler(handlers);
-    source.addMouseUpHandler(handlers);
-    source.addMouseOutHandler(handlers);
-    source.addMouseOverHandler(handlers);
-    source.addMouseMoveHandler(handlers);
-    source.addMouseWheelHandler(handlers);
+  public static <H extends MouseDownHandler & MouseUpHandler &  
MouseOutHandler & MouseOverHandler & MouseMoveHandler & MouseWheelHandler>  
void handle(
+      HasAllMouseHandlers source, H reciever) {
+    source.addMouseDownHandler(reciever);
+    source.addMouseUpHandler(reciever);
+    source.addMouseOutHandler(reciever);
+    source.addMouseOverHandler(reciever);
+    source.addMouseMoveHandler(reciever);
+    source.addMouseWheelHandler(reciever);
    }

    /**
-   * Creates an adaptor to implement all the [EMAIL PROTECTED] 
HasAllKeyHandlers}  
handler
-   * types.
+   * Constructor.
     */
-  public AllMouseHandlers() {
+  public HandlesAllMouseEvents() {
+  }
+
+  /**
+   * Convenience method to handle all mouse events from an event source.
+   *
+   * @param eventSource the event source
+   */
+  public void handle(HasAllMouseHandlers eventSource) {
+    handle(eventSource, this);
    }
  }

Modified:  
branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/HasKeyCodes.java
==============================================================================
---  
branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/HasKeyCodes.java
      
(original)
+++  
branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/HasKeyCodes.java
      
Fri Nov  7 10:59:17 2008
@@ -22,79 +22,82 @@
   * becomes a pain, as almost all current listeners use the short form
   * <codE>KEY_ALT</code> when referring to key codes.
   */
+
+// Need to have a team discussion to decide if we want this pattern in  
general.
+// Until then, just turning checkstyle off.
  // CHECKSTYLE_OFF
  @SuppressWarnings("all")
  public interface HasKeyCodes {
    /**
     * Alt key code.
     */
-  public static final int KEY_ALT = 18;
+  int KEY_ALT = 18;

    /**
     * Backspace key code.
     */
-  public static final int KEY_BACKSPACE = 8;
+  int KEY_BACKSPACE = 8;

    /**
     * Control key code.
     */
-  public static final int KEY_CTRL = 17;
+  int KEY_CTRL = 17;

    /**
     * Delete key code.
     */
-  public static final int KEY_DELETE = 46;
+  int KEY_DELETE = 46;

    /**
     * Down arrow code.
     */
-  public static final int KEY_DOWN = 40;
+  int KEY_DOWN = 40;

    /**
     * End key code.
     */
-  public static final int KEY_END = 35;
+  int KEY_END = 35;
    /**
     * Enter key code.
     */
-  public static final int KEY_ENTER = 13;
+  int KEY_ENTER = 13;
    /**
     * Escape key code.
     */
-  public static final int KEY_ESCAPE = 27;
+  int KEY_ESCAPE = 27;
    /**
     * Home key code.
     */
-  public static final int KEY_HOME = 36;
+  int KEY_HOME = 36;
    /**
     * Left key code.
     */
-  public static final int KEY_LEFT = 37;
+  int KEY_LEFT = 37;
    /**
     * Page down key code.
     */
-  public static final int KEY_PAGEDOWN = 34;
+  int KEY_PAGEDOWN = 34;
    /**
     * Page up key code.
     */
-  public static final int KEY_PAGEUP = 33;
+  int KEY_PAGEUP = 33;
    /**
     * Right arrow key code.
     */
-  public static final int KEY_RIGHT = 39;
+  int KEY_RIGHT = 39;

    /**
     * Shift key code.
     */
-  public static final int KEY_SHIFT = 16;
+  int KEY_SHIFT = 16;
    /**
     * Tab key code.
     */
-  public static final int KEY_TAB = 9;
+  int KEY_TAB = 9;

    /**
     * Up Arrow key code.
     */
-  public static final int KEY_UP = 38;
+  int KEY_UP = 38;

  }

Copied:  
branches/1_6_clean_events/user/src/com/google/gwt/event/shared/DefaultHandlerRegistration.java
  
(from r3979,  
/branches/1_6_clean_events/user/src/com/google/gwt/event/shared/HandlerRegistration.java)
==============================================================================
---  
/branches/1_6_clean_events/user/src/com/google/gwt/event/shared/HandlerRegistration.java
         
(original)
+++  
branches/1_6_clean_events/user/src/com/google/gwt/event/shared/DefaultHandlerRegistration.java
   
Fri Nov  7 10:59:17 2008
@@ -18,11 +18,9 @@
  import com.google.gwt.event.shared.GwtEvent.Type;

  /**
- * HandlerRegistration instances are returned by
- * HandlerManager.addEventHandler() and used to remove event handler
- * registrations.
+ * Default implementation of [EMAIL PROTECTED] HandlerRegistration}.
   */
-public class HandlerRegistration {
+public class DefaultHandlerRegistration implements HandlerRegistration {

    private HandlerManager manager;
    EventHandler handler;
@@ -37,7 +35,7 @@
     * @param type the event type
     * @param handler the handler
     */
-  protected <H extends EventHandler> HandlerRegistration(
+  protected <H extends EventHandler> DefaultHandlerRegistration(
        HandlerManager manager, Type<H> type, H handler) {
      this.manager = manager;
      this.handler = handler;
@@ -51,7 +49,7 @@
    // This is safe because when the elements were passed in they conformed  
to
    // Type<H>,H.
    public void removeHandler() {
-    manager.removeHandler((Type<EventHandler>) type, (EventHandler)  
handler);
+    manager.removeHandler((Type<EventHandler>) type, handler);
    }

    EventHandler getHandler() {

Modified:  
branches/1_6_clean_events/user/src/com/google/gwt/event/shared/HandlerManager.java
==============================================================================
---  
branches/1_6_clean_events/user/src/com/google/gwt/event/shared/HandlerManager.java
       
(original)
+++  
branches/1_6_clean_events/user/src/com/google/gwt/event/shared/HandlerManager.java
       
Fri Nov  7 10:59:17 2008
@@ -26,10 +26,11 @@
   * handlers on passed in events.
   */
  public class HandlerManager {
+
    // Used to optimize the JavaScript handler container structure.
    static int EXPECTED_HANDLERS = 5;
-
    private static final boolean useJs = GWT.isClient();
+
    private static int index = -EXPECTED_HANDLERS;

    /**
@@ -111,7 +112,7 @@
          javaRegistry.addHandler(type, handler);
        }
      }
-    return new HandlerRegistration(this, type, handler);
+    return new DefaultHandlerRegistration(this, type, handler);
    }

    /**

Added:  
branches/1_6_clean_events/user/src/com/google/gwt/event/shared/HandlerRegistration.java
==============================================================================
--- (empty file)
+++  
branches/1_6_clean_events/user/src/com/google/gwt/event/shared/HandlerRegistration.java
  
Fri Nov  7 10:59:17 2008
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2008 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may  
not
+ * use this file except in compliance with the License. You may obtain a  
copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations  
under
+ * the License.
+ */
+
+package com.google.gwt.event.shared;
+
+/**
+ * Registration returned from a call to
+ * [EMAIL PROTECTED]  
HandlerManager#addHandler(com.google.gwt.event.shared.GwtEvent.Type,  
EventHandler)}
+ * . Use the handler registration to remove handlers when they are no  
longer
+ * needed.
+ *
+ * Note, this interface is under the control of the [EMAIL PROTECTED] 
HandlerManager}  
class
+ * and may be expanded over time, so extend [EMAIL PROTECTED]  
DefaultHandlerRegistration}
+ * if you do not wish to get compiler errors if we extend the handler  
registry
+ * functionality.
+ */
+public interface HandlerRegistration {
+  /**
+   * Removes the given handler from its manager.
+   */
+  void removeHandler();
+}

Modified:  
branches/1_6_clean_events/user/src/com/google/gwt/user/client/ui/DialogBox.java
==============================================================================
---  
branches/1_6_clean_events/user/src/com/google/gwt/user/client/ui/DialogBox.java 
 
(original)
+++  
branches/1_6_clean_events/user/src/com/google/gwt/user/client/ui/DialogBox.java 
 
Fri Nov  7 10:59:17 2008
@@ -49,8 +49,6 @@
   * <li>.gwt-DialogBox .Caption { the caption }</li>
   * <li>.gwt-DialogBox .dialogContent { the wrapepr around the content  
}</li>
   * <li>.gwt-DialogBox .dialogTopLeft { the top left cell }</li>
- * <li>.gwt-DialogBox .dialogTopCenterInner { the inner element of the  
cell }</li>
- * <li>.gwt-DialogBox .dialogTopRight { the top right cell }</li> <li>
   * .gwt-DialogBox .dialogTopRightInner { the inner element of the cell  
}</li>
   * <li>.gwt-DialogBox .dialogMiddleLeft { the middle left cell }</li> <li>
   * .gwt-DialogBox .dialogMiddleLeftInner { the inner element of the cell  
}</li>
@@ -74,14 +72,15 @@
  public class DialogBox extends DecoratedPopupPanel implements HasHTML,  
HasText,
      MouseListener {
    /**
-   * Set of characteristic interfaces supported by the [EMAIL PROTECTED] 
DialogBox}  
caption wrappers.
+   * Set of characteristic interfaces supported by the [EMAIL PROTECTED] 
DialogBox}  
caption
+   * wrappers.
     *
     * Note that this set might expand over time, so implement this  
interface at
     * your own risk.
     */
    public interface CaptionWrapper extends HasAllMouseHandlers {
    }
-
+
    private class CaptionWrapperImpl extends HTML implements CaptionWrapper {
    }

@@ -113,7 +112,7 @@
     * The default style name.
     */
    private static final String DEFAULT_STYLENAME = "gwt-DialogBox";
-
+
    private CaptionWrapperImpl caption = new CaptionWrapperImpl();
    private boolean dragging;
    private int dragStartX, dragStartY;
@@ -137,7 +136,7 @@
     * [EMAIL PROTECTED] #add(Widget)}.
     *
     * @param autoHide <code>true</code> if the dialog should be  
automatically
-   *          hidden when the user clicks outside of it
+   * hidden when the user clicks outside of it
     */
    public DialogBox(boolean autoHide) {
      this(autoHide, true);
@@ -149,9 +148,9 @@
     * [EMAIL PROTECTED] #add(Widget)}.
     *
     * @param autoHide <code>true</code> if the dialog should be  
automatically
-   *          hidden when the user clicks outside of it
+   * hidden when the user clicks outside of it
     * @param modal <code>true</code> if keyboard and mouse events for  
widgets not
-   *          contained by the dialog should be ignored
+   * contained by the dialog should be ignored
     */
    public DialogBox(boolean autoHide, boolean modal) {
      super(autoHide, modal, "dialog");
@@ -234,7 +233,7 @@

    /**
     * @deprecated Use [EMAIL PROTECTED] #beginDragging} instead and [EMAIL 
PROTECTED] #getCaption}
-   *             instead
+   * instead
     */
    @Deprecated
    public void onMouseDown(Widget sender, int x, int y) {

Modified:  
branches/1_6_clean_events/user/src/com/google/gwt/user/client/ui/L.java
==============================================================================
--- branches/1_6_clean_events/user/src/com/google/gwt/user/client/ui/L.java     
 
(original)
+++ branches/1_6_clean_events/user/src/com/google/gwt/user/client/ui/L.java     
 
Fri Nov  7 10:59:17 2008
@@ -17,8 +17,7 @@
  package com.google.gwt.user.client.ui;

  import com.google.gwt.dom.client.Element;
-import com.google.gwt.event.dom.client.AllFocusHandlers;
-import com.google.gwt.event.dom.client.AllKeyHandlers;
+import com.google.gwt.event.dom.client.HandlesAllKeyEvents;
  import com.google.gwt.event.dom.client.BlurEvent;
  import com.google.gwt.event.dom.client.BlurHandler;
  import com.google.gwt.event.dom.client.ChangeEvent;
@@ -29,6 +28,7 @@
  import com.google.gwt.event.dom.client.ErrorHandler;
  import com.google.gwt.event.dom.client.FocusEvent;
  import com.google.gwt.event.dom.client.FocusHandler;
+import com.google.gwt.event.dom.client.HandlesAllFocusEvents;
  import com.google.gwt.event.dom.client.HasAllFocusHandlers;
  import com.google.gwt.event.dom.client.HasAllKeyHandlers;
  import com.google.gwt.event.dom.client.HasChangeHandlers;
@@ -167,7 +167,7 @@
      public static <EventSourceType extends Widget & HasAllFocusHandlers>  
Focus add(
          EventSourceType source, FocusListener listener) {
        Focus rtn = new Focus(listener);
-      AllFocusHandlers.addHandlers(source, rtn);
+      HandlesAllFocusEvents.handle(source, rtn);
        return rtn;
      }

@@ -473,7 +473,7 @@

      public static <EventSourceType extends Widget & HasAllKeyHandlers>  
void add(
          EventSourceType source, KeyboardListener listener) {
-      AllKeyHandlers.addHandlers(source, new Keyboard(listener));
+      HandlesAllKeyEvents.addHandlers(source, new Keyboard(listener));
      }

      public static void remove(Widget eventSource, KeyboardListener  
listener) {

Modified:  
branches/1_6_clean_events/user/src/com/google/gwt/user/client/ui/SuggestBox.java
==============================================================================
---  
branches/1_6_clean_events/user/src/com/google/gwt/user/client/ui/SuggestBox.java
         
(original)
+++  
branches/1_6_clean_events/user/src/com/google/gwt/user/client/ui/SuggestBox.java
         
Fri Nov  7 10:59:17 2008
@@ -15,7 +15,7 @@
   */
  package com.google.gwt.user.client.ui;

-import com.google.gwt.event.dom.client.AllKeyHandlers;
+import com.google.gwt.event.dom.client.HandlesAllKeyEvents;
  import com.google.gwt.event.dom.client.HasAllKeyHandlers;
  import com.google.gwt.event.dom.client.KeyDownEvent;
  import com.google.gwt.event.dom.client.KeyDownHandler;
@@ -692,7 +692,7 @@
    }

    private void addEventsToTextBox() {
-    class TextBoxEvents extends AllKeyHandlers implements
+    class TextBoxEvents extends HandlesAllKeyEvents implements
          ValueChangeHandler<String> {

        public void onKeyDown(KeyDownEvent event) {

Modified:  
branches/1_6_clean_events/user/test/com/google/gwt/event/EventSuite.java
==============================================================================
---  
branches/1_6_clean_events/user/test/com/google/gwt/event/EventSuite.java        
 
(original)
+++  
branches/1_6_clean_events/user/test/com/google/gwt/event/EventSuite.java        
 
Fri Nov  7 10:59:17 2008
@@ -15,7 +15,7 @@
   */
  package com.google.gwt.event;

-import com.google.gwt.event.dom.client.GWTEventsTest;
+import com.google.gwt.event.dom.client.DomEventTest;
  import com.google.gwt.event.logical.shared.LogicalEventsTest;
  import com.google.gwt.event.shared.HandlerManagerTest;
  import com.google.gwt.junit.tools.GWTTestSuite;
@@ -34,7 +34,7 @@
      suite.addTestSuite(LogicalEventsTest.class);

      // ...dom.client
-    suite.addTestSuite(GWTEventsTest.class);
+    suite.addTestSuite(DomEventTest.class);

      // ...dom.shared
      suite.addTestSuite(HandlerManagerTest.class);

Copied:  
branches/1_6_clean_events/user/test/com/google/gwt/event/dom/client/DomEventTest.java
  
(from r3979,  
/branches/1_6_clean_events/user/test/com/google/gwt/event/dom/client/GWTEventsTest.java)
==============================================================================
---  
/branches/1_6_clean_events/user/test/com/google/gwt/event/dom/client/GWTEventsTest.java
  
(original)
+++  
branches/1_6_clean_events/user/test/com/google/gwt/event/dom/client/DomEventTest.java
    
Fri Nov  7 10:59:17 2008
@@ -17,17 +17,13 @@

  import com.google.gwt.event.shared.HandlerManager;
  import com.google.gwt.event.shared.HandlerRegistration;
-import com.google.gwt.junit.client.GWTTestCase;
+import com.google.gwt.event.shared.HandlerTestBase;

  /**
   * Events test.
   */
  // TODO(ECC) check that max handlers work properly.
-public class GWTEventsTest extends GWTTestCase {
-
-  public String getModuleName() {
-    return "com.google.gwt.event.Event";
-  }
+public class DomEventTest extends HandlerTestBase {

    HandlerManager manager;

@@ -46,8 +42,8 @@
              flag.flag = true;
            }
          });
-    HandlerRegistration upRegistration =  
manager.addHandler(KeyUpEvent.getType(),
-        new KeyUpHandler() {
+    HandlerRegistration upRegistration = manager.addHandler(
+        KeyUpEvent.getType(), new KeyUpHandler() {
            public void onKeyUp(KeyUpEvent event) {
              flag.flag = true;
            }
@@ -135,7 +131,7 @@
          "onDoubleClick");
    }

-  private void checkFire(DomEvent event, HandlerRegistration registration,
+  private void checkFire(DomEvent<?> event, HandlerRegistration  
registration,
        Flag flag, String eventName) {

      flag.flag = false;

Modified:  
branches/1_6_clean_events/user/test/com/google/gwt/event/shared/HandlerManagerTest.java
==============================================================================
---  
branches/1_6_clean_events/user/test/com/google/gwt/event/shared/HandlerManagerTest.java
  
(original)
+++  
branches/1_6_clean_events/user/test/com/google/gwt/event/shared/HandlerManagerTest.java
  
Fri Nov  7 10:59:17 2008
@@ -24,8 +24,8 @@

  /**
   * Handler manager test.
- *
   */
[EMAIL PROTECTED]("deprecation")
  public class HandlerManagerTest extends HandlerTestBase {

    public void testAddHandlers() {

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to