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 voidformatTable(PFCTable table) Customizing the tableintReturns the number of columns in the model.getColumnName(int col) Returns the name of the column atcol.protected ObjectgetValueForColumn(Object element, int columnIndex) Returns the cell value from the passed row data structure atcolumnIndex.booleanisCellEditable(int row, int col) Returnstrueonly for the credit limit and the credit floor column.voidSets the data to the model.voidsetValueAt(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, setDataMethods 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:
getValueForColumnin 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:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein 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:
formatTablein classPAbstractMonitorTableModel- Parameters:
table- PFCTable
-
isCellEditable
public boolean isCellEditable(int row, int col) Returnstrueonly for the credit limit and the credit floor column.- Specified by:
isCellEditablein interfaceTableModel- Overrides:
isCellEditablein 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:
setValueAtin interfaceTableModel- Overrides:
setValueAtin classAbstractTableModel- Parameters:
value- Objectrow- intcolumn- int
-