com.intel.gpe.gridbeans.plugins
Class GridBeanPanel

java.lang.Object
  extended by com.intel.gpe.gridbeans.plugins.GridBeanPanel
All Implemented Interfaces:
IDataSet, IGridBeanPanel

public class GridBeanPanel
extends java.lang.Object
implements IGridBeanPanel

The base implementation of an input or output GridBean panel.

Version:
$Id: GridBeanPanel.java,v 1.18 2007/02/22 14:40:10 dizhigul Exp $
Author:
Alexander Lukichev

Field Summary
protected  Client parent2
           
 
Constructor Summary
GridBeanPanel(Client client, java.lang.String name)
           
 
Method Summary
 java.lang.String getCaption()
          Get the caption of the tab
 IDataControl getControl(javax.xml.namespace.QName key)
          Get the control by its name
 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.String getName()
          Deprecated. 
 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 linkDataControl(javax.xml.namespace.QName key, IDataControl control)
          Bind the specifed control to the specified name
 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.
 void updateValues(Client client)
          This method is called whenever load(IGridBeanModel, Client) is called.
 void validate(ErrorSet errors)
          Validate the contents of the panel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent2

protected Client parent2
Constructor Detail

GridBeanPanel

public GridBeanPanel(Client client,
                     java.lang.String name)
Method Detail

getControl

public IDataControl getControl(javax.xml.namespace.QName key)
                        throws DataSetException
Get the control by its name

Parameters:
key - The name of the control
Throws:
DataSetException

getEnabled

public boolean getEnabled(javax.xml.namespace.QName key)
                   throws DataSetException
Description copied from interface: IDataSet
Get the state of the component.

Specified by:
getEnabled in interface IDataSet
Parameters:
key - The name of the component
Returns:
The enabled state of the component
Throws:
DataSetException

setEnabled

public void setEnabled(javax.xml.namespace.QName key,
                       boolean enabled)
                throws DataSetException
Description copied from interface: IDataSet
Set the enabled state of the component

Specified by:
setEnabled in interface IDataSet
Parameters:
key - The name of the component
enabled - The enabled state of the component
Throws:
DataSetException

keySet

public java.util.Set<javax.xml.namespace.QName> keySet()
Description copied from interface: IDataSet
Get the set of the component names.

Specified by:
keySet in interface IDataSet
Returns:
The set of the component names

getValue

public java.lang.Object getValue(javax.xml.namespace.QName key)
                          throws DataSetException,
                                 TranslationException
Description copied from interface: IDataSet
Get the translated value of the component.

Specified by:
getValue in interface IDataSet
Parameters:
key - The name of the component
Returns:
The translated value
Throws:
DataSetException
TranslationException - If translation failed

setValue

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

Specified by:
setValue in interface IDataSet
Parameters:
key - The name of the component
value - The value
Throws:
DataSetException
TranslationException - If translation failed

setValueTranslator

public void setValueTranslator(javax.xml.namespace.QName key,
                               IValueTranslator translator)
                        throws DataSetException
Description copied from interface: IDataSet
Set the translator for the specified component

Specified by:
setValueTranslator in interface IDataSet
Parameters:
key - The name of the component
translator - The translator
Throws:
DataSetException

setValueValidator

public void setValueValidator(javax.xml.namespace.QName key,
                              IValueValidator validator)
                       throws DataSetException
Description copied from interface: IDataSet
Set the validator for the specified component

Specified by:
setValueValidator in interface IDataSet
Parameters:
key - The name of the component
validator - The validator
Throws:
DataSetException

setDescription

public void setDescription(javax.xml.namespace.QName key,
                           java.lang.String descr)
                    throws DataSetException
Description copied from interface: IDataSet
Set the description of the specified component

Specified by:
setDescription in interface IDataSet
Parameters:
key - The name of the component
descr - The description
Throws:
DataSetException

setPossibleValues

public void setPossibleValues(javax.xml.namespace.QName key,
                              java.util.List values)
                       throws DataSetException,
                              TranslationException
Description copied from interface: IDataSet
Set the possible values for the specified component

Specified by:
setPossibleValues in interface IDataSet
Parameters:
key - The name of the component
values - The list of the possible values
Throws:
DataSetException
TranslationException

linkDataControl

public void linkDataControl(javax.xml.namespace.QName key,
                            IDataControl control)
Bind the specifed control to the specified name

Parameters:
key - The name
control - The control

load

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

Specified by:
load in interface IDataSet
Parameters:
model - The GridBean model
client - The client
Throws:
DataSetException
TranslationException - If translation of any value failed

store

public void store(IGridBeanModel model)
           throws DataSetException,
                  TranslationException
Description copied from interface: IDataSet
Store the component values in the GridBean model.

Specified by:
store in interface IDataSet
Parameters:
model - The GridBean model
Throws:
DataSetException
TranslationException - If translation of any value failed

updateValues

public void updateValues(Client client)
This method is called whenever load(IGridBeanModel, Client) is called. Override it if you want to update the values of the panel depending on the state of the client object.

Parameters:
client - The client

validate

public void validate(ErrorSet errors)
Description copied from interface: IGridBeanPanel
Validate the contents of the panel.

Specified by:
validate in interface IGridBeanPanel
Parameters:
errors - The set of the encountered errors

isValid

public boolean isValid(javax.xml.namespace.QName key,
                       java.lang.StringBuffer buf)
                throws DataSetException
Description copied from interface: IDataSet
Check if the value of the component is valid.

Specified by:
isValid in interface IDataSet
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

public java.lang.String getDescription(javax.xml.namespace.QName key)
                                throws DataSetException
Description copied from interface: IDataSet
Get the description of the component.

Specified by:
getDescription in interface IDataSet
Parameters:
key - The name of the component
Returns:
The description of the specified component
Throws:
DataSetException

getName

@Deprecated
public java.lang.String getName()
Deprecated. 

Description copied from interface: IGridBeanPanel
Get the name of the tab.

Specified by:
getName in interface IGridBeanPanel
Returns:
The name of the tab

getCaption

public java.lang.String getCaption()
Description copied from interface: IGridBeanPanel
Get the caption of the tab

Specified by:
getCaption in interface IGridBeanPanel
Returns:


Copyright © 2008. All Rights Reserved.