info.informatica.ui
Class TextControl

java.lang.Object
  extended by info.informatica.ui.TextControl
All Implemented Interfaces:
DataControl, DataValue

public class TextControl
extends Object
implements DataControl

Version:
1.04
Author:
amengual at informatica dot info

Constructor Summary
TextControl(ControlName id)
           
 
Method Summary
 ControlName getControlName()
          Returns the ID of this entity at User Interface.
 FieldName getFieldname()
          Returns the name of the database field associated to this entity.
 Object getFormat()
          Gets the format that applies to this UI element.
 String[] getStringValues()
           
 Object getValue()
          Gets the Object value of the field.
 void init(DataField de)
          Initializes the value of the field.
 void mapDataToUI(DataField de, Dataset ds, Map<String,Object> m)
           
 void setControlName(ControlName id)
           
 void setFieldname(FieldName name)
          Sets the name of the data field associated to this UI field.
 void setFormat(Object fmt)
          Sets the formatting object for this UI element.
 void setValue(Object o)
          Sets the value of the field.
 void setValue(String s)
           
 void setValue(String[] sa)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextControl

public TextControl(ControlName id)
Method Detail

getValue

public Object getValue()
Description copied from interface: DataValue
Gets the Object value of the field.

Specified by:
getValue in interface DataValue
Returns:
the Object value of the field.

getStringValues

public String[] getStringValues()

init

public void init(DataField de)
          throws DataFieldException
Description copied from interface: DataControl
Initializes the value of the field.

Specified by:
init in interface DataControl
Throws:
DataFieldException

getControlName

public ControlName getControlName()
Description copied from interface: DataControl
Returns the ID of this entity at User Interface.

Specified by:
getControlName in interface DataControl

setControlName

public void setControlName(ControlName id)

getFieldname

public FieldName getFieldname()
Description copied from interface: DataControl
Returns the name of the database field associated to this entity.

Specified by:
getFieldname in interface DataControl

setFieldname

public void setFieldname(FieldName name)
Description copied from interface: DataControl
Sets the name of the data field associated to this UI field.

Specified by:
setFieldname in interface DataControl

setValue

public void setValue(String[] sa)
              throws DataFieldException
Throws:
DataFieldException

setValue

public void setValue(String s)
              throws DataFieldException
Throws:
DataFieldException

setValue

public void setValue(Object o)
              throws DataFieldException
Description copied from interface: DataValue
Sets the value of the field.

Must NOT perform any data validation (only UI-level validation).

Specified by:
setValue in interface DataValue
Parameters:
o - the value to be given to field.
Throws:
DataFieldException

setFormat

public void setFormat(Object fmt)
Description copied from interface: DataControl
Sets the formatting object for this UI element.

It is allowed to thow an UnsupportedOperationException if the UI Control does not support formatting.

Specified by:
setFormat in interface DataControl
Parameters:
fmt - the Formatting object

getFormat

public Object getFormat()
Description copied from interface: DataControl
Gets the format that applies to this UI element.

Specified by:
getFormat in interface DataControl
Returns:
a formatting object for this element, or null if it has no format, or this object does not support formatting.

mapDataToUI

public void mapDataToUI(DataField de,
                        Dataset ds,
                        Map<String,Object> m)
                 throws DatasetException
Specified by:
mapDataToUI in interface DataControl
Throws:
DatasetException