home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / VCafe / prosrc.bin / DateMask.java < prev    next >
Encoding:
Java Source  |  1998-03-18  |  992 b   |  40 lines

  1. /*
  2.  * @(#DataMask.java
  3.  *
  4.  * Copyright (c) 1997 Symantec Corporation. All Rights Reserved.
  5.  *
  6.  */
  7.  
  8.  
  9. package symantec.itools.db.awt;
  10.  
  11.  
  12. /**
  13.  * Creates a formatted text field in which your user can type in a date.
  14.  * DateMask limits the type of text that can be entered in the text
  15.  * box to a year-mo-day format number.
  16.  * Text formatting logic is applied to the user input.
  17.  * If the text field already contains text, the user can select the default text
  18.  * and delete or edit it.
  19.  */
  20. public class DateMask extends symantec.itools.db.awt.FormattedTextField
  21. {
  22.     /**
  23.      * Create date text field.  This is a formatted text field
  24.      * with the following format: 9999/-99/-99
  25.      */
  26.     public DateMask()
  27.     {
  28.         super(10);
  29.         super.setMask("9999/-99/-99");
  30.     }
  31.  
  32.     /**
  33.      * Takes no action.  Overrides setMask in FormattedTextField to prevent
  34.      * alteration of the date mask.
  35.      */
  36.     public void setMask(String s)
  37.     {
  38.     }
  39. }
  40.