Class PResourceTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
com.portal.app.cc.balanceMonitoring.PAbstractMonitorTableModel
com.portal.app.cc.balanceMonitoring.PResourceTableModel
- All Implemented Interfaces:
Serializable
,TableModel
This is a table model used for resource table containing the resource name,
credit limit, credit floor, thresholds and the running total.
- Author:
- Chethana Eswarappa
- See Also:
-
Field Summary
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
formatTable
(PFCTable table) Customizing the tableint
Returns the number of columns in the model.getColumnName
(int col) Returns the name of the column atcol
.protected Object
getValueForColumn
(Object element, int columnIndex) Returns the cell value from the passed row data structure atcolumnIndex
.boolean
isCellEditable
(int row, int col) Returnstrue
only for the credit limit and the credit floor column.void
Sets the data to the model.void
setValueAt
(Object value, int row, int column) This method updates the balance monitor object with the credit limit and the credit floorMethods inherited from class com.portal.app.cc.balanceMonitoring.PAbstractMonitorTableModel
formatHandCursor, getRowAt, getRowCount, getSelectedData, getTable, getValueAt, informSorterOfModelChange, setData
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
-
Constructor Details
-
PResourceTableModel
public PResourceTableModel()
-
-
Method Details
-
getValueForColumn
Returns the cell value from the passed row data structure atcolumnIndex
.- Specified by:
getValueForColumn
in classPAbstractMonitorTableModel
- Parameters:
element
- Object the value for the columncolumnIndex
- int the column whose value is to be queriede
- Object the row object- Returns:
- the value Object at the specified cell
-
getColumnName
Returns the name of the column atcol
.- Specified by:
getColumnName
in interfaceTableModel
- Overrides:
getColumnName
in classAbstractTableModel
- Parameters:
col
- int- Returns:
- String
-
getColumnCount
public int getColumnCount()Returns the number of columns in the model.- Returns:
- int
-
setData
Sets the data to the model.- Parameters:
l
- ArrayList
-
formatTable
Customizing the table- Overrides:
formatTable
in classPAbstractMonitorTableModel
- Parameters:
table
- PFCTable
-
isCellEditable
public boolean isCellEditable(int row, int col) Returnstrue
only for the credit limit and the credit floor column.- Specified by:
isCellEditable
in interfaceTableModel
- Overrides:
isCellEditable
in classAbstractTableModel
- Parameters:
row
- intcol
- int- Returns:
- boolean
-
setValueAt
This method updates the balance monitor object with the credit limit and the credit floor- Specified by:
setValueAt
in interfaceTableModel
- Overrides:
setValueAt
in classAbstractTableModel
- Parameters:
value
- Objectrow
- intcolumn
- int
-