Author: [EMAIL PROTECTED]
Date: Wed Nov 12 15:17:32 2008
New Revision: 4038

Modified:
     
branches/1_6_clean_events/user/src/com/google/gwt/event/logical/shared/CloseEvent.java
     
branches/1_6_clean_events/user/src/com/google/gwt/event/logical/shared/OpenEvent.java
     
branches/1_6_clean_events/user/src/com/google/gwt/event/logical/shared/SelectionEvent.java
     
branches/1_6_clean_events/user/src/com/google/gwt/event/logical/shared/ValueChangeEvent.java
     
branches/1_6_clean_events/user/src/com/google/gwt/event/shared/HandlerManager.java

Log:
Finishing all the changes that were suggested from BeforeSelectionEvent

Modified:  
branches/1_6_clean_events/user/src/com/google/gwt/event/logical/shared/CloseEvent.java
==============================================================================
---  
branches/1_6_clean_events/user/src/com/google/gwt/event/logical/shared/CloseEvent.java
   
(original)
+++  
branches/1_6_clean_events/user/src/com/google/gwt/event/logical/shared/CloseEvent.java
   
Wed Nov 12 15:17:32 2008
@@ -35,7 +35,7 @@
     *
     * @param <T> the target type
     * @param <S> The event source
-   * @param source the source of the handlers
+   * @param source the source of the handlers
     * @param target the target
     * @param autoClosed was the target closed automatically
     */
@@ -53,7 +53,8 @@
    }

    /**
-   * Fires a close event on all registered handlers in the handler manager.
+   * Fires a close event on all registered handlers in the handler  
manager. If
+   * no such handlers exist, this method will do nothing.
     *
     * @param <T> the target type
     * @param <S> The event source
@@ -66,7 +67,7 @@
    }

    /**
-   * Gets the abstract type associated with this event.
+   * Gets the type associated with this event.
     *
     * @return returns the handler type
     */
@@ -79,7 +80,7 @@
    private boolean autoClosed;

    /**
-   * Constructor. Should only be used by subclasses, almost always for  
testing.
+   * Creates a new close event.
     */
    protected CloseEvent() {
    }
@@ -108,8 +109,8 @@
      handler.onClose(this);
    }

-  // Because of type erasure, our static type is
-  // wild carded, yet the "real" type should use our I param.
+  // The instance knows its BeforeSelectionHandler is of type I, but the  
TYPE
+  // field itself does not, so we have to do an unsafe cast here.
    @SuppressWarnings("unchecked")
    @Override
    protected final Type<CloseHandler<T>> getAssociatedType() {

Modified:  
branches/1_6_clean_events/user/src/com/google/gwt/event/logical/shared/OpenEvent.java
==============================================================================
---  
branches/1_6_clean_events/user/src/com/google/gwt/event/logical/shared/OpenEvent.java
    
(original)
+++  
branches/1_6_clean_events/user/src/com/google/gwt/event/logical/shared/OpenEvent.java
    
Wed Nov 12 15:17:32 2008
@@ -31,7 +31,8 @@
    private static Type<OpenHandler<?>> TYPE;

    /**
-   * Fires a open event on all registered handlers in the handler manager.
+   * Fires a open event on all registered handlers in the handler  
manager.If no
+   * such handlers exist, this method will do nothing.
     *
     * @param <T> the target type
     * @param <S> The event source
@@ -51,7 +52,7 @@
    }

    /**
-   * Gets the abstract type associated with this event.
+   * Gets the type associated with this event.
     *
     * @return returns the handler type
     */
@@ -65,7 +66,7 @@
    private T target;

    /**
-   * Constructor. Should only be used by subclasses, almost always for  
testing.
+   * Creates a new open event.
     */
    protected OpenEvent() {
    }
@@ -86,6 +87,7 @@

    // Because of type erasure, our static type is
    // wild carded, yet the "real" type should use our I param.
+
    @SuppressWarnings("unchecked")
    @Override
    protected final Type<OpenHandler<T>> getAssociatedType() {

Modified:  
branches/1_6_clean_events/user/src/com/google/gwt/event/logical/shared/SelectionEvent.java
==============================================================================
---  
branches/1_6_clean_events/user/src/com/google/gwt/event/logical/shared/SelectionEvent.java
       
(original)
+++  
branches/1_6_clean_events/user/src/com/google/gwt/event/logical/shared/SelectionEvent.java
       
Wed Nov 12 15:17:32 2008
@@ -31,7 +31,8 @@
    private static Type<SelectionHandler<?>> TYPE;

    /**
-   * Fires a selection event on all registered handlers in the handler  
manager.
+   * Fires a selection event on all registered handlers in the handler
+   * manager.If no such handlers exist, this method will do nothing.
     *
     * @param <I> the selected item type
     * @param <S> The event source
@@ -51,7 +52,7 @@
    }

    /**
-   * Gets the abstract type associated with this event.
+   * Gets the type associated with this event.
     *
     * @return returns the handler type
     */
@@ -65,7 +66,7 @@
    private I selectedItem;

    /**
-   * Constructor. Should only be used by subclasses, almost always for  
testing.
+   * Creates a new selection event.
     */
    protected SelectionEvent() {
    }
@@ -84,8 +85,8 @@
      handler.onSelection(this);
    }

-  // Because of type erasure, our static type is
-  // wild carded, yet the "real" type should use our I param.
+  // The instance knows its BeforeSelectionHandler is of type I, but the  
TYPE
+  // field itself does not, so we have to do an unsafe cast here.
    @SuppressWarnings("unchecked")
    @Override
    protected Type<SelectionHandler<I>> getAssociatedType() {

Modified:  
branches/1_6_clean_events/user/src/com/google/gwt/event/logical/shared/ValueChangeEvent.java
==============================================================================
---  
branches/1_6_clean_events/user/src/com/google/gwt/event/logical/shared/ValueChangeEvent.java
     
(original)
+++  
branches/1_6_clean_events/user/src/com/google/gwt/event/logical/shared/ValueChangeEvent.java
     
Wed Nov 12 15:17:32 2008
@@ -32,7 +32,7 @@

    /**
     * Fires a value change event on all registered handlers in the handler
-   * manager.
+   * manager.If no such handlers exist, this method will do nothing.
     *
     * @param <I> the old value type
     * @param <S> The event source
@@ -73,7 +73,7 @@
    }

    /**
-   * Gets the abstract type associated with this event.
+   * Gets the type associated with this event.
     *
     * @return returns the handler type
     */
@@ -87,7 +87,7 @@
    private I value;

    /**
-   * Constructor. Should only be used by subclasses, almost always for  
testing.
+   * Creates a value change event.
     */
    protected ValueChangeEvent() {
    }
@@ -106,8 +106,8 @@
      handler.onValueChange(this);
    }

-  // Because of type erasure, our static type is
-  // wild carded, yet the "real" type should use our I param.
+  // The instance knows its BeforeSelectionHandler is of type I, but the  
TYPE
+  // field itself does not, so we have to do an unsafe cast here.
    @SuppressWarnings("unchecked")
    @Override
    protected Type<ValueChangeHandler<I>> getAssociatedType() {

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
       
Wed Nov 12 15:17:32 2008
@@ -270,7 +270,7 @@
    private static final boolean useJs = GWT.isClient();

    private static int index;
-
+
    // Used to assign hash codes to gwt event types so they are easy to  
store in a
    // js structure.
    static int createKeyIndex() {

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

Reply via email to