|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.ibm.dse.gui.Formatter
|
+--com.ibm.dse.gui.Converter
|
+--com.ibm.dse.gui.DateConverter
The DateConverter class is responsible for Date validation and conversion.
| Fields inherited from class com.ibm.dse.gui.Converter |
propertyChange |
| Constructor Summary | |
DateConverter()
This constructor creates a DateConverter object. |
|
DateConverter(java.lang.String anErrorMessage,
java.lang.String aPattern,
boolean useSeparator,
java.lang.String separator,
boolean fourDigitsYear,
int ordering)
This constructor creates a DateConverter object. |
|
| Method Summary | |
java.lang.String |
format(java.lang.String text)
Formats an unformatted (or already formatted) String into a formatted String. |
java.lang.Object |
formatAsConversionType(java.lang.String text)
Converts a String into a Date. |
java.lang.String |
formatFromConversionType(java.lang.Object input)
Converts a Date into a String. |
DateFormat |
getFormat()
Gets the format property (DateFormat) value. |
java.lang.String |
getPattern()
Gets the pattern property (java.lang.String) value. |
char |
getSeparator()
Gets the separator property (char) value. |
java.util.Date |
getTheDate()
Gets the theDate property (java.util.Date) value. |
void |
setFormat(DateFormat f)
Sets the format property (DateFormat) value. |
void |
setPattern(java.lang.String pattern)
Sets the pattern property (java.lang.String) value. |
void |
setSeparator(char separator)
Sets the separator property (char) value. |
void |
setTheDate(java.util.Date theDate)
Sets the theDate property (java.util.Date) value. |
boolean |
validate(java.lang.String userInput)
Returns a boolean that indicates if the validation has been achieved successfully or not. |
boolean |
validateKey(java.lang.String userInput,
java.awt.event.KeyEvent keyEvent)
Returns a boolean that indicates if the validation has been achieved successfully or not for this new key. |
| Methods inherited from class com.ibm.dse.gui.Converter |
addPropertyChangeListener,
firePropertyChange,
getErrorMessage,
getIsConvertible,
getIsNull,
getPropertyChange,
removePropertyChangeListener,
setErrorMessage,
setIsConvertible,
setIsNull,
validateWithError |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public DateConverter()
public DateConverter(java.lang.String anErrorMessage,
java.lang.String aPattern,
boolean useSeparator,
java.lang.String separator,
boolean fourDigitsYear,
int ordering)
anErrorMessage - java.lang.String, the error messageaPattern - java.lang.String, the patternuserSeparator - boolean, indicates if a separator is usedseparator - String, the separatorfourDigitsYear - boolean, indicated if four digits or two digits are used for the yearordering - int, the position of day, month and year| Method Detail |
public java.lang.String format(java.lang.String text)
texto - java.lang.Stringpublic java.lang.Object formatAsConversionType(java.lang.String text)
text - java.lang.String, the String to be convertedpublic java.lang.String formatFromConversionType(java.lang.Object input)
input - Object, the date to be convertedpublic DateFormat getFormat()
setFormat(com.ibm.dse.base.DateFormat)public java.lang.String getPattern()
setPattern(java.lang.String)public char getSeparator()
setSeparator(char)public java.util.Date getTheDate()
setTheDate(java.util.Date)public void setFormat(DateFormat f)
separator - DateFormat, the new value for the format property.getSeparator()public void setPattern(java.lang.String pattern)
pattern, - the new value for the pattern property.getPattern()public void setSeparator(char separator)
separator, - the new value for the separator property.getSeparator()public void setTheDate(java.util.Date theDate)
theDate, - the new value for the theDate property.getTheDate()public boolean validate(java.lang.String userInput)
userInput - java.lang.String - the string to be validated
public boolean validateKey(java.lang.String userInput,
java.awt.event.KeyEvent keyEvent)
userInput - java.lang.String - the string writed.keyEvent - java.awt.event.KeyEvent - new key.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||