org.chorem.lima.ui.financialtransaction
Class FinancialTransactionTableModel

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

public class FinancialTransactionTableModel
extends AbstractTableModel
implements ServiceListener

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

Version:
$Revision: 3064 $ Last update : $Date: 2010-12-04 22:01:22 +0100 (sam., 04 déc. 2010) $ By : $Author: jpepin $
Author:
ore, chatellier
See Also:
Serialized Form

Field Summary
protected  List<Object> cacheDataList
          data cache
protected  FinancialTransactionServiceMonitorable financialTransactionService
          Transaction service.
protected  FinancialPeriod selectedFinancialPeriod
          selected financial period
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
FinancialTransactionTableModel()
          collection /** Model constructor.
 
Method Summary
 void addEmptyEntry(Object value, int row)
           
 void addEntry(Object value, Entry entry, int row)
           
 void addFinancialTransaction()
           
 Class<?> getColumnClass(int column)
           
 int getColumnCount()
           
 String getColumnName(int column)
           
protected  List<Object> getDataList()
          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)
           
 void refresh()
           
 void removeObject(Object object, int row)
          Delete selected row in table (could be transaction or entry).
 void setFinancialPeriod(FinancialPeriod financialPeriod)
           
 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.


selectedFinancialPeriod

protected FinancialPeriod selectedFinancialPeriod
selected financial period


cacheDataList

protected List<Object> cacheDataList
data cache

Constructor Detail

FinancialTransactionTableModel

public FinancialTransactionTableModel()
collection /** Model constructor. Just init service proxies.

Method Detail

getDataList

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

Returns:

refresh

public void refresh()

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

setFinancialPeriod

public void setFinancialPeriod(FinancialPeriod financialPeriod)

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

addFinancialTransaction

public void addFinancialTransaction()
                             throws LimaException
Throws:
LimaException

addEmptyEntry

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

addEntry

public void addEntry(Object value,
                     Entry entry,
                     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-2011 CodeLutin. All Rights Reserved.