org.chorem.lima.ui.financialtransactionsearch
Class FinancialTransactionSearchTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by org.chorem.lima.ui.financialtransactionsearch.FinancialTransactionSearchTableModel
All Implemented Interfaces:
Serializable, TableModel, ServiceListener

public class FinancialTransactionSearchTableModel
extends AbstractTableModel
implements ServiceListener

Basic transaction table model. Le modele est filtré sur selectedFiscalPeriod (montée en charge !).

Version:
$Revision: 3051 $ Last update : $Date: 2010-11-29 15:57:16 +0100 (lun., 29 nov. 2010) $ By : $Author: echatellier $
Author:
ore, chatellier
See Also:
Serialized Form

Field Summary
protected  List<Object> cacheDataList
           
protected  FinancialTransactionSearch financialTransactionSearch
          data cache
protected  FinancialTransactionServiceMonitorable financialTransactionService
          Transaction service.
protected  FiscalPeriod selectedFiscalPeriod
          selected financial period
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
FinancialTransactionSearchTableModel()
          Model constructor.
 
Method Summary
 void addEmptyEntry(Object value, int row)
           
 Class<?> getColumnClass(int column)
           
 int getColumnCount()
           
 String getColumnName(int column)
           
protected  List<Object> getDataList(FinancialTransactionSearch financialTransactionSearch)
          Le model est une combinaison de Transaction/Entries.
 Object getElementAt(int row)
           
 int getRowCount()
           
 Object getValueAt(int row, int column)
           
 boolean isCellEditable(int rowIndex, int columnIndex)
          To set cells editable or not different condition for entry or financial transaction
 void notifyMethod(String serviceName, String methodeName)
           
protected  void refresh(FinancialTransactionSearch financialTransactionSearch)
           
 void removeObject(Object object, int row)
          Delete selected row in table (could be transaction or entry).
 void setFiscalPeriod(FiscalPeriod fiscalPeriod)
           
 void setValueAt(Object value, int row, int column)
          to modifiy financialtransaction or entry
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

financialTransactionService

protected final FinancialTransactionServiceMonitorable financialTransactionService
Transaction service.


selectedFiscalPeriod

protected FiscalPeriod selectedFiscalPeriod
selected financial period


financialTransactionSearch

protected FinancialTransactionSearch financialTransactionSearch
data cache


cacheDataList

protected List<Object> cacheDataList
Constructor Detail

FinancialTransactionSearchTableModel

public FinancialTransactionSearchTableModel()
Model constructor. Just init service proxies.

Method Detail

getDataList

protected List<Object> getDataList(FinancialTransactionSearch financialTransactionSearch)
Le model est une combinaison de Transaction/Entries.

Returns:

refresh

protected void refresh(FinancialTransactionSearch financialTransactionSearch)

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface TableModel

getColumnClass

public Class<?> getColumnClass(int column)
Specified by:
getColumnClass in interface TableModel
Overrides:
getColumnClass in class AbstractTableModel

getColumnName

public String getColumnName(int column)
Specified by:
getColumnName in interface TableModel
Overrides:
getColumnName in class AbstractTableModel

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface TableModel

getValueAt

public Object getValueAt(int row,
                         int column)
Specified by:
getValueAt in interface TableModel

setFiscalPeriod

public void setFiscalPeriod(FiscalPeriod fiscalPeriod)

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
To set cells editable or not different condition for entry or financial transaction

Specified by:
isCellEditable in interface TableModel
Overrides:
isCellEditable in class AbstractTableModel

addEmptyEntry

public void addEmptyEntry(Object value,
                          int row)
                   throws LimaException
Throws:
LimaException

setValueAt

public void setValueAt(Object value,
                       int row,
                       int column)
to modifiy financialtransaction or entry

Specified by:
setValueAt in interface TableModel
Overrides:
setValueAt in class AbstractTableModel

getElementAt

public Object getElementAt(int row)

removeObject

public void removeObject(Object object,
                         int row)
                  throws LimaException
Delete selected row in table (could be transaction or entry). Called by model.

Parameters:
Object, - int
Throws:
LimaException

notifyMethod

public void notifyMethod(String serviceName,
                         String methodeName)
Specified by:
notifyMethod in interface ServiceListener


Copyright © 2008-2010 CodeLutin. All Rights Reserved.