Author: [email protected]
Date: Fri Jun  5 11:00:54 2009
New Revision: 5516

Modified:
    releases/1.6/user/src/com/google/gwt/i18n/client/NumberFormat.java
    releases/1.6/user/src/com/google/gwt/user/client/impl/DOMImplIE8.java
    releases/1.6/user/src/com/google/gwt/user/client/impl/DOMImplTrident.java
    releases/1.6/user/src/com/google/gwt/user/client/ui/CheckBox.java
    releases/1.6/user/src/com/google/gwt/user/client/ui/RadioButton.java
    releases/1.6/user/test/com/google/gwt/user/client/ui/CheckBoxTest.java

Log:
Fix annoying checkstyle violations.

Review by: jgw (TBR)

Modified: releases/1.6/user/src/com/google/gwt/i18n/client/NumberFormat.java
==============================================================================
--- releases/1.6/user/src/com/google/gwt/i18n/client/NumberFormat.java   
(original)
+++ releases/1.6/user/src/com/google/gwt/i18n/client/NumberFormat.java  Fri  
Jun  5 11:00:54 2009
@@ -504,34 +504,6 @@
      this(defaultNumberConstants, pattern, cdata, userSuppliedPattern);
    }

-  protected NumberConstants getNumberConstants() {
-    return numberConstants;
-  }
-
-  protected String getPositivePrefix() {
-    return positivePrefix;
-  }
-
-  protected String getPositiveSuffix() {
-    return positiveSuffix;
-  }
-
-  protected String getNegativePrefix() {
-    return negativePrefix;
-  }
-
-  protected String getNegativeSuffix() {
-    return negativeSuffix;
-  }
-
-  protected int getGroupingSize() {
-    return groupingSize;
-  }
-
-  protected boolean isDecimalSeparatorAlwaysShown() {
-    return decimalSeparatorAlwaysShown;
-  }
-
    /**
     * This method formats a double to produce a string.
     *
@@ -682,6 +654,34 @@
      }

      return ret;
+  }
+
+  protected int getGroupingSize() {
+    return groupingSize;
+  }
+
+  protected String getNegativePrefix() {
+    return negativePrefix;
+  }
+
+  protected String getNegativeSuffix() {
+    return negativeSuffix;
+  }
+
+  protected NumberConstants getNumberConstants() {
+    return numberConstants;
+  }
+
+  protected String getPositivePrefix() {
+    return positivePrefix;
+  }
+
+  protected String getPositiveSuffix() {
+    return positiveSuffix;
+  }
+
+  protected boolean isDecimalSeparatorAlwaysShown() {
+    return decimalSeparatorAlwaysShown;
    }

    /**

Modified:  
releases/1.6/user/src/com/google/gwt/user/client/impl/DOMImplIE8.java
==============================================================================
--- releases/1.6/user/src/com/google/gwt/user/client/impl/DOMImplIE8.java       
 
(original)
+++ releases/1.6/user/src/com/google/gwt/user/client/impl/DOMImplIE8.java       
 
Fri Jun  5 11:00:54 2009
@@ -15,5 +15,9 @@
   */
  package com.google.gwt.user.client.impl;

+/**
+ * Internet Explorer 8 implementation of
+ * {...@link com.google.gwt.user.client.impl.DOMImpl}.
+ */
  public class DOMImplIE8 extends DOMImplTrident {
  }

Modified:  
releases/1.6/user/src/com/google/gwt/user/client/impl/DOMImplTrident.java
==============================================================================
---  
releases/1.6/user/src/com/google/gwt/user/client/impl/DOMImplTrident.java       
 
(original)
+++  
releases/1.6/user/src/com/google/gwt/user/client/impl/DOMImplTrident.java       
 
Fri Jun  5 11:00:54 2009
@@ -19,6 +19,10 @@
  import com.google.gwt.user.client.Element;
  import com.google.gwt.user.client.Event;

+/**
+ * Base implementation of {...@link com.google.gwt.user.client.impl.DOMImpl}  
shared
+ * by IE based browsers.
+ */
  public abstract class DOMImplTrident extends DOMImpl {

    @SuppressWarnings("unused")

Modified: releases/1.6/user/src/com/google/gwt/user/client/ui/CheckBox.java
==============================================================================
--- releases/1.6/user/src/com/google/gwt/user/client/ui/CheckBox.java    
(original)
+++ releases/1.6/user/src/com/google/gwt/user/client/ui/CheckBox.java   Fri  
Jun  5 11:00:54 2009
@@ -119,17 +119,6 @@
      return addHandler(handler, ValueChangeEvent.getType());
    }

-  protected void ensureDomEventHandlers() {
-    addClickHandler(new ClickHandler() {
-      public void onClick(ClickEvent event) {
-        // Checkboxes always toggle their value, no need to compare
-        // with old value. Radio buttons are not so lucky, see
-        // overrides in RadioButton
-        ValueChangeEvent.fire(CheckBox.this, getValue());
-      }
-    });
-  }
-
    /**
     * Returns the value property of the input element that backs this  
widget.
     * This is the value that will be associated with the CheckBox name and
@@ -326,6 +315,17 @@
      } else {
        super.sinkEvents(eventBitsToAdd);
      }
+  }
+
+  protected void ensureDomEventHandlers() {
+    addClickHandler(new ClickHandler() {
+      public void onClick(ClickEvent event) {
+        // Checkboxes always toggle their value, no need to compare
+        // with old value. Radio buttons are not so lucky, see
+        // overrides in RadioButton
+        ValueChangeEvent.fire(CheckBox.this, getValue());
+      }
+    });
    }

    /**

Modified:  
releases/1.6/user/src/com/google/gwt/user/client/ui/RadioButton.java
==============================================================================
--- releases/1.6/user/src/com/google/gwt/user/client/ui/RadioButton.java        
 
(original)
+++ releases/1.6/user/src/com/google/gwt/user/client/ui/RadioButton.java        
 
Fri Jun  5 11:00:54 2009
@@ -71,6 +71,44 @@
    }

    /**
+   * Creates a new radio associated with a particular group, and  
initialized
+   * with the given HTML label. All radio buttons associated with the same  
group
+   * name belong to a mutually-exclusive set.
+   *
+   * Radio buttons are grouped by their name attribute, so changing their  
name
+   * using the setName() method will also change their associated group.
+   *
+   * @param name the group name with which to associate the radio button
+   * @param label this radio button's label
+   */
+  public RadioButton(String name, String label) {
+    this(name);
+    setText(label);
+  }
+
+  /**
+   * Creates a new radio button associated with a particular group, and
+   * initialized with the given label (optionally treated as HTML). All  
radio
+   * buttons associated with the same group name belong to a  
mutually-exclusive
+   * set.
+   *
+   * Radio buttons are grouped by their name attribute, so changing their  
name
+   * using the setName() method will also change their associated group.
+   *
+   * @param name name the group with which to associate the radio button
+   * @param label this radio button's label
+   * @param asHTML <code>true</code> to treat the specified label as HTML
+   */
+  public RadioButton(String name, String label, boolean asHTML) {
+    this(name);
+    if (asHTML) {
+      setHTML(label);
+    } else {
+      setText(label);
+    }
+  }
+
+  /**
     * Overridden to send ValueChangeEvents only when appropriate.
     */
    @Override
@@ -105,6 +143,26 @@
      super.onBrowserEvent(event);
    }

+  /**
+   * Change the group name of this radio button.
+   *
+   * Radio buttons are grouped by their name attribute, so changing their  
name
+   * using the setName() method will also change their associated group.
+   *
+   * If changing this group name results in a new radio group with multiple
+   * radio buttons selected, this radio button will remain selected and the
+   * other radio buttons will be unselected.
+   *
+   * @param name name the group with which to associate the radio button
+   */
+  @Override
+  public void setName(String name) {
+    // Just changing the radio button name tends to break groupiness,
+    // so we have to replace it. Note that replaceInputElement is careful
+    // not to propagate name when it propagates everything else
+    super.replaceInputElement(DOM.createInputRadio(name));
+  }
+
    @Override
    public void sinkEvents(int eventBitsToAdd) {
      // Like CheckBox, we want to hear about inputElem. We
@@ -127,63 +185,5 @@
     */
    @Override
    protected void ensureDomEventHandlers() {
-  }
-
-  /**
-   * Creates a new radio associated with a particular group, and  
initialized
-   * with the given HTML label. All radio buttons associated with the same  
group
-   * name belong to a mutually-exclusive set.
-   *
-   * Radio buttons are grouped by their name attribute, so changing their  
name
-   * using the setName() method will also change their associated group.
-   *
-   * @param name the group name with which to associate the radio button
-   * @param label this radio button's label
-   */
-  public RadioButton(String name, String label) {
-    this(name);
-    setText(label);
-  }
-
-  /**
-   * Creates a new radio button associated with a particular group, and
-   * initialized with the given label (optionally treated as HTML). All  
radio
-   * buttons associated with the same group name belong to a  
mutually-exclusive
-   * set.
-   *
-   * Radio buttons are grouped by their name attribute, so changing their  
name
-   * using the setName() method will also change their associated group.
-   *
-   * @param name name the group with which to associate the radio button
-   * @param label this radio button's label
-   * @param asHTML <code>true</code> to treat the specified label as HTML
-   */
-  public RadioButton(String name, String label, boolean asHTML) {
-    this(name);
-    if (asHTML) {
-      setHTML(label);
-    } else {
-      setText(label);
-    }
-  }
-
-  /**
-   * Change the group name of this radio button.
-   *
-   * Radio buttons are grouped by their name attribute, so changing their  
name
-   * using the setName() method will also change their associated group.
-   *
-   * If changing this group name results in a new radio group with multiple
-   * radio buttons selected, this radio button will remain selected and the
-   * other radio buttons will be unselected.
-   *
-   * @param name name the group with which to associate the radio button
-   */
-  @Override
-  public void setName(String name) {
-    // Just changing the radio button name tends to break groupiness,
-    // so we have to replace it. Note that replaceInputElement is careful
-    // not to propagate name when it propagates everything else
-    super.replaceInputElement(DOM.createInputRadio(name));
    }
  }

Modified:  
releases/1.6/user/test/com/google/gwt/user/client/ui/CheckBoxTest.java
==============================================================================
--- releases/1.6/user/test/com/google/gwt/user/client/ui/CheckBoxTest.java      
 
(original)
+++ releases/1.6/user/test/com/google/gwt/user/client/ui/CheckBoxTest.java      
 
Fri Jun  5 11:00:54 2009
@@ -45,7 +45,6 @@
      public void onClick(Widget sender) {
        ++fired;
      }
-
    }

    private static class Handler implements ValueChangeHandler<Boolean> {

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

Reply via email to