Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.ulc.ui.dataTypes
Class UIDataType

    java.lang.Object
      |
      +--com.ibm.ulc.util.UlcObject
            |
            +--com.ibm.ulc.ui.UIProxy
                  |
                  +--com.ibm.ulc.ui.dataTypes.UIDataType

Direct Known Subclasses:
  UIDateValidator, UIPercentValidator, UIRangeValidator, UIRegularExpressionValidator, UIStringFormatter

public class UIDataType
extends com.ibm.ulc.ui.UIProxy
implements IDataType

See Also:
  Serialized Form

Fields inherited from class com.ibm.ulc.ui.UIProxy
`fConnection, fId`

Constructor Summary
`UIDataType()` Default constructor for the receiver

Method Summary
`java.lang.Object` | `convertToObject(int phase, java.lang.String newString, java.lang.Object previousValue)` The default implementation returns the fields string as an object.
`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.
`java.lang.String` | `filterInput(java.lang.String newString, java.lang.String currentText)` Hook to filter any text input into the field.
`int` | `getCols()` Returns the default width (in characters) used to determine the size of a field or table and list column of this DataType.
`java.lang.Object` | `getDefaultValue(java.lang.String newString)` Returns the default object to be returned when a data conversion error occurs.

Methods inherited from class com.ibm.ulc.ui.UIProxy
`add, add, addInstance, addMany, convert, convert, finalize, find, free, getManaged, handleRequest, isOptionalEventEnabled, printInstances, remove, remove, removeInstance, removeMany, restoreState, sendEventULC, sendEventULC, sendEventULC, sendOptionalEventULC, sendOptionalEventULC, sendOptionalEventULC, sendULC, sendULC, setOptionalEventsEnabled, trouble`

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`

Constructor Detail

### UIDataType

    public UIDataType()

  Default constructor for the receiver

Method Detail

### convertToObject

    public java.lang.Object convertToObject(int phase,
                                            java.lang.String newString,
                                            java.lang.Object previousValue)
                                     throws DataTypeConversionException

  The default implementation returns the fields string as an object. Subclasses should override this method to return the configured data type.
  Specified by:
    convertToObject in interface IDataType
  Parameters:
    `phase` - int The current validation phase. The phase can be one of the following:

        	FORM_NOTIFICATION_IMMEDIATE : 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.
  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.
  Specified by:
    convertToString in interface IDataType
  See Also:
    `IDataType.convertToString(Object, boolean)`

### filterInput

    public java.lang.String filterInput(java.lang.String newString)

  The default implementation returns original string without modification.
  Specified by:
    filterInput in interface IDataType
  See Also:
    `IDataType.filterInput(String)`

### filterInput

    public java.lang.String filterInput(java.lang.String newString,
                                        java.lang.String currentText)

  Hook to filter any text input into the field.
  Specified by:
    filterInput in interface IDataType
  Parameters:
    `newString` - The string to filter.
    `oldText` - The current Contents.
  Returns:
    the filtered result, If null input is not accepted.
  See Also:
    `IDataType.filterInput(String, String)`

### getCols

    public int getCols()

  Returns the default width (in characters) used to determine the size of a field or table and list column of this DataType. Can be overidden by giving the field an explicit size.
  Specified by:
    getCols in interface IDataType

### getDefaultValue

    public java.lang.Object getDefaultValue(java.lang.String newString)

  Returns the default object to be returned when a data conversion error occurs.
  Specified by:
    getDefaultValue in interface IDataType

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD