com.ibm.ulc.ui.dataTypes
Class UIDateValidator
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
- public class UIDateValidator
- extends UIDataType
- See Also:
- Serialized Form
Field Summary |
protected java.text.DateFormat |
fDateFormat
The current DateFormat object that will perform the validation/formatting of 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 |
Method Summary |
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)
|
void |
restoreState(ORBConnection conn,
Anything args)
This method is the first method called after this widget is instantiated. |
void |
setFormatString(java.lang.String formatString)
|
Methods inherited from class com.ibm.ulc.ui.UIProxy |
add,
add,
addInstance,
addMany,
convert,
convert,
finalize,
find,
getManaged,
isOptionalEventEnabled,
printInstances,
remove,
remove,
removeInstance,
removeMany,
sendEventULC,
sendEventULC,
sendEventULC,
sendOptionalEventULC,
sendOptionalEventULC,
sendOptionalEventULC,
sendULC,
sendULC,
setOptionalEventsEnabled,
trouble |
Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
fDateFormat
protected java.text.DateFormat fDateFormat
- The current DateFormat object that will perform the validation/formatting of input.
validChars
protected static final java.lang.String validChars
- The list of valid characters allowed as input.
UIDateValidator
public UIDateValidator()
- Default constructor for the receiver
convertToObject
public java.lang.Object convertToObject(int phase,
java.lang.String newString,
java.lang.Object previousValue)
throws DataTypeConversionException
- Convert the input string to a date. Throw an exception on error.
- Parameters:
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.- Returns:
- An object representing the converted String or null.
- Overrides:
- convertToObject in class UIDataType
- See Also:
IDataType.convertToObject(int, String, Object)
convertToString
public 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.
The default implementation calls the toString() to return a string representation of the object.
Subclasses should override this method to return the formatted data type as a String.
- Overrides:
- convertToString in class UIDataType
- See Also:
IDataType.convertToString(Object, boolean)
filterInput
public java.lang.String filterInput(java.lang.String newString)
- The default implementation returns original string without modification.
- Overrides:
- filterInput in class UIDataType
- See Also:
IDataType.filterInput(String)
free
public void free()
- The receiver is being destroyed. Release all the
associated resources.
- Overrides:
- free in class com.ibm.ulc.ui.UIProxy
handleRequest
public void handleRequest(ORBConnection conn,
java.lang.String request,
Anything args)
- The ULC application has sent a request to this object. Do all processing necessary.
If this object does not handle this request call super.handleRequest.
- Parameters:
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.- Overrides:
- handleRequest in class com.ibm.ulc.ui.UIProxy
hasValidCharacters
public boolean hasValidCharacters(java.lang.String s)
restoreState
public void restoreState(ORBConnection conn,
Anything args)
- This method is the first method called after this widget is instantiated.
All widget specific initialization must take place in this method.
All the parameters necessary to initialize this widget are specified in the arguments.
Subclasses implementing this method must call the superclass implementation as well.
- Parameters:
conn
- the UlcConnection
in which this operation is performedargs
- the Anything
containing the optional initialization parameters- Overrides:
- restoreState in class com.ibm.ulc.ui.UIProxy
setFormatString
public void setFormatString(java.lang.String formatString)