pt.moredata.dataentry.component.swing
Class JComboBoxComponent

java.lang.Object
  extended bypt.moredata.dataentry.component.AbstractDataEntryComponent
      extended bypt.moredata.dataentry.component.FormDataEntryComponent
          extended bypt.moredata.dataentry.component.swing.JComboBoxComponent
All Implemented Interfaces:
DataEntryComponent, java.io.Serializable
Direct Known Subclasses:
ComboBoxComponent

public class JComboBoxComponent
extends FormDataEntryComponent

Implementacao de um componente de uma entrada de dados a partir de um JComboBox. Company MoreData

Version:
$Revision: 1.9 $ TODO : Testar esta classe !
Author:
pcarmo
See Also:
Serialized Form

Field Summary
protected  javax.swing.JComboBox _field
          Widget que define o campo.
 
Fields inherited from class pt.moredata.dataentry.component.AbstractDataEntryComponent
_columnName, _tableAlias, _tableName
 
Constructor Summary
JComboBoxComponent(java.lang.String tableName, java.lang.String columnName, javax.swing.JComboBox field)
          Cria um novo campo visual a partir de um JComboBox.
JComboBoxComponent(java.lang.String name, java.lang.String tableName, java.lang.String tableAlias, java.lang.String columnName, javax.swing.JComboBox field)
          Constructor for the JComboBoxComponent object
 
Method Summary
 void cleanUp()
          Clean up the component, removing all listeners added to other objects.
 java.lang.Object getFieldValue()
          Devolve o valor guardado no componente.
 void setEditable(boolean editable)
          Torna o componente editavel ou nao.
 void setFieldValue(java.lang.Object value)
          Altera o valor guardado no componente.
 
Methods inherited from class pt.moredata.dataentry.component.FormDataEntryComponent
getCurrentRow, getRows
 
Methods inherited from class pt.moredata.dataentry.component.AbstractDataEntryComponent
addComponentModifiedListener, fireComponentEvent, getColumnName, getName, getTableAlias, getTableName, getTableNameOrAlias, isDataBaseComponent, isEditableForInsert, isEditableForQuery, isEditableForUpdate, removeComponentModifiedListener, setAllowedCharacters, setDataBaseComponent, setEditableForInsert, setEditableForQuery, setEditableForUpdate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_field

protected javax.swing.JComboBox _field
Widget que define o campo.

Constructor Detail

JComboBoxComponent

public JComboBoxComponent(java.lang.String tableName,
                          java.lang.String columnName,
                          javax.swing.JComboBox field)
                   throws NullTableNameException,
                          NullColumnNameException,
                          java.lang.NullPointerException
Cria um novo campo visual a partir de um JComboBox.

Parameters:
tableName - Nome da tabela associada ao campo visual.
columnName - Nome da coluna da tabela associada ao campo visual.
field - JComboBox onde sao introduzidos os dados.
Throws:
NullTableNameException - If the table name is null.
NullColumnNameException - Se o nome da coluna for nulo.
java.lang.NullPointerException - Se o field for nulo.

JComboBoxComponent

public JComboBoxComponent(java.lang.String name,
                          java.lang.String tableName,
                          java.lang.String tableAlias,
                          java.lang.String columnName,
                          javax.swing.JComboBox field)
                   throws NullTableNameException,
                          NullColumnNameException,
                          java.lang.NullPointerException
Constructor for the JComboBoxComponent object

Parameters:
name - The component name. This name will be used to identify the component, if the name is null, the columnName is used.
tableName - The table name.
tableAlias - The table alias.
columnName - The column name of the component.
field - JComboBox onde sao introduzidos os dados.
Throws:
NullTableNameException - If the table name is null.
NullColumnNameException - If the column name is null.
java.lang.NullPointerException - Se o obj for nulo.
Method Detail

getFieldValue

public java.lang.Object getFieldValue()
Devolve o valor guardado no componente.

Returns:
O valor guardado no componente (pode ser null).

setEditable

public void setEditable(boolean editable)
Torna o componente editavel ou nao.

Parameters:
editable - Se for true o componente fica editavel, caso contrario o componente deixa de poder ser editado.

setFieldValue

public void setFieldValue(java.lang.Object value)
Altera o valor guardado no componente.

Parameters:
value - O valor a guardar no componente.

cleanUp

public void cleanUp()
Clean up the component, removing all listeners added to other objects. This operation is necessary for making this object free of references so the GC can collect it.