com.intel.gpe.gridbeans.plugins
Interface IDataSet

All Known Subinterfaces:
IGridBeanPanel, IGridBeanPlugin, ISwingGridBeanPanel, ISwingGridBeanPlugin
All Known Implementing Classes:
GridBeanPanel, GridBeanPlugin, SwingGridBeanPanel, SwingGridBeanPlugin

public interface IDataSet

The graphical data set. Each graphical user interface component is associated with a name (@link javax.xml.namespace.QName). The value of the component can be set or get. When the value is set it is first translated from its internal representation to its user representation (usually

Version:
$Id: IDataSet.java,v 1.8 2006/10/18 10:42:47 vashorin Exp $
Author:
Alexander Lukichev

Method Summary
 java.lang.String getDescription(javax.xml.namespace.QName key)
          Get the description of the component.
 boolean getEnabled(javax.xml.namespace.QName key)
          Get the state of the component.
 java.lang.Object getValue(javax.xml.namespace.QName key)
          Get the translated value of the component.
 boolean isValid(javax.xml.namespace.QName key, java.lang.StringBuffer buf)
          Check if the value of the component is valid.
 java.util.Set<javax.xml.namespace.QName> keySet()
          Get the set of the component names.
 void load(IGridBeanModel model, Client client)
          Load data set component values from the GridBean model and the client object.
 void setDescription(javax.xml.namespace.QName key, java.lang.String descr)
          Set the description of the specified component
 void setEnabled(javax.xml.namespace.QName key, boolean enabled)
          Set the enabled state of the component
 void setPossibleValues(javax.xml.namespace.QName key, java.util.List values)
          Set the possible values for the specified component
 void setValue(javax.xml.namespace.QName key, java.lang.Object value)
          Set the value of the component.
 void setValueTranslator(javax.xml.namespace.QName key, IValueTranslator translator)
          Set the translator for the specified component
 void setValueValidator(javax.xml.namespace.QName key, IValueValidator validator)
          Set the validator for the specified component
 void store(IGridBeanModel model)
          Store the component values in the GridBean model.
 

Method Detail

getEnabled

boolean getEnabled(javax.xml.namespace.QName key)
                   throws DataSetException
Get the state of the component.

Parameters:
key - The name of the component
Returns:
The enabled state of the component
Throws:
DataSetException

setEnabled

void setEnabled(javax.xml.namespace.QName key,
                boolean enabled)
                throws DataSetException
Set the enabled state of the component

Parameters:
key - The name of the component
enabled - The enabled state of the component
Throws:
DataSetException

keySet

java.util.Set<javax.xml.namespace.QName> keySet()
Get the set of the component names.

Returns:
The set of the component names

getValue

java.lang.Object getValue(javax.xml.namespace.QName key)
                          throws DataSetException,
                                 TranslationException
Get the translated value of the component.

Parameters:
key - The name of the component
Returns:
The translated value
Throws:
DataSetException
TranslationException - If translation failed

setValue

void setValue(javax.xml.namespace.QName key,
              java.lang.Object value)
              throws DataSetException,
                     TranslationException
Set the value of the component. The value is translated to the user's representation and then the GUI component is assigned with it.

Parameters:
key - The name of the component
value - The value
Throws:
DataSetException
TranslationException - If translation failed

setValueTranslator

void setValueTranslator(javax.xml.namespace.QName key,
                        IValueTranslator translator)
                        throws DataSetException
Set the translator for the specified component

Parameters:
key - The name of the component
translator - The translator
Throws:
DataSetException

setValueValidator

void setValueValidator(javax.xml.namespace.QName key,
                       IValueValidator validator)
                       throws DataSetException
Set the validator for the specified component

Parameters:
key - The name of the component
validator - The validator
Throws:
DataSetException

setDescription

void setDescription(javax.xml.namespace.QName key,
                    java.lang.String descr)
                    throws DataSetException
Set the description of the specified component

Parameters:
key - The name of the component
descr - The description
Throws:
DataSetException

setPossibleValues

void setPossibleValues(javax.xml.namespace.QName key,
                       java.util.List values)
                       throws DataSetException,
                              TranslationException
Set the possible values for the specified component

Parameters:
key - The name of the component
values - The list of the possible values
Throws:
DataSetException
TranslationException

load

void load(IGridBeanModel model,
          Client client)
          throws DataSetException,
                 TranslationException
Load data set component values from the GridBean model and the client object. Experimental code.

Parameters:
model - The GridBean model
client - The client
Throws:
DataSetException
TranslationException - If translation of any value failed

store

void store(IGridBeanModel model)
           throws DataSetException,
                  TranslationException
Store the component values in the GridBean model.

Parameters:
model - The GridBean model
Throws:
DataSetException
TranslationException - If translation of any value failed

isValid

boolean isValid(javax.xml.namespace.QName key,
                java.lang.StringBuffer buf)
                throws DataSetException
Check if the value of the component is valid.

Parameters:
key - The name of the component
buf - The reason of the failure of validation check is appended here
Returns:
true if the value of the specified component is valid
Throws:
DataSetException

getDescription

java.lang.String getDescription(javax.xml.namespace.QName key)
                                throws DataSetException
Get the description of the component.

Parameters:
key - The name of the component
Returns:
The description of the specified component
Throws:
DataSetException


Copyright © 2008. All Rights Reserved.