Class PBalanceMonitorTableModel

All Implemented Interfaces:
Serializable, TableModel

public class PBalanceMonitorTableModel extends PAbstractMonitorTableModel
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:
  • Constructor Details

    • PBalanceMonitorTableModel

      public PBalanceMonitorTableModel()
      Constructs an PBalanceMonitorTableModel model
  • Method Details

    • getValueForColumn

      protected Object getValueForColumn(Object element, int columnIndex)
      Returns the cell value from the passed row data structure at columnIndex.
      Specified by:
      getValueForColumn in class PAbstractMonitorTableModel
      Parameters:
      element - Object the row object
      columnIndex - int the column whose value is to be queried
      Returns:
      the value Object at the specified cell
    • getColumnName

      public String getColumnName(int col)
      Returns the name of the column at col. This is used to initialize the table's column header name.
      Specified by:
      getColumnName in interface TableModel
      Overrides:
      getColumnName in class AbstractTableModel
      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. A size uses this method to determine how many columns it should create and display by default.
      Returns:
      the number of columns in the model
    • setData

      public void setData(ArrayList l)
      Sets data to the model. As well resetting the row height of a table for the updated data.
      Parameters:
      l - ArrayList the monitors
    • formatTable

      protected void formatTable(PFCTable table)
      Customizing the table according to derived class needs.
      Overrides:
      formatTable in class PAbstractMonitorTableModel
      Parameters:
      table - JTable Subclasses should override this, but also call super.formatTable(table)
    • formatHandCursor

      protected void formatHandCursor(PFCTable table)
      Shows Hand cursor when the mouse moved on to balance monitor column and member count column
      Overrides:
      formatHandCursor in class PAbstractMonitorTableModel
      Parameters:
      table - PFCTable
    • getMonitor

      public PBalanceMonitor 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