|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.ibm.ulc.util.UlcObject
|
+--com.ibm.ulc.ui.UIProxy
|
+--com.ibm.ulc.ui.dataTypes.UIDataType
|
+--com.ibm.ulc.ui.dataTypes.UIDateValidator
| Field Summary | |
protected java.lang.String |
fAllValidChars
The list of valid characters allowed as input. |
protected java.util.Vector |
fInputDateFormats
The DateFormat objects stored in fInputDateFormats will try to perform the validation/formatting of input until one is successful. |
protected java.text.DateFormat |
fOutputDateFormat
The current DateFormat object that will perform formatting of output. |
protected static char |
OR_CHAR
The list of valid characters allowed as input. |
protected static java.lang.String |
validChars
The list of valid characters allowed as input. |
| Fields inherited from class com.ibm.ulc.ui.UIProxy |
fConnection,
fId,
fList,
fOptionalEvents,
fProxyParent |
| Constructor Summary | |
UIDateValidator()
Default constructor for the receiver |
|
| Method Summary | |
protected java.util.Vector |
alternativeFormatsFrom(java.lang.String format)
Break the format string into a collection of formats where an unquoted OR_CHAR ('|') occurs. |
java.lang.Object |
convertToObject(int phase,
java.lang.String newString,
java.lang.Object previousValue)
Convert the input string to a date. |
java.lang.String |
convertToString(java.lang.Object object,
boolean forEditing)
Return the String represenation of the object or the empty string if object is null. |
java.lang.String |
filterInput(java.lang.String newString)
The default implementation returns original string without modification. |
void |
free()
The receiver is being destroyed. |
void |
handleRequest(ORBConnection conn,
java.lang.String request,
Anything args)
The ULC application has sent a request to this object. |
boolean |
hasValidCharacters(java.lang.String s)
|
protected void |
initializeValidCharacters(java.lang.String formatString)
Initialize the valid characters specific for the receiver: all characters of the formatString except aA..zZ are added to the standard valid characters (we do not take into account quoted letters). |
protected java.lang.String |
inputFormatFor(java.lang.String outputFormatString)
Answer the input format (with abbreviated year) corresponding to the given output format |
void |
restoreState(ORBConnection conn,
Anything args)
This method is the first method called after this widget is instantiated. |
void |
setFormatString(java.lang.String outputFormatString)
Set the formatters according to outputFormatString. |
protected void |
writeYsOn(int readYs,
java.lang.StringBuffer writeStream)
Write a suitable number of ys to the input format writeStream, given the fact that readYs are present in the output format. |
| Methods inherited from class com.ibm.ulc.ui.dataTypes.UIDataType |
filterInput,
filterInput,
getCols,
getDefaultValue |
| Methods inherited from class com.ibm.ulc.ui.UIProxy |
add,
add,
addInstance,
addMany,
cachedResources,
convert,
convert,
enableOptionalEvents,
finalize,
find,
getApplication,
getChildren,
getConnection,
getId,
getManaged,
getManaged,
getProxyParent,
getUI,
internalAddToChildren,
internalRemoveFromChildren,
isChildOf,
isChildWidget,
isOptionalEventEnabled,
isParentOf,
newUpdate,
printInstances,
remove,
remove,
removeInstance,
removeMany,
sendEventULC,
sendEventULC,
sendEventULC,
sendOptionalEventULC,
sendOptionalEventULC,
sendOptionalEventULC,
sendULC,
sendULC,
setConnectionAndId,
setOptionalEvents,
setOptionalEventsEnabled,
setProxyParent,
trouble,
updateCachedResource |
| Methods inherited from class com.ibm.ulc.util.UlcObject |
trouble2,
trouble2Err,
troubleErr |
| Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
protected java.util.Vector fInputDateFormats
protected java.text.DateFormat fOutputDateFormat
protected static final java.lang.String validChars
protected java.lang.String fAllValidChars
protected static final char OR_CHAR
| Constructor Detail |
public UIDateValidator()
| Method Detail |
protected java.util.Vector alternativeFormatsFrom(java.lang.String format)
public java.lang.Object convertToObject(int phase,
java.lang.String newString,
java.lang.Object previousValue)
throws DataTypeConversionException
phase - int The current validation phase.
The phase can be one of the following:
FORM_NOTIFICATION_IMMEADIATE : Typically no validation is performed in this case the input string is returned as is. FORM_NOTIFICATION_ON_FOCUS_CHANGE FORM_NOTIFICATION_ON_REQUEST
newString - The String to convert.IDataType.convertToObject(int, String, Object)
public java.lang.String convertToString(java.lang.Object object,
boolean forEditing)
IDataType.convertToString(Object, boolean)public java.lang.String filterInput(java.lang.String newString)
IDataType.filterInput(String)public void free()
public void handleRequest(ORBConnection conn,
java.lang.String request,
Anything args)
conn - ORBConnection The connection on which the reply should be sent.request - String The string that identifies this request.args - Anything The arguments associated with this request.public boolean hasValidCharacters(java.lang.String s)
protected void initializeValidCharacters(java.lang.String formatString)
formatString - java.lang.Stringprotected java.lang.String inputFormatFor(java.lang.String outputFormatString)
outputFormatString - String
public void restoreState(ORBConnection conn,
Anything args)
conn - the UlcConnection in which this operation is performedargs - the Anything containing the optional initialization parameterspublic void setFormatString(java.lang.String outputFormatString)
protected void writeYsOn(int readYs,
java.lang.StringBuffer writeStream)
readYs - intwriteStream - StringBuffer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||