pt.moredata.dataentry.component
Class GridDataEntryComponent

java.lang.Object
  extended bypt.moredata.dataentry.component.AbstractDataEntryComponent
      extended bypt.moredata.dataentry.component.GridDataEntryComponent
All Implemented Interfaces:
DataEntryComponent, java.io.Serializable
Direct Known Subclasses:
TableComponent

public abstract class GridDataEntryComponent
extends AbstractDataEntryComponent

Implementacao de um campo visual com varias linhas e varias colunas. Cada GridDataEntryComponent representa uma coluna de um mesmo widget, ou seja tipicamente um GridDataEntry possui tantos GridDataEntryComponent quanto o numero de colunas que possui. Cada GridDataEntryComponent tem associado o nome de uma coluna e o widget que usa para mostrar os dados. Company MoreData

Version:
$Revision: 1.5 $
Author:
pcarmo
See Also:
Serialized Form

Field Summary
 
Fields inherited from class pt.moredata.dataentry.component.AbstractDataEntryComponent
_columnName, _tableAlias, _tableName
 
Constructor Summary
GridDataEntryComponent(java.lang.String tableName, java.lang.String columnName)
          Constructor for the VisualTableComponent object.
GridDataEntryComponent(java.lang.String name, java.lang.String tableName, java.lang.String tableAlias, java.lang.String columnName)
          Constructor for the GridDataEntryComponent object
 
Method Summary
abstract  java.lang.Object getFieldValue(int rowNumber)
          Devolve o valor guardado numa determinada celula do componente.
abstract  void insertNewRow()
          Inserre uma nova linha na fim da tabela.
abstract  void removeRow(int rowNumber)
          Remove uma linha da tabela.
abstract  void setFieldValue(int rowNumber, java.lang.Object obj)
          Altera o valor guardado numa determinada celula do componente.
 
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
 
Methods inherited from interface pt.moredata.dataentry.component.DataEntryComponent
cleanUp, getCurrentRow, getFieldValue, getRows, setEditable, setFieldValue
 

Constructor Detail

GridDataEntryComponent

public GridDataEntryComponent(java.lang.String tableName,
                              java.lang.String columnName)
                       throws NullTableNameException,
                              NullColumnNameException
Constructor for the VisualTableComponent object.

Parameters:
tableName - Nome da tabela.
columnName - The column name of the component.
Throws:
NullTableNameException - If the table name is null.
NullColumnNameException - If the column name is null.

GridDataEntryComponent

public GridDataEntryComponent(java.lang.String name,
                              java.lang.String tableName,
                              java.lang.String tableAlias,
                              java.lang.String columnName)
                       throws NullTableNameException,
                              NullColumnNameException
Constructor for the GridDataEntryComponent 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.
Throws:
NullTableNameException - If the table name is null.
NullColumnNameException - If the column name is null.
Method Detail

getFieldValue

public abstract java.lang.Object getFieldValue(int rowNumber)
Devolve o valor guardado numa determinada celula do componente.

Parameters:
rowNumber - Numero da linha a que a celula pertence.
Returns:
O valor guardado numa determinada celula do componente.

setFieldValue

public abstract void setFieldValue(int rowNumber,
                                   java.lang.Object obj)
Altera o valor guardado numa determinada celula do componente.

Parameters:
rowNumber - Numero da linha a que a celula pertence.
obj - O valor a guardar numa determinada celula do componente.

insertNewRow

public abstract void insertNewRow()
Inserre uma nova linha na fim da tabela.


removeRow

public abstract void removeRow(int rowNumber)
Remove uma linha da tabela.

Parameters:
rowNumber - O numero da linha a remover.