tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rlewissh...@apache.org
Subject cvs commit: jakarta-tapestry/framework/src/org/apache/tapestry/valid DateValidator.java
Date Wed, 17 Dec 2003 20:24:12 GMT
rlewisshell    2003/12/17 12:24:12

  Modified:    framework/src/org/apache/tapestry/valid DateValidator.java
  Log:
  added javadoc comments for newly public methods
  
  Revision  Changes    Path
  1.7       +15 -2     jakarta-tapestry/framework/src/org/apache/tapestry/valid/DateValidator.java
  
  Index: DateValidator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/org/apache/tapestry/valid/DateValidator.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DateValidator.java	17 Dec 2003 19:53:02 -0000	1.6
  +++ DateValidator.java	17 Dec 2003 20:24:12 -0000	1.7
  @@ -104,6 +104,12 @@
           return _format;
       }
   
  +	/**
  +	 * @return the {@link DateFormat} the validator will use, returning the default if no
  +	 * other date format is specified via {@link #setFormat(DateFormat)}
  +	 * 
  +	 * @since 3.0
  +	 */
       public DateFormat getEffectiveFormat()
       {
           if (_format == null)
  @@ -122,12 +128,19 @@
           _displayFormat = value;
       }
   
  +	/**
  +     * @return the display format message the validator will use, returning the default
if no
  +     * other display format message is specified.  The default is the {@link SimpleDateFormat#toPattern()}
  +     * for {@link SimpleDateFormat}s, or "MM/DD/YYYY" for unknown {@link DateFormat} subclasses.
  +     * 
  +     * @since 3.0
  +     */
       public String getEffectiveDisplayFormat()
       {
           if (_displayFormat == null)
           {
               DateFormat format = getEffectiveFormat();
  -            if (format instanceof SimpleDateFormat /* && format != defaultDateFormat
*/) 
  +            if (format instanceof SimpleDateFormat) 
                   return ((SimpleDateFormat)format).toPattern();
               else
                   return defaultDateDisplayFormat;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Mime
View raw message