com.isti.util.gui.textvalidator
Class TextSQLDateValidator

java.lang.Object
  extended by com.isti.util.gui.textvalidator.TextBasicValidator
      extended by com.isti.util.gui.textvalidator.TextSQLDateValidator
All Implemented Interfaces:
AllowedCharactersConstants, TextValidator, StringConstants

public class TextSQLDateValidator
extends TextBasicValidator

Class TextSQLDateValidator defines methods to validate SQL Date text.


Field Summary
static java.lang.String ALLOWED_CHARS
          Static string containing the allowed characters.
static java.lang.String DATE_DESCRIPTION_TEXT
          Date description text.
static java.lang.String DATE_FORMAT_TEXT
          Date format text.
static java.lang.String SEPARATOR_CHARS
          Static string containing the separator characters.
 
Fields inherited from interface com.isti.util.StringConstants
ALPHA_CAP_CHARS, ALPHA_CHARS, ALPHA_LOW_CHARS, ALPHANUM_CHARS_STRING, ALPHANUMERIC_CHARS, BOOLEAN_FALSE_TEXT, BOOLEAN_TRUE_TEXT, DATE_FORMAT_AMPM_STR, DATE_FORMAT_RFC_822_STR, DATE_FORMAT24_STR, DEFAULT_JAVA_VERSION_STRING, DEFAULT_NULL_STR, DEFAULT_SEP_STR, EFLOAT_CHARS, EMPTY_STRING, FLOAT_CHARS, HEX_ALPHA_CAP_CHARS, HEX_ALPHA_LOW_CHARS, HEX_CHARS, INTEGER_CHARS, INVALID_FILENAME_CHARS, QUOTE_STRING, SIGNED_EFLOAT_CHARS, SIGNED_FLOAT_CHARS, SIGNED_INT_CHARS, SPACE_STRING, TOD_CHARS, WHITE_SPACE_CHARS, WILDCARD_ALL_CHAR, WILDCARD_CHARS, WILDCARD_SINGLE_CHAR
 
Constructor Summary
TextSQLDateValidator()
          Creates the text SQL date validator.
TextSQLDateValidator(int minYear, int maxYear)
          Creates the text SQL date validator.
 
Method Summary
 boolean isValid(java.lang.String s)
          Determines if the text is valid.
static boolean isValidDate(java.lang.String s)
          Determines if the text is valid.
 boolean isValidEntry(java.lang.String s)
          Determines if the text entry is valid.
 
Methods inherited from class com.isti.util.gui.textvalidator.TextBasicValidator
getAllowedFlag, getColumns, getMaxNumChars, getSpecialChars, getToolTipText, isNumeric, setAllowedFlag, setColumns, setMaxNumChars, setMaxTextLength, setNumericFlag, setSpecialChars, setToolTipText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATE_DESCRIPTION_TEXT

public static final java.lang.String DATE_DESCRIPTION_TEXT
Date description text.

See Also:
Constant Field Values

DATE_FORMAT_TEXT

public static final java.lang.String DATE_FORMAT_TEXT
Date format text.

See Also:
Constant Field Values

SEPARATOR_CHARS

public static final java.lang.String SEPARATOR_CHARS
Static string containing the separator characters.

See Also:
Constant Field Values

ALLOWED_CHARS

public static final java.lang.String ALLOWED_CHARS
Static string containing the allowed characters.

See Also:
Constant Field Values
Constructor Detail

TextSQLDateValidator

public TextSQLDateValidator()
Creates the text SQL date validator.


TextSQLDateValidator

public TextSQLDateValidator(int minYear,
                            int maxYear)
Creates the text SQL date validator. The year in a 'Date' must be between 0 and 8099.

Parameters:
minYear - the minimum year or -1 for no minimum.
maxYear - the maximum year or -1 for no minimum.
Method Detail

isValid

public boolean isValid(java.lang.String s)
Determines if the text is valid. The text may be only part of the entire text entry.

Specified by:
isValid in interface TextValidator
Overrides:
isValid in class TextBasicValidator
Parameters:
s - the text.
Returns:
true if the text is valid, false otherwise.

isValidDate

public static boolean isValidDate(java.lang.String s)
Determines if the text is valid. The text may be only part of the entire text entry.

Parameters:
s - the text.
Returns:
true if the text is valid, false otherwise.

isValidEntry

public boolean isValidEntry(java.lang.String s)
Determines if the text entry is valid. The text should be the entire text entry.

Specified by:
isValidEntry in interface TextValidator
Overrides:
isValidEntry in class TextBasicValidator
Parameters:
s - the text.
Returns:
true if the text is valid, false otherwise.