home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / VCAFE.3.0A / Main.bin / DateMaskedFieldConstants.java < prev    next >
Text File  |  1998-12-09  |  3KB  |  68 lines

  1. /*
  2.  * @(#DateMaskedFieldConstants.java
  3.  *
  4.  * Copyright (c) 1998 Symantec Corporation. All Rights Reserved.
  5.  *
  6.  */
  7. package com.symantec.itools.swing;
  8. import java.util.ResourceBundle;
  9.  
  10. /**
  11.  * DateMaskedFieldConstants is an useful interface which all the date masked  
  12.  * components could implement to access the common constants or directly access 
  13.  * them. 
  14.  *
  15.  * @author Vasudev J. Rao
  16.  * @version 1.0 
  17.  * @see com.symantec.itools.swing.JDateMaskedField
  18.  */
  19.  
  20. public interface DateMaskedFieldConstants 
  21. {
  22.     
  23.     /** A constant which is equal to java.sql.Types.DATE. */
  24.     public static final int DATE_TYPE = java.sql.Types.DATE ;
  25.     /** A constant which is equal to java.sql.Types.TIME. */
  26.     public static final int TIME_TYPE = java.sql.Types.TIME ;
  27.     /** A constant which is equal to java.sql.Types.TIMESTAMP. */
  28.     public static final int TIMESTAMP_TYPE = java.sql.Types.TIMESTAMP ;
  29.     
  30.     /** A useful constant which is the number of types supported. */
  31.     public static final int NUMBER_OF_TYPES = 3;
  32.     /** 
  33.      * A useful constant which is the number of formatting 
  34.      * styles currently supported. 
  35.      */
  36.     public static final int NUMBER_OF_STYLES = 5;
  37.     
  38.     /** A useful constant for custom property editors. */
  39.     public static final String DATE_TYPE_STRING = "DATE_TYPE" ;
  40.     /** A useful constant for custom property editors. */
  41.     public static final String TIME_TYPE_STRING = "TIME_TYPE" ;
  42.     /** A useful constant for custom property editors. */
  43.     public static final String TIMESTAMP_TYPE_STRING = "TIMESTAMP_TYPE" ;
  44.     
  45.     /** A useful constant for custom property editors. */
  46.     public static final String DEFAULT_STYLE_STRING = "DEFAULT" ;
  47.     /** A useful constant for custom property editors. */
  48.     public static final String FULL_STYLE_STRING = "FULL" ;
  49.     /** A useful constant for custom property editors. */
  50.     public static final String LONG_STYLE_STRING = "LONG" ;
  51.     /** A useful constant for custom property editors. */
  52.     public static final String MEDIUM_STYLE_STRING = "MEDIUM" ;
  53.     /** A useful constant for custom property editors. */
  54.     public static final String SHORT_STYLE_STRING = "SHORT" ;
  55.     
  56.     
  57.     public static DateMaskResourceLoader resourceLoader = DateMaskResourceLoader.getInstance();
  58.     public static ResourceBundle MyResource = resourceLoader.getBundle();
  59.     
  60.     /** A useful constant for constructing illegal arguments exception. */
  61.     public static String INVALID_TYPE = MyResource.getString( "DATEMASK_INVALID_TYPE" ); //"invalid type";
  62.     /** A useful constant for constructing illegal arguments exception. */
  63.     public static String INVALID_STYLE = MyResource.getString( "DATEMASK_INVALID_STYLE" );//"invalid formatting style";
  64.     /** A useful constant for constructing illegal arguments exception. */
  65.     public static String INVALID_DATE = MyResource.getString( "DATEMASK_INVALID_DATE" );//"invalid date";
  66.     
  67. }
  68.