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 / USPhoneMask.java < prev    next >
Encoding:
Java Source  |  1998-03-18  |  1.0 KB  |  41 lines

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