Class PBalanceMonitorTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
com.portal.app.cc.balanceMonitoring.PAbstractMonitorTableModel
com.portal.app.cc.balanceMonitoring.PBalanceMonitorTableModel
- All Implemented Interfaces:
Serializable,TableModel
PBalanceMonitorTableModel is a model representing a balance monitor details like name
group ,type and members count in each balance monitor and the associated credit limit
amount.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassRenderer for the first column of a table. -
Field Summary
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidformatHandCursor(PFCTable table) Shows Hand cursor when the mouse moved on to balance monitor column and member count columnprotected voidformatTable(PFCTable table) Customizing the table according to derived class needs.intReturns the number of columns in the model.getColumnName(int col) Returns the name of the column atcol.Returns the balance monitor object of the selected rowprotected ObjectgetValueForColumn(Object element, int columnIndex) Returns the cell value from the passed row data structure atcolumnIndex.voidSets data to the model.Methods inherited from class com.portal.app.cc.balanceMonitoring.PAbstractMonitorTableModel
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, isCellEditable, removeTableModelListener, setValueAt
-
Constructor Details
-
PBalanceMonitorTableModel
public PBalanceMonitorTableModel()Constructs anPBalanceMonitorTableModelmodel
-
-
Method Details
-
getValueForColumn
Returns the cell value from the passed row data structure atcolumnIndex.- Specified by:
getValueForColumnin classPAbstractMonitorTableModel- Parameters:
element- Object the row objectcolumnIndex- int the column whose value is to be queried- Returns:
- the value Object at the specified cell
-
getColumnName
Returns the name of the column atcol. This is used to initialize the table's column header name.- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classAbstractTableModel- Parameters:
col- the index of the column- Returns:
- the name of the column
-
getColumnCount
public int getColumnCount()Returns the number of columns in the model. Asizeuses this method to determine how many columns it should create and display by default.- Returns:
- the number of columns in the model
-
setData
Sets data to the model. As well resetting the row height of a table for the updated data.- Parameters:
l- ArrayList the monitors
-
formatTable
Customizing the table according to derived class needs.- Overrides:
formatTablein classPAbstractMonitorTableModel- Parameters:
table- JTable Subclasses should override this, but also call super.formatTable(table)
-
formatHandCursor
Shows Hand cursor when the mouse moved on to balance monitor column and member count column- Overrides:
formatHandCursorin classPAbstractMonitorTableModel- Parameters:
table- PFCTable
-
getMonitor
Returns the balance monitor object of the selected row- Returns:
- the balance monitor object if the table contains at least one row other wise returns null
-