Revision: 6963
Author: j...@google.com
Date: Tue Nov 17 11:54:37 2009
Log: Merging tr...@r6962 into releases/2.0.

http://code.google.com/p/google-web-toolkit/source/detail?r=6963

Modified:
  /releases/2.0/branch-info.txt
  /releases/2.0/user/src/com/google/gwt/dom/client/OptGroupElement.java
  /releases/2.0/user/src/com/google/gwt/dom/client/SelectElement.java
  /releases/2.0/user/test/com/google/gwt/dom/client/ElementTest.java

=======================================
--- /releases/2.0/branch-info.txt       Mon Nov 16 19:22:20 2009
+++ /releases/2.0/branch-info.txt       Tue Nov 17 11:54:37 2009
@@ -724,3 +724,8 @@
    GWTShell now reuses dev mode linking code to populate its generated  
resources directory.
      svn merge --ignore-ancestry -r6942:6949  
https://google-web-toolkit.googlecode.com/svn/trunk/ .

+tr...@6962 was merged into this branch
+ Updated patch for issue 3527 (getDisabled() -> isDisabled() on Select and  
OptGroup elements.
+    svn merge --ignore-ancestry -c6962 \
+      https://google-web-toolkit.googlecode.com/svn/trunk/ .
+
=======================================
--- /releases/2.0/user/src/com/google/gwt/dom/client/OptGroupElement.java       
 
Fri Jul 11 13:35:23 2008
+++ /releases/2.0/user/src/com/google/gwt/dom/client/OptGroupElement.java       
 
Tue Nov 17 11:54:37 2009
@@ -41,6 +41,7 @@
     * The control is unavailable in this context.
     *
     * @see <a  
href="http://www.w3.org/TR/1999/REC-html401-19991224/interact/forms.html#adef-disabled";>W3C
  
HTML Specification</a>
+   * @deprecated use {...@link #isDisabled()} instead.
     */
    public final native String getDisabled() /*-{
       return this.disabled;
@@ -55,6 +56,24 @@
       return this.label;
     }-*/;

+  /**
+   * The control is unavailable in this context.
+   *
+   * @see <a  
href="http://www.w3.org/TR/1999/REC-html401-19991224/interact/forms.html#adef-disabled";>W3C
  
HTML Specification</a>
+   */
+  public final native boolean isDisabled() /*-{
+     return !!this.disabled;
+   }-*/;
+
+  /**
+   * The control is unavailable in this context.
+   *
+   * @see <a  
href="http://www.w3.org/TR/1999/REC-html401-19991224/interact/forms.html#adef-disabled";>W3C
  
HTML Specification</a>
+   */
+  public final native void setDisabled(boolean disabled) /*-{
+     this.disabled = disabled;
+   }-*/;
+
    /**
     * The control is unavailable in this context.
     *
=======================================
--- /releases/2.0/user/src/com/google/gwt/dom/client/SelectElement.java Fri  
May 15 13:11:37 2009
+++ /releases/2.0/user/src/com/google/gwt/dom/client/SelectElement.java Tue  
Nov 17 11:54:37 2009
@@ -80,6 +80,7 @@
     * The control is unavailable in this context.
     *
     * @see <a  
href="http://www.w3.org/TR/1999/REC-html401-19991224/interact/forms.html#adef-disabled";>W3C
  
HTML Specification</a>
+   * @deprecated use {...@link #isDisabled()} instead.
     */
    public final native String getDisabled() /*-{
       return this.disabled;
@@ -160,6 +161,15 @@
       return this.value;
     }-*/;

+  /**
+   * The control is unavailable in this context.
+   *
+   * @see <a  
href="http://www.w3.org/TR/1999/REC-html401-19991224/interact/forms.html#adef-disabled";>W3C
  
HTML Specification</a>
+   */
+  public final native boolean isDisabled() /*-{
+     return !!this.disabled;
+   }-*/;
+
    /**
     * If true, multiple OPTION elements may be selected in this SELECT.
     *
@@ -178,6 +188,15 @@
    public final void remove(int index) {
      DOMImpl.impl.selectRemoveOption(this, index);
    }
+
+  /**
+   * The control is unavailable in this context.
+   *
+   * @see <a  
href="http://www.w3.org/TR/1999/REC-html401-19991224/interact/forms.html#adef-disabled";>W3C
  
HTML Specification</a>
+   */
+  public final native void setDisabled(boolean disabled) /*-{
+     this.disabled = disabled;
+   }-*/;

    /**
     * The control is unavailable in this context.
=======================================
--- /releases/2.0/user/test/com/google/gwt/dom/client/ElementTest.java  Wed  
Oct 28 19:23:32 2009
+++ /releases/2.0/user/test/com/google/gwt/dom/client/ElementTest.java  Tue  
Nov 17 11:54:37 2009
@@ -84,6 +84,16 @@
      assertFalse(input.isDisabled());
      input.setDisabled(true);
      assertTrue(input.isDisabled());
+
+    SelectElement select = Document.get().createSelectElement();
+    assertFalse(select.isDisabled());
+    select.setDisabled(true);
+    assertTrue(select.isDisabled());
+
+    OptGroupElement optgroup = Document.get().createOptGroupElement();
+    assertFalse(optgroup.isDisabled());
+    optgroup.setDisabled(true);
+    assertTrue(optgroup.isDisabled());
    }

    /**

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

Reply via email to