pt.moredata.dataentry.component
Interface DataEntryComponent

All Known Implementing Classes:
AbstractDataEntryComponent

public interface DataEntryComponent

Campo visual usado numa entrada de dados. Company MoreData

Version:
$Revision: 1.7 $
Author:
pcarmo

Method Summary
 void addComponentModifiedListener(ComponentModifiedListener listener)
          Adiciona um listener, para detectar alterações ao componente.
 void cleanUp()
          Clean up the component, removing all listeners added to other objects.
 java.lang.String getColumnName()
          Devolve o nome da coluna da tabela a que este campo visual esta associado.
 int getCurrentRow()
          Devolve o numero da linha selecionada na tabela.
 java.lang.Object getFieldValue()
          Devolve o valor guardado no componente.
 java.lang.String getName()
          Getter for the component name.
 int getRows()
          Devolve o numero de linhas da tabela.
 java.lang.String getTableAlias()
          Return the table alias of the table name.
 java.lang.String getTableName()
          Devolve o nome da tabela a que este campo visual esta associado.
 java.lang.String getTableNameOrAlias()
          Return the table alias or the table name if the alias is null.
 boolean isDataBaseComponent()
          Check if the component is a database component.
 boolean isEditableForInsert()
          Check if the component should be editable when the DataEntry is INSERT_MODE.
 boolean isEditableForQuery()
          Check if the component should be editable when the DataEntry is QUERY_MODE.
 boolean isEditableForUpdate()
          Check if the component should be editable when the DataEntry is UPDATE_MODE.
 void removeComponentModifiedListener(ComponentModifiedListener listener)
          Remove um listener, para detectar alterações ao componente.
 void setAllowedCharacters(java.lang.String allowedCharacters)
          Change the list of allowed characters to be used in the widget represeted by the component during a query only.
 void setDataBaseComponent(boolean dataBaseComponent)
          Setter for property dataBaseComponent.
 void setEditable(boolean editable)
          Torna o componente editavel ou nao.
 void setEditableForInsert(boolean editable)
          Change the component editable state when the DataEntry is INSERT_MODE.
 void setEditableForQuery(boolean editable)
          Change the component editable state when the DataEntry is QUERY_MODE.
 void setEditableForUpdate(boolean editable)
          Change the component editable state when the DataEntry is UPDATE_MODE.
 void setFieldValue(java.lang.Object value)
          Altera o valor guardado no componente.
 

Method Detail

getName

public java.lang.String getName()
Getter for the component name. If the component name has not especified in the object creation, the columnName is returned.

Returns:
The component name or columnName if the component name is not defined.

getTableName

public java.lang.String getTableName()
Devolve o nome da tabela a que este campo visual esta associado.

Returns:
The tableName value

getTableAlias

public java.lang.String getTableAlias()
Return the table alias of the table name.

Returns:
Value of property tableAlias.

getTableNameOrAlias

public java.lang.String getTableNameOrAlias()
Return the table alias or the table name if the alias is null.

Returns:
The table alias or the table name.

getColumnName

public java.lang.String getColumnName()
Devolve o nome da coluna da tabela a que este campo visual esta associado.

Returns:
The columnName value

getFieldValue

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

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

setFieldValue

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

Parameters:
value - O valor a guardar no componente.

getRows

public int getRows()
Devolve o numero de linhas da tabela.

Returns:
O numero de linhas da tabela.

getCurrentRow

public int getCurrentRow()
Devolve o numero da linha selecionada na tabela.

Returns:
O numero da linha selecionada na tabela.

isEditableForInsert

public boolean isEditableForInsert()
Check if the component should be editable when the DataEntry is INSERT_MODE.

Returns:
True if the component should be editable, false otherwise.

isEditableForQuery

public boolean isEditableForQuery()
Check if the component should be editable when the DataEntry is QUERY_MODE.

Returns:
True if the component should be editable, false otherwise.

isEditableForUpdate

public boolean isEditableForUpdate()
Check if the component should be editable when the DataEntry is UPDATE_MODE.

Returns:
True if the component should be editable, false otherwise.

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.

setEditableForInsert

public void setEditableForInsert(boolean editable)
Change the component editable state when the DataEntry is INSERT_MODE.

Parameters:
editable - The Component editable state.

setEditableForQuery

public void setEditableForQuery(boolean editable)
Change the component editable state when the DataEntry is QUERY_MODE.

Parameters:
editable - The Component editable state.

setEditableForUpdate

public void setEditableForUpdate(boolean editable)
Change the component editable state when the DataEntry is UPDATE_MODE.

Parameters:
editable - The Component editable state.

addComponentModifiedListener

public void addComponentModifiedListener(ComponentModifiedListener listener)
Adiciona um listener, para detectar alterações ao componente.

Parameters:
listener - Listener a adicionar ao DataEntry.

removeComponentModifiedListener

public void removeComponentModifiedListener(ComponentModifiedListener listener)
Remove um listener, para detectar alterações ao componente.

Parameters:
listener - Listener a remover do DataEntry.

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.


setAllowedCharacters

public void setAllowedCharacters(java.lang.String allowedCharacters)
Change the list of allowed characters to be used in the widget represeted by the component during a query only.


isDataBaseComponent

public boolean isDataBaseComponent()
Check if the component is a database component. A database component is associated with a column of a database table.

Returns:
Value of property dataBaseComponent.

setDataBaseComponent

public void setDataBaseComponent(boolean dataBaseComponent)
Setter for property dataBaseComponent. If true the component is associated with a column of a database table.

Parameters:
dataBaseComponent - New value of property dataBaseComponent.