Author: [EMAIL PROTECTED]
Date: Thu Nov  6 20:22:51 2008
New Revision: 3978

Modified:
     
branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/DomEvent.java
     
branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/MouseWheelEvent.java

Log:
Updated DomEvent doc to use flyweight, reworked package-protected  
constructor to take advantage of ... notation.
Used updated package protected constructor for MouseWheelEvent

Modified:  
branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/DomEvent.java
==============================================================================
---  
branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/DomEvent.java
         
(original)
+++  
branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/DomEvent.java
         
Thu Nov  6 20:22:51 2008
@@ -62,10 +62,10 @@
       *
       *
       * @param eventToSink the integer value used by sink events to set up  
event
-     *          handling for this dom type
+     * handling for this dom type
       * @param eventName the raw native event name
-     * @param flyweight the instance that will be used as a flyweight
-     *          to wrap a native event
+     * @param flyweight the instance that will be used as a flyweight to  
wrap a
+     * native event
       */
      protected Type(int eventToSink, String eventName, DomEvent<H>  
flyweight) {
        this.flyweight = flyweight;
@@ -80,10 +80,11 @@
        reverseRegistered.put(eventToSink, this);
      }

-    Type(int nativeEventTypeInt, String[] eventNames, DomEvent<H> cached) {
-      this(nativeEventTypeInt, eventNames[0], cached);
-      for (int i = 1; i < eventNames.length; i++) {
-        registered.unsafePut(eventNames[i], this);
+    Type(int nativeEventTypeInt, String eventName, DomEvent<H> cached,
+        String... auxNames) {
+      this(nativeEventTypeInt, eventName, cached);
+      for (int i = 0; i < auxNames.length; i++) {
+        registered.unsafePut(auxNames[i], this);
        }
      }

@@ -112,7 +113,7 @@
     */
    public static void fireNativeEvent(Event nativeEvent, HandlerManager  
handlers) {
      final DomEvent.Type<?> typeKey =  
registered.unsafeGet(nativeEvent.getType());
-    if (typeKey != null && handlers != null) {
+    if (handlers != null) {
        // Store and restore native event just in case we are in recursive
        // loop.
        Event currentNative = typeKey.flyweight.nativeEvent;
@@ -134,14 +135,15 @@
     *
     * @deprecated should go away after triggering of native events is  
introduced
     * @param eventType the GWT event type representing the type of the  
native
-   *          event.
+   * event.
     * @param handlers the handler manager containing the handlers
     */
+  @Deprecated
    public static void unsafeFireNativeEvent(int eventType,
        HandlerManager handlers) {
      if (registered != null) {
        final DomEvent.Type<?> typeKey = reverseRegistered.get(eventType);
-      if (typeKey != null && handlers != null) {
+      if (typeKey != null) {
          // Store and restore native event just in case we are in recursive
          // loop.
          Event currentNative = null;

Modified:  
branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/MouseWheelEvent.java
==============================================================================
---  
branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/MouseWheelEvent.java
  
(original)
+++  
branches/1_6_clean_events/user/src/com/google/gwt/event/dom/client/MouseWheelEvent.java
  
Thu Nov  6 20:22:51 2008
@@ -27,7 +27,7 @@
     * this event.
     */
    private static final Type<MouseWheelHandler> TYPE = new  
Type<MouseWheelHandler>(
-      Event.ONMOUSEWHEEL, "mousewheel", new MouseWheelEvent());
+      Event.ONMOUSEWHEEL, "mousewheel", new  
MouseWheelEvent(), "DOMMouseScroll");

    /**
     * Gets the event type associated with mouse wheel events.

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

Reply via email to