You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by tv...@apache.org on 2009/03/26 19:32:54 UTC

svn commit: r758790 - in /incubator/pivot/branches/1.1: ./ tutorials/src/pivot/tutorials/ tutorials/src/pivot/tutorials/stocktracker/ wtk/src/pivot/wtk/media/drawing/ wtk/src/pivot/wtk/text/validation/

Author: tvolkert
Date: Thu Mar 26 18:32:46 2009
New Revision: 758790

URL: http://svn.apache.org/viewvc?rev=758790&view=rev
Log:
Cross-ported recent changes on trunk to the 1.1 branch

Added:
    incubator/pivot/branches/1.1/LICENSE
    incubator/pivot/branches/1.1/NOTICE
    incubator/pivot/branches/1.1/README
    incubator/pivot/branches/1.1/RELEASE-NOTES
Removed:
    incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Rotation.java
    incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Scale.java
    incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Transform.java
    incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Translation.java
Modified:
    incubator/pivot/branches/1.1/build.xml
    incubator/pivot/branches/1.1/tutorials/src/pivot/tutorials/stocktracker/StockQuote.java
    incubator/pivot/branches/1.1/tutorials/src/pivot/tutorials/stocktracker/StockQuoteView.java
    incubator/pivot/branches/1.1/tutorials/src/pivot/tutorials/text.wtkx
    incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Clone.java
    incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Group.java
    incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Rectangle.java
    incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Shape.java
    incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Text.java
    incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/DecimalValidator.java
    incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/DoubleRangeValidator.java
    incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/DoubleValidator.java
    incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/FloatRangeValidator.java
    incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/FloatValidator.java
    incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/FormattedValidator.java
    incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/IntRangeValidator.java
    incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/IntValidator.java
    incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/RegexTextValidator.java
    incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/Validator.java

Added: incubator/pivot/branches/1.1/LICENSE
URL: http://svn.apache.org/viewvc/incubator/pivot/branches/1.1/LICENSE?rev=758790&view=auto
==============================================================================
--- incubator/pivot/branches/1.1/LICENSE (added)
+++ incubator/pivot/branches/1.1/LICENSE Thu Mar 26 18:32:46 2009
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

Added: incubator/pivot/branches/1.1/NOTICE
URL: http://svn.apache.org/viewvc/incubator/pivot/branches/1.1/NOTICE?rev=758790&view=auto
==============================================================================
    (empty)

Added: incubator/pivot/branches/1.1/README
URL: http://svn.apache.org/viewvc/incubator/pivot/branches/1.1/README?rev=758790&view=auto
==============================================================================
    (empty)

Added: incubator/pivot/branches/1.1/RELEASE-NOTES
URL: http://svn.apache.org/viewvc/incubator/pivot/branches/1.1/RELEASE-NOTES?rev=758790&view=auto
==============================================================================
--- incubator/pivot/branches/1.1/RELEASE-NOTES (added)
+++ incubator/pivot/branches/1.1/RELEASE-NOTES Thu Mar 26 18:32:46 2009
@@ -0,0 +1,16 @@
+================================================================================
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+================================================================================

Modified: incubator/pivot/branches/1.1/build.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/branches/1.1/build.xml?rev=758790&r1=758789&r2=758790&view=diff
==============================================================================
--- incubator/pivot/branches/1.1/build.xml (original)
+++ incubator/pivot/branches/1.1/build.xml Thu Mar 26 18:32:46 2009
@@ -3,6 +3,8 @@
     <property name="src" value="src"/>
     <property name="bin" value="ant-bin"/>
     <property name="lib" value="lib"/>
+    <property name="dist" value="dist"/>
+    <property name="deploy" value="deploy"/>
 
     <property name="doc" value="doc"/>
     <property name="charts" value="charts"/>
@@ -22,10 +24,9 @@
     <property name="storepass" value="keystore"/>
     <property name="alias" value="myself"/>
 
-    <property name="deploy" value="${user.home}/${ant.project.name}-deploy"/>
-
     <tstamp/>
     <property file="build.properties"/>
+    <property name="release" value="apache-${ant.project.name}-${version}-incubating"/>
 
     <!-- Compiler properties -->
     <property name="compiler.optimize" value="true"/>
@@ -65,9 +66,6 @@
               ]]>
             </header>
         </javadoc>
-
-        <delete file="${ant.project.name}_${version}-${doc}.zip"/>
-        <zip destfile="${ant.project.name}_${version}-${doc}.zip" basedir="doc"/>
     </target>
 
     <!-- Build charts library -->
@@ -126,9 +124,9 @@
             failonerror="true">
             <compilerarg value="-Xlint"/>
             <classpath>
-                <pathelement location="charts/pivot-charts.jar"/>
-                <pathelement location="core/pivot-core.jar"/>
-                <pathelement location="wtk/pivot-wtk.jar"/>
+                <pathelement location="charts/${bin}"/>
+                <pathelement location="core/${bin}"/>
+                <pathelement location="wtk/${bin}"/>
             </classpath>
         </javac>
 
@@ -479,9 +477,9 @@
             failonerror="true">
             <compilerarg value="-Xlint"/>
             <classpath>
-                <pathelement location="core/pivot-core.jar"/>
-                <pathelement location="web/pivot-web.jar"/>
-                <pathelement location="wtk/pivot-wtk.jar"/>
+                <pathelement location="core/${bin}"/>
+                <pathelement location="web/${bin}"/>
+                <pathelement location="wtk/${bin}"/>
                 <pathelement location="demos/lib/flex-messaging-common.jar"/>
                 <pathelement location="demos/lib/flex-messaging-core.jar"/>
                 <pathelement location="demos/lib/gdata-base-1.0.jar"/>
@@ -529,9 +527,9 @@
             failonerror="true">
             <compilerarg value="-Xlint"/>
             <classpath>
-                <pathelement location="core/pivot-core.jar"/>
-                <pathelement location="web/pivot-web.jar"/>
-                <pathelement location="wtk/pivot-wtk.jar"/>
+                <pathelement location="core/${bin}"/>
+                <pathelement location="web/${bin}"/>
+                <pathelement location="wtk/${bin}"/>
             </classpath>
         </javac>
 
@@ -587,9 +585,9 @@
             failonerror="true">
             <compilerarg value="-Xlint"/>
             <classpath>
-                <pathelement location="core/pivot-core.jar"/>
-                <pathelement location="web/pivot-web.jar"/>
-                <pathelement location="wtk/pivot-wtk.jar"/>
+                <pathelement location="core/${bin}"/>
+                <pathelement location="web/${bin}"/>
+                <pathelement location="wtk/${bin}"/>
             </classpath>
         </javac>
 
@@ -615,39 +613,99 @@
 
     <!-- Package all binaries and source -->
     <target name="package" depends="trim-whitespace, clean, build, doc">
-        <delete file="${ant.project.name}_${version}.zip"/>
-        <zip destfile="${ant.project.name}_${version}.zip">
-            <fileset dir=".">
-                <include name="pivot.sh"/>
-                <include name="pivot.bat"/>
-            </fileset>
-            <fileset dir="${charts}">
-                <include name="${ant.project.name}-charts.jar"/>
-            </fileset>
-            <fileset dir="${core}">
-                <include name="${ant.project.name}-core.jar"/>
-            </fileset>
-            <fileset dir="${web}">
-                <include name="${ant.project.name}-web.jar"/>
-                <include name="${ant.project.name}-web.server.jar"/>
-            </fileset>
-            <fileset dir="${wtk}">
-                <include name="${ant.project.name}-wtk.jar"/>
-                <include name="${ant.project.name}-wtk.terra.jar"/>
-            </fileset>
-            <fileset dir="${tools}">
-                <include name="${ant.project.name}-tools.jar"/>
-            </fileset>
+        <delete dir="${dist}/${release}"/>
+        <mkdir dir="${dist}/${release}"/>
+
+        <!-- Package binaries -->
+        <fileset dir="." id="bin">
+            <include name="pivot.sh"/>
+            <include name="pivot.bat"/>
+            <include name="README"/>
+            <include name="RELEASE-NOTES"/>
+        </fileset>
+        <fileset dir="." id="legal">
+            <include name="LICENSE"/>
+            <include name="NOTICE"/>
+        </fileset>
+        <fileset dir="${charts}" id="charts">
+            <include name="${ant.project.name}-charts.jar"/>
+        </fileset>
+        <fileset dir="${core}" id="core">
+            <include name="${ant.project.name}-core.jar"/>
+        </fileset>
+        <fileset dir="${web}" id="web">
+            <include name="${ant.project.name}-web.jar"/>
+            <include name="${ant.project.name}-web.server.jar"/>
+        </fileset>
+        <fileset dir="${wtk}" id="wtk">
+            <include name="${ant.project.name}-wtk.jar"/>
+            <include name="${ant.project.name}-wtk.terra.jar"/>
+        </fileset>
+        <fileset dir="${tools}" id="tools">
+            <include name="${ant.project.name}-tools.jar"/>
+        </fileset>
+
+        <zip destfile="${dist}/${release}/${release}.zip">
+            <fileset refid="bin"/>
+            <fileset refid="legal"/>
+            <fileset refid="charts"/>
+            <fileset refid="core"/>
+            <fileset refid="web"/>
+            <fileset refid="wtk"/>
+            <fileset refid="tools"/>
         </zip>
+        <checksum file="${dist}/${release}/${release}.zip" algorithm="md5"/>
+
+        <tar destfile="${dist}/${release}/${release}.tar">
+            <fileset refid="bin"/>
+            <fileset refid="legal"/>
+            <fileset refid="charts"/>
+            <fileset refid="core"/>
+            <fileset refid="web"/>
+            <fileset refid="wtk"/>
+            <fileset refid="tools"/>
+        </tar>
+        <gzip src="${dist}/${release}/${release}.tar" destfile="${dist}/${release}/${release}.tar.gz"/>
+        <delete file="${dist}/${release}/${release}.tar"/>
+        <checksum file="${dist}/${release}/${release}.tar.gz" algorithm="md5"/>
 
         <!-- Package source -->
-        <delete file="${ant.project.name}_${version}-src.zip"/>
-        <zip destfile="${ant.project.name}_${version}-src.zip">
-            <fileset dir="${charts}/${src}"/>
-            <fileset dir="${core}/${src}"/>
-            <fileset dir="${web}/${src}"/>
-            <fileset dir="${wtk}/${src}"/>
+        <fileset dir="${charts}/${src}" id="charts-src"/>
+        <fileset dir="${core}/${src}" id="core-src"/>
+        <fileset dir="${web}/${src}" id="web-src"/>
+        <fileset dir="${wtk}/${src}" id="wtk-src"/>
+        <fileset dir="${tools}/${src}" id="tools-src"/>
+
+        <zip destfile="${dist}/${release}/${release}-src.zip">
+            <fileset refid="legal"/>
+            <fileset refid="charts-src"/>
+            <fileset refid="core-src"/>
+            <fileset refid="web-src"/>
+            <fileset refid="wtk-src"/>
+            <fileset refid="tools-src"/>
         </zip>
+        <checksum file="${dist}/${release}/${release}-src.zip" algorithm="md5"/>
+
+        <tar destfile="${dist}/${release}/${release}-src.tar">
+            <fileset refid="legal"/>
+            <fileset refid="charts-src"/>
+            <fileset refid="core-src"/>
+            <fileset refid="web-src"/>
+            <fileset refid="wtk-src"/>
+            <fileset refid="tools-src"/>
+        </tar>
+        <gzip src="${dist}/${release}/${release}-src.tar" destfile="${dist}/${release}/${release}-src.tar.gz"/>
+        <delete file="${dist}/${release}/${release}-src.tar"/>
+        <checksum file="${dist}/${release}/${release}-src.tar.gz" algorithm="md5"/>
+
+        <!-- Package Javadoc -->
+        <zip destfile="${dist}/${release}/${release}-doc.zip" basedir="doc"/>
+        <checksum file="${dist}/${release}/${release}-doc.zip" algorithm="md5"/>
+
+        <tar destfile="${dist}/${release}/${release}-doc.tar" basedir="doc"/>
+        <gzip src="${dist}/${release}/${release}-doc.tar" destfile="${dist}/${release}/${release}-doc.tar.gz"/>
+        <delete file="${dist}/${release}/${release}-doc.tar"/>
+        <checksum file="${dist}/${release}/${release}-doc.tar.gz" algorithm="md5"/>
     </target>
 
     <!-- Generate deployment files for online demos and tutorials -->

Modified: incubator/pivot/branches/1.1/tutorials/src/pivot/tutorials/stocktracker/StockQuote.java
URL: http://svn.apache.org/viewvc/incubator/pivot/branches/1.1/tutorials/src/pivot/tutorials/stocktracker/StockQuote.java?rev=758790&r1=758789&r2=758790&view=diff
==============================================================================
--- incubator/pivot/branches/1.1/tutorials/src/pivot/tutorials/stocktracker/StockQuote.java (original)
+++ incubator/pivot/branches/1.1/tutorials/src/pivot/tutorials/stocktracker/StockQuote.java Thu Mar 26 18:32:46 2009
@@ -62,7 +62,11 @@
     }
 
     public void setOpeningValue(String openingValue) {
-        setOpeningValue(Float.parseFloat(openingValue));
+        try {
+            setOpeningValue(Float.parseFloat(openingValue));
+        } catch(NumberFormatException exception) {
+            setOpeningValue(Float.NaN);
+        }
     }
 
     public float getHighValue() {
@@ -74,7 +78,11 @@
     }
 
     public void setHighValue(String highValue) {
-        setHighValue(Float.parseFloat(highValue));
+        try {
+            setHighValue(Float.parseFloat(highValue));
+        } catch(NumberFormatException exception) {
+            setHighValue(Float.NaN);
+        }
     }
 
     public float getLowValue() {
@@ -86,7 +94,11 @@
     }
 
     public void setLowValue(String lowValue) {
-        setLowValue(Float.parseFloat(lowValue));
+        try {
+            setLowValue(Float.parseFloat(lowValue));
+        } catch(NumberFormatException exception) {
+            setLowValue(Float.NaN);
+        }
     }
 
     public float getChange() {

Modified: incubator/pivot/branches/1.1/tutorials/src/pivot/tutorials/stocktracker/StockQuoteView.java
URL: http://svn.apache.org/viewvc/incubator/pivot/branches/1.1/tutorials/src/pivot/tutorials/stocktracker/StockQuoteView.java?rev=758790&r1=758789&r2=758790&view=diff
==============================================================================
--- incubator/pivot/branches/1.1/tutorials/src/pivot/tutorials/stocktracker/StockQuoteView.java (original)
+++ incubator/pivot/branches/1.1/tutorials/src/pivot/tutorials/stocktracker/StockQuoteView.java Thu Mar 26 18:32:46 2009
@@ -46,7 +46,12 @@
                 || key.equals("highValue")
                 || key.equals("lowValue")) {
                 try {
-                    value = valueFormat.format((Number)value);
+                    Float floatValue = (Float)value;
+                    if (floatValue.isNaN()) {
+                        value = "n/a";
+                    } else {
+                        value = valueFormat.format(floatValue);
+                    }
                 } catch(Exception exception) {
                     value = "";
                 }

Modified: incubator/pivot/branches/1.1/tutorials/src/pivot/tutorials/text.wtkx
URL: http://svn.apache.org/viewvc/incubator/pivot/branches/1.1/tutorials/src/pivot/tutorials/text.wtkx?rev=758790&r1=758789&r2=758790&view=diff
==============================================================================
--- incubator/pivot/branches/1.1/tutorials/src/pivot/tutorials/text.wtkx (original)
+++ incubator/pivot/branches/1.1/tutorials/src/pivot/tutorials/text.wtkx Thu Mar 26 18:32:46 2009
@@ -15,7 +15,9 @@
 limitations under the License.
 -->
 
-<FlowPane xmlns:wtkx="http://pivot-toolkit.org/wtkx/2008" xmlns="pivot.wtk">
+<FlowPane xmlns:wtkx="http://pivot-toolkit.org/wtkx/2008"
+    xmlns:validation="pivot.wtk.text.validation"
+    xmlns="pivot.wtk">
     <Border>
         <content>
             <FlowPane orientation="vertical" styles="{horizontalAlignment:'justify', padding:{top:2, left:4, bottom:12, right:4}}">
@@ -28,6 +30,14 @@
 	                        <TextInput Form.name="Password"
 	                            Form.flag="{messageType:'info', message:'This field has a maximum length of 12 characters.'}"
 	                            password="true" text="pivot" textSize="12" maximumLength="12" />
+                            <TextInput Form.name="Password" Form.flag="{messageType:'info', message:'This field only accepts numeric values from 0 through 9.'}"
+                                text="5" textSize="12" maximumLength="6">
+                                <validator>
+                                    <validation:RegexTextValidator>
+                                        <pattern><![CDATA[[0-9]]]></pattern>
+                                    </validation:RegexTextValidator>
+                                </validator>
+                            </TextInput>
                         </Form.Section>
                     </sections>
                 </Form>

Modified: incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Clone.java
URL: http://svn.apache.org/viewvc/incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Clone.java?rev=758790&r1=758789&r2=758790&view=diff
==============================================================================
--- incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Clone.java (original)
+++ incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Clone.java Thu Mar 26 18:32:46 2009
@@ -17,12 +17,10 @@
 
 import java.awt.Graphics2D;
 
-import pivot.wtk.Bounds;
-
 /**
  * Shape representing a copy of another shape.
- * <p>
- * TODO Throw in setStroke() and setFill()?
+ *
+ * @author gbrown
  */
 public class Clone extends Shape {
     private Shape source = null;
@@ -35,23 +33,18 @@
         this.source = source;
     }
 
-    @Override
-    public Bounds getUntransformedBounds() {
-        return (source == null) ? new Bounds(0, 0, 0, 0) : source.getUntransformedBounds();
+    public int getWidth() {
+        // TODO
+        return 0;
     }
 
-    @Override
-    public void fill(Graphics2D graphics) {
-        if (source != null) {
-            source.fill(graphics);
-        }
+    public int getHeight() {
+        // TODO
+        return 0;
     }
 
-    @Override
-    public void stroke(Graphics2D graphics) {
-        if (source != null) {
-            source.stroke(graphics);
-        }
+    public void paint(Graphics2D graphics) {
+        // TODO
     }
 
     @Override

Modified: incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Group.java
URL: http://svn.apache.org/viewvc/incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Group.java?rev=758790&r1=758789&r2=758790&view=diff
==============================================================================
--- incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Group.java (original)
+++ incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Group.java Thu Mar 26 18:32:46 2009
@@ -21,40 +21,27 @@
 import pivot.collections.ArrayList;
 import pivot.collections.Sequence;
 import pivot.util.ImmutableIterator;
-import pivot.wtk.Bounds;
 
 /**
  * Shape representing a collection of other shapes.
- * <p>
- * TODO Throw in setStroke() and setFill()?
+ *
+ * @author gbrown
  */
 public class Group extends Shape implements Sequence<Shape>, Iterable<Shape> {
     private ArrayList<Shape> shapes = new ArrayList<Shape>();
 
-    public Bounds getUntransformedBounds() {
+    public int getWidth() {
         // TODO
-        return null;
+        return 0;
     }
 
-    public void paint(Graphics2D graphics) {
-        for (Shape shape : this) {
-            Graphics2D shapeGraphics = (Graphics2D)graphics.create();
-
-            // TODO Translate to origin, then apply transform to graphics
-
-            // TODO Only paint if shape bounds intersects clip bounds
-
-            shape.paint(shapeGraphics);
-            shapeGraphics.dispose();
-        }
-    }
-
-    public void fill(Graphics2D graphics) {
-        // No-op
+    public int getHeight() {
+        // TODO
+        return 0;
     }
 
-    public void stroke(Graphics2D graphics) {
-        // No-op
+    public void paint(Graphics2D graphics) {
+        // TODO
     }
 
     public int add(Shape shape) {

Modified: incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Rectangle.java
URL: http://svn.apache.org/viewvc/incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Rectangle.java?rev=758790&r1=758789&r2=758790&view=diff
==============================================================================
--- incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Rectangle.java (original)
+++ incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Rectangle.java Thu Mar 26 18:32:46 2009
@@ -17,7 +17,6 @@
 
 import java.awt.Graphics2D;
 
-import pivot.wtk.Bounds;
 import pivot.wtk.Dimensions;
 
 /**
@@ -70,19 +69,8 @@
         setSize(size.width, size.height);
     }
 
-    @Override
-    public Bounds getUntransformedBounds() {
-        return new Bounds(getX(), getY(), width, height);
-    }
-
-    @Override
-    public void fill(Graphics2D graphics) {
-        graphics.fillRect(getX(), getY(), width, height);
-    }
-
-    @Override
-    public void stroke(Graphics2D graphics) {
-        graphics.drawRect(getX(), getY(), width, height);
+    public void paint(Graphics2D graphics) {
+        // TODO
     }
 
     @Override

Modified: incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Shape.java
URL: http://svn.apache.org/viewvc/incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Shape.java?rev=758790&r1=758789&r2=758790&view=diff
==============================================================================
--- incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Shape.java (original)
+++ incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Shape.java Thu Mar 26 18:32:46 2009
@@ -15,75 +15,20 @@
  */
 package pivot.wtk.media.drawing;
 
-import java.awt.BasicStroke;
 import java.awt.Color;
-import java.awt.Graphics2D;
 import java.awt.Paint;
-import java.util.Iterator;
+import java.awt.geom.AffineTransform;
 
-import pivot.collections.Sequence;
 import pivot.wtk.Bounds;
 import pivot.wtk.Point;
+import pivot.wtk.Visual;
 
 /**
  * Abstract base class for shapes.
  *
  * @author gbrown
  */
-public abstract class Shape {
-    public static final class TransformSequence extends Transform
-        implements Sequence<Transform>, Iterable<Transform> {
-        public float[][] getMatrix() {
-            // TODO
-            return null;
-        }
-
-        public int add(Transform item) {
-            // TODO Auto-generated method stub
-            return 0;
-        }
-
-        public void insert(Transform item, int index) {
-            // TODO Auto-generated method stub
-
-        }
-
-        public Transform update(int index, Transform item) {
-            // TODO Auto-generated method stub
-            return null;
-        }
-
-        public int remove(Transform item) {
-            // TODO Auto-generated method stub
-            return 0;
-        }
-
-        public Sequence<Transform> remove(int index, int count) {
-            // TODO Auto-generated method stub
-            return null;
-        }
-
-        public Transform get(int index) {
-            // TODO Auto-generated method stub
-            return null;
-        }
-
-        public int indexOf(Transform item) {
-            // TODO Auto-generated method stub
-            return 0;
-        }
-
-        public int getLength() {
-            // TODO Auto-generated method stub
-            return 0;
-        }
-
-        public Iterator<Transform> iterator() {
-            // TODO
-            return null;
-        }
-    }
-
+public abstract class Shape implements Visual {
     private Group parent = null;
 
     private int x = 0;
@@ -93,7 +38,11 @@
     private Paint stroke = Color.BLACK;
     private int strokeThickness = 1;
 
-    private TransformSequence transform = new TransformSequence();
+    private double rotation = 0;
+    private double scaleX = 0;
+    private double scaleY = 0;
+    private double translateX = 0;
+    private double translateY = 0;
 
     public Group getParent() {
         return parent;
@@ -136,6 +85,18 @@
         setOrigin(origin.x, origin.y);
     }
 
+    public Bounds getBounds() {
+        // TODO Transform untransformed bounds
+        return null;
+    }
+
+    public AffineTransform getTransform() {
+        // TODO
+        return null;
+    }
+
+    public abstract boolean contains(int x, int y);
+
     public Paint getFill() {
         return fill;
     }
@@ -172,32 +133,51 @@
         setStroke(Color.decode(stroke));
     }
 
-    public Bounds getBounds() {
-        // TODO Transform untransformed bounds
-        return null;
+    public int getStrokeThickness() {
+        return strokeThickness;
     }
 
-    public abstract Bounds getUntransformedBounds();
+    public void setStrokeThickness(int strokeThickness) {
+        this.strokeThickness = strokeThickness;
+    }
 
-    public TransformSequence getTransform() {
-        return transform;
+    public double getRotation() {
+        return rotation;
     }
 
-    public void paint(Graphics2D graphics) {
-        if (fill != null) {
-            graphics.setPaint(fill);
-            fill(graphics);
-        }
+    public void setRotation(double rotation) {
+        this.rotation = rotation;
+    }
 
-        if (stroke != null) {
-            graphics.setPaint(stroke);
-            graphics.setStroke(new BasicStroke(strokeThickness));
-            stroke(graphics);
-        }
+    public double getScaleX() {
+        return scaleX;
     }
 
-    public abstract void fill(Graphics2D graphics);
-    public abstract void stroke(Graphics2D graphics);
+    public void setScaleX(double scaleX) {
+        this.scaleX = scaleX;
+    }
 
-    public abstract boolean contains(int x, int y);
+    public double getScaleY() {
+        return scaleY;
+    }
+
+    public void setScaleY(double scaleY) {
+        this.scaleY = scaleY;
+    }
+
+    public double getTranslateX() {
+        return translateX;
+    }
+
+    public void setTranslateX(double translateX) {
+        this.translateX = translateX;
+    }
+
+    public double getTranslateY() {
+        return translateY;
+    }
+
+    public void setTranslateY(double translateY) {
+        this.translateY = translateY;
+    }
 }

Modified: incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Text.java
URL: http://svn.apache.org/viewvc/incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Text.java?rev=758790&r1=758789&r2=758790&view=diff
==============================================================================
--- incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Text.java (original)
+++ incubator/pivot/branches/1.1/wtk/src/pivot/wtk/media/drawing/Text.java Thu Mar 26 18:32:46 2009
@@ -18,8 +18,6 @@
 import java.awt.Font;
 import java.awt.Graphics2D;
 
-import pivot.wtk.Bounds;
-
 /**
  * Shape representing a block of text.
  * <p>
@@ -61,22 +59,18 @@
         this.wrapWidth = wrapWidth;
     }
 
-    @Override
-    public Bounds getUntransformedBounds() {
-        // TODO Apply font as needed
-        // TODO Wrap text as needed
-
-        return null;
+    public int getWidth() {
+        // TODO
+        return 0;
     }
 
-    @Override
-    public void fill(Graphics2D graphics) {
-        // TODO Auto-generated method stub
+    public int getHeight() {
+        // TODO
+        return 0;
     }
 
-    @Override
-    public void stroke(Graphics2D graphics) {
-        // TODO Auto-generated method stub
+    public void paint(Graphics2D graphics) {
+        // TODO
     }
 
     @Override

Modified: incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/DecimalValidator.java
URL: http://svn.apache.org/viewvc/incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/DecimalValidator.java?rev=758790&r1=758789&r2=758790&view=diff
==============================================================================
--- incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/DecimalValidator.java (original)
+++ incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/DecimalValidator.java Thu Mar 26 18:32:46 2009
@@ -18,10 +18,12 @@
 import java.text.ParseException;
 
 /**
+ * A validator for decimal values.
  *
  * @author Noel Grandin
  */
 public abstract class DecimalValidator extends FormattedValidator<NumberFormat> {
+
     protected DecimalValidator(DecimalFormat format) {
         super(format);
     }

Modified: incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/DoubleRangeValidator.java
URL: http://svn.apache.org/viewvc/incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/DoubleRangeValidator.java?rev=758790&r1=758789&r2=758790&view=diff
==============================================================================
--- incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/DoubleRangeValidator.java (original)
+++ incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/DoubleRangeValidator.java Thu Mar 26 18:32:46 2009
@@ -14,17 +14,39 @@
 package pivot.wtk.text.validation;
 
 /**
+ * A validator for a double value limited to a range.
  *
  * @author Noel Grandin
  */
 public class DoubleRangeValidator extends DoubleValidator {
-    private final double minValue, maxValue;
+    private double minValue, maxValue;
+
+    public DoubleRangeValidator() {
+        this.minValue = 0;
+        this.maxValue = 1;
+    }
 
     public DoubleRangeValidator(double minValue, double maxValue) {
         this.minValue = minValue;
         this.maxValue = maxValue;
     }
 
+    public double getMinimum() {
+        return minValue;
+    }
+
+    public void setMinimum(double minValue) {
+        this.minValue = minValue;
+    }
+
+    public double getMaximum() {
+        return maxValue;
+    }
+
+    public void setMaximum(double maxValue) {
+        this.maxValue = maxValue;
+    }
+
     @Override
     public boolean isValid(String text) {
         boolean valid = false;

Modified: incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/DoubleValidator.java
URL: http://svn.apache.org/viewvc/incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/DoubleValidator.java?rev=758790&r1=758789&r2=758790&view=diff
==============================================================================
--- incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/DoubleValidator.java (original)
+++ incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/DoubleValidator.java Thu Mar 26 18:32:46 2009
@@ -14,6 +14,7 @@
 package pivot.wtk.text.validation;
 
 /**
+ * A validator for a double value.
  *
  * @author Noel Grandin
  */

Modified: incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/FloatRangeValidator.java
URL: http://svn.apache.org/viewvc/incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/FloatRangeValidator.java?rev=758790&r1=758789&r2=758790&view=diff
==============================================================================
--- incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/FloatRangeValidator.java (original)
+++ incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/FloatRangeValidator.java Thu Mar 26 18:32:46 2009
@@ -14,17 +14,39 @@
 package pivot.wtk.text.validation;
 
 /**
+ * A validator for a float value limited to a range.
  *
  * @author Noel Grandin
  */
 public class FloatRangeValidator extends FloatValidator {
-    private final float minValue, maxValue;
+    private float minValue, maxValue;
+
+    public FloatRangeValidator() {
+        this.minValue = 0;
+        this.maxValue = 1;
+    }
 
     public FloatRangeValidator(float minValue, float maxValue) {
         this.minValue = minValue;
         this.maxValue = maxValue;
     }
 
+    public float getMinimum() {
+        return minValue;
+    }
+
+    public void setMinimum(float minValue) {
+        this.minValue = minValue;
+    }
+
+    public float getMaximum() {
+        return maxValue;
+    }
+
+    public void setMaximum(float maxValue) {
+        this.maxValue = maxValue;
+    }
+
     @Override
     public boolean isValid(String text) {
         boolean valid = false;

Modified: incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/FloatValidator.java
URL: http://svn.apache.org/viewvc/incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/FloatValidator.java?rev=758790&r1=758789&r2=758790&view=diff
==============================================================================
--- incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/FloatValidator.java (original)
+++ incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/FloatValidator.java Thu Mar 26 18:32:46 2009
@@ -14,6 +14,7 @@
 package pivot.wtk.text.validation;
 
 /**
+ * A validator for a float value.
  *
  * @author Noel Grandin
  */

Modified: incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/FormattedValidator.java
URL: http://svn.apache.org/viewvc/incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/FormattedValidator.java?rev=758790&r1=758789&r2=758790&view=diff
==============================================================================
--- incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/FormattedValidator.java (original)
+++ incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/FormattedValidator.java Thu Mar 26 18:32:46 2009
@@ -13,16 +13,20 @@
  */
 package pivot.wtk.text.validation;
 
+import java.text.Format;
 import java.text.ParsePosition;
 
 /**
+ * A validator for a {@link java.text.Format}'ed value.
+ * <p>
+ * This class is mostly intended to be a base-class for other validators.
  *
  * @author Noel Grandin
  */
-public abstract class FormattedValidator<TFormat extends java.text.Format> implements Validator {
-    protected final TFormat format;
+public abstract class FormattedValidator<F extends Format> implements Validator {
+    protected final F format;
 
-    protected FormattedValidator(TFormat format) {
+    protected FormattedValidator(F format) {
         this.format = format;
     }
 

Modified: incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/IntRangeValidator.java
URL: http://svn.apache.org/viewvc/incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/IntRangeValidator.java?rev=758790&r1=758789&r2=758790&view=diff
==============================================================================
--- incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/IntRangeValidator.java (original)
+++ incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/IntRangeValidator.java Thu Mar 26 18:32:46 2009
@@ -14,17 +14,39 @@
 package pivot.wtk.text.validation;
 
 /**
+ * A validator for an int value limited to a range.
  *
  * @author Noel Grandin
  */
 public class IntRangeValidator extends IntValidator {
-    private final int minValue, maxValue;
+    private int minValue, maxValue;
+
+    public IntRangeValidator() {
+        this.minValue = 0;
+        this.maxValue = 1;
+    }
 
     public IntRangeValidator(int minValue, int maxValue) {
         this.minValue = minValue;
         this.maxValue = maxValue;
     }
 
+    public int getMinimum() {
+        return minValue;
+    }
+
+    public void setMinimum(int minValue) {
+        this.minValue = minValue;
+    }
+
+    public int getMaximum() {
+        return maxValue;
+    }
+
+    public void setMaximum(int maxValue) {
+        this.maxValue = maxValue;
+    }
+
     @Override
     public boolean isValid(String text) {
         boolean valid = false;

Modified: incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/IntValidator.java
URL: http://svn.apache.org/viewvc/incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/IntValidator.java?rev=758790&r1=758789&r2=758790&view=diff
==============================================================================
--- incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/IntValidator.java (original)
+++ incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/IntValidator.java Thu Mar 26 18:32:46 2009
@@ -14,6 +14,7 @@
 package pivot.wtk.text.validation;
 
 /**
+ * A validator for an int value.
  *
  * @author Noel Grandin
  */

Modified: incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/RegexTextValidator.java
URL: http://svn.apache.org/viewvc/incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/RegexTextValidator.java?rev=758790&r1=758789&r2=758790&view=diff
==============================================================================
--- incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/RegexTextValidator.java (original)
+++ incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/RegexTextValidator.java Thu Mar 26 18:32:46 2009
@@ -14,13 +14,19 @@
 package pivot.wtk.text.validation;
 
 import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
 
 /**
+ * A validator for a regular expression.
  *
+ * @see Pattern
  * @author Noel Grandin
  */
 public class RegexTextValidator implements Validator {
-    private final Pattern p;
+    private Pattern p;
+
+    public RegexTextValidator() {
+    }
 
     public RegexTextValidator(Pattern p) {
         this.p = p;
@@ -30,6 +36,22 @@
         this.p = Pattern.compile(regexPattern);
     }
 
+    public Pattern getPattern() {
+        return p;
+    }
+
+    public void setPattern(Pattern pattern) {
+        this.p = pattern;
+    }
+
+    /**
+     * @throws PatternSyntaxException
+     *             If the expression's syntax is invalid
+     */
+    public void setPattern(String regexPattern) {
+        this.p = Pattern.compile(regexPattern);
+    }
+
     public boolean isValid(String text) {
         return p.matcher(text).matches();
     }

Modified: incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/Validator.java
URL: http://svn.apache.org/viewvc/incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/Validator.java?rev=758790&r1=758789&r2=758790&view=diff
==============================================================================
--- incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/Validator.java (original)
+++ incubator/pivot/branches/1.1/wtk/src/pivot/wtk/text/validation/Validator.java Thu Mar 26 18:32:46 2009
@@ -14,11 +14,24 @@
 package pivot.wtk.text.validation;
 
 /**
- * Validation interface for TextInput widget.
+ * Validation interface for text components. Allows the programmer to specify
+ * constraints on text data.
+ * <p>
+ * This is indicated visually to the user (a red background would be typical),
+ * and events are fired by the TextInput if the programmer wishes to take
+ * further action.
  *
  * @author Noel Grandin
  */
 public interface Validator {
-    /** Is the text value valid? */
+    /**
+     * Determines if a text value is valid based on the rules of the
+     * validator.
+     *
+     * @param text
+     *
+     * @return
+     * <tt>true</tt> if the value is valid; <tt>false</tt>, otherwise.
+     */
     public boolean isValid(String text);
 }