click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r931144 - /click/trunk/click/extras/src/org/apache/click/extras/control/NumberField.java
Date Tue, 06 Apr 2010 13:24:40 GMT
Author: sabob
Date: Tue Apr  6 13:24:40 2010
New Revision: 931144

URL: http://svn.apache.org/viewvc?rev=931144&view=rev
Log:
throw UnsupportedOperationException if setMaxLength or setMinLength is called

Modified:
    click/trunk/click/extras/src/org/apache/click/extras/control/NumberField.java

Modified: click/trunk/click/extras/src/org/apache/click/extras/control/NumberField.java
URL: http://svn.apache.org/viewvc/click/trunk/click/extras/src/org/apache/click/extras/control/NumberField.java?rev=931144&r1=931143&r2=931144&view=diff
==============================================================================
--- click/trunk/click/extras/src/org/apache/click/extras/control/NumberField.java (original)
+++ click/trunk/click/extras/src/org/apache/click/extras/control/NumberField.java Tue Apr
 6 13:24:40 2010
@@ -229,6 +229,20 @@ public class NumberField extends TextFie
     // Public Attributes ------------------------------------------------------
 
     /**
+     * Operation not supported by NumberField, use {@link #setMaxValue(double)}
+     * instead.
+     *
+     * @param maxLength the maximum field length validation constraint
+     * @throws UnsupportedOperationException use {@link #setMaxValue(double)}
+     * instead
+     */
+    @Override
+    public void setMaxLength(int value) {
+        throw new UnsupportedOperationException("NumberField does not support"
+            + " maxLength(int), use setMaxValue(double) instead.");
+    }
+
+    /**
      * Return the maximum valid double field value.
      *
      * @return the maximum valid double field value
@@ -247,6 +261,20 @@ public class NumberField extends TextFie
     }
 
     /**
+     * Operation not supported by NumberField, use {@link #setMinValue(double)}
+     * instead.
+     *
+     * @param minLength the minimum field length validation constraint
+     * @throws UnsupportedOperationException use {@link #setMinValue(double)}
+     * instead
+     */
+    @Override
+    public void setMinLength(int value) {
+        throw new UnsupportedOperationException("NumberField does not support"
+            + " minLength(int), use setMinValue(double) instead.");
+    }
+
+    /**
      * Set the minimum valid double field value.
      *
      * @param value the minimum valid double field value



Mime
View raw message