pt.moredata.dataentry
Interface SwingDataEntryController

All Known Implementing Classes:
GenericSwingDataEntryController

public interface SwingDataEntryController

Esta interface define os metodos que uma classe tem de implementar para que possa controlar um conjunto de entradas de dados. Toda a parte visual devera ser construida numa outra classe, atraves de um editor de forms, por exemplo. Company MoreData

Version:
$Revision: 1.41 $
Author:
pcarmo

Method Summary
 void addDataEntry(DataEntry dataEntry, javax.swing.JComponent component)
          Adiciona um DataEntry a ser controlado por esta classe.
 void cleanUp()
          Clean up the SwingDataEntryController, removing all listeners added to other objects.
 DataEntry getCurrentDataEntry()
          Getter for property currentDataEntry.
 DataSource getDataSource()
          Getter for property _dataSource.
 boolean realyWhantToExit()
          Util method to open a dialog to the user confirm if we whants realy exist from the application.
 boolean saveCurrentRecord()
          Util method to open a dialog to the user confirm if we whants to save ths current record.
 void setCurrentDataEntry(DataEntry currentDataEntry)
          Setter for property currentDataEntry.
 void setDataSource(DataSource _dataSource)
          Afecta o DataSource do DataEntryController.
 void setProgressBarSize(int progressBarSize)
          Altera o valor que pode ser incrementado pelo DataEntryController na barra de progresso.
 void setShowSplash(boolean showSplash)
          Setter for property showSplash.
 void setSplash(Splash splash)
          Adiciona uma janela de splash onde devera aparecer o progresso da inicializacao do DataEntryController.
 void setStatusBar(StatusBar statusBar)
          Setter for property statusBar.
 void setTabbedPane(javax.swing.JTabbedPane tabbedPane)
          Afecta o TabbedPane usado pelo DataEntryController.
 void setToolBar(NavigationToolBar toolBar)
          Afecta a toolbar usada pelo DataEntryController.
 

Method Detail

realyWhantToExit

public boolean realyWhantToExit()
Util method to open a dialog to the user confirm if we whants realy exist from the application.


saveCurrentRecord

public boolean saveCurrentRecord()
Util method to open a dialog to the user confirm if we whants to save ths current record.

Returns:
true if the record was sucessufuly saved, if the record was not modified or if the user didn't want to save the record, false otherwise.

getDataSource

public DataSource getDataSource()
Getter for property _dataSource.

Returns:
Value of property _dataSource.

setDataSource

public void setDataSource(DataSource _dataSource)
Afecta o DataSource do DataEntryController. O DataSource do singleton DAOManager tambem e afectado.

Parameters:
_dataSource - New value of property _dataSource.

addDataEntry

public void addDataEntry(DataEntry dataEntry,
                         javax.swing.JComponent component)
Adiciona um DataEntry a ser controlado por esta classe. A entrada de dados adicionada e a que fica selecionada.

Parameters:
dataEntry - O DataEntry
component - Container onde devera ser apresentada a entrada de dados.

setSplash

public void setSplash(Splash splash)
Adiciona uma janela de splash onde devera aparecer o progresso da inicializacao do DataEntryController. Se o parametro passado for diferente de null, a janela de splash fica automaticamente activada.

Parameters:
splash - A janela de splash.

setShowSplash

public void setShowSplash(boolean showSplash)
Setter for property showSplash.

Parameters:
showSplash - New value of property showSplash.

setTabbedPane

public void setTabbedPane(javax.swing.JTabbedPane tabbedPane)
Afecta o TabbedPane usado pelo DataEntryController. O TabbedPane e inicializado atraves do metodo initTabbedPane().

Parameters:
tabbedPane - New value of property tabbedPane.

setToolBar

public void setToolBar(NavigationToolBar toolBar)
Afecta a toolbar usada pelo DataEntryController. A toolbar será inicializada atraves do metodo initToolBar().

Parameters:
toolBar - New value of property toolBar.

setStatusBar

public void setStatusBar(StatusBar statusBar)
Setter for property statusBar.

Parameters:
statusBar - New value of property statusBar.

setProgressBarSize

public void setProgressBarSize(int progressBarSize)
Altera o valor que pode ser incrementado pelo DataEntryController na barra de progresso.

Parameters:
progressBarSize - Valor que pode ser incrementado.

cleanUp

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


getCurrentDataEntry

public DataEntry getCurrentDataEntry()
Getter for property currentDataEntry.

Returns:
Value of property currentDataEntry.

setCurrentDataEntry

public void setCurrentDataEntry(DataEntry currentDataEntry)
Setter for property currentDataEntry.

Parameters:
currentDataEntry - New value of property currentDataEntry.