com.intel.gpe.gridbeans.plugins
Interface IDataControl

All Known Implementing Classes:
ButtonDataControl, CheckBoxControl, CheckBoxListDataControl, ComboBoxDataControl, DataControl, FileChooserDataControl, FileTextDataControl, GroupControl, LabelDataControl, ListDataControl, TextEditorControl, TextEditorControlOld, TextFieldDataControl, WSRPClientListDataControl

public interface IDataControl

The interface of an object that binds a GUI control to a name within the IDataSet.

Version:
$Id: IDataControl.java,v 1.3 2005/12/22 09:20:32 lukichev Exp $
Author:
Alexander Lukichev

Method Summary
 java.lang.String getDescription()
          Get the control description.
 boolean getEnabled()
          Get the enabled state of the component
 java.lang.Object getValue()
          Get the translated value of the component.
 boolean isValid(java.lang.StringBuffer buf)
          Validate the value.
 void setDescription(java.lang.String descr)
          Set the description of the component.
 void setEnabled(boolean enabled)
          Set the enabled state of the component
 void setPossibleValues(java.util.List values)
          Set the list of the possible values of the component
 void setValue(java.lang.Object value)
          Set the value of the component.
 void setValueTranslator(IValueTranslator translator)
          Set the translator that translates the value to the user's representation and back.
 void setValueValidator(IValueValidator validator)
          Set the validator of the component value.
 

Method Detail

setEnabled

void setEnabled(boolean enabled)
                throws DataSetException
Set the enabled state of the component

Parameters:
enabled - The state
Throws:
DataSetException

getEnabled

boolean getEnabled()
                   throws DataSetException
Get the enabled state of the component

Returns:
The state of the component
Throws:
DataSetException

setValue

void setValue(java.lang.Object value)
              throws TranslationException,
                     DataSetException
Set the value of the component. The value is first translated to its representation and then displayed at the component.

Parameters:
value - The internal representation of the value
Throws:
TranslationException - If the translation failed
DataSetException

setValueTranslator

void setValueTranslator(IValueTranslator translator)
                        throws DataSetException
Set the translator that translates the value to the user's representation and back.

Parameters:
translator - The translator
Throws:
DataSetException

setValueValidator

void setValueValidator(IValueValidator validator)
                       throws DataSetException
Set the validator of the component value. The value of the user's component is first translated using the translator to the internal representation and then is validated.

Parameters:
validator - The validator
Throws:
DataSetException

isValid

boolean isValid(java.lang.StringBuffer buf)
                throws DataSetException
Validate the value.

Parameters:
buf - The reason of validation failure is appended to this buffer.
Returns:
TRUE if validation was successful
Throws:
DataSetException

setDescription

void setDescription(java.lang.String descr)
                    throws DataSetException
Set the description of the component.

Parameters:
descr - The description
Throws:
DataSetException

getDescription

java.lang.String getDescription()
                                throws DataSetException
Get the control description.

Returns:
The description of the component
Throws:
DataSetException

getValue

java.lang.Object getValue()
                          throws TranslationException,
                                 DataSetException
Get the translated value of the component.

Returns:
The translated value of the component. The traslator is used to translate the user's representation of the value to the internal representation.
Throws:
TranslationException - If the translation failed
DataSetException

setPossibleValues

void setPossibleValues(java.util.List values)
                       throws TranslationException,
                              DataSetException
Set the list of the possible values of the component

Parameters:
values - The possible values
Throws:
TranslationException - If translation of any value failed
DataSetException


Copyright © 2008. All Rights Reserved.