Class StatisticsPanel.StatisticsModel

  • All Implemented Interfaces:
    java.io.Serializable, javax.swing.table.TableModel
    Enclosing class:
    StatisticsPanel

    private static class StatisticsPanel.StatisticsModel
    extends javax.swing.table.AbstractTableModel
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String[] columnNames  
      private java.lang.Object[][] data  
      private static int NAME_COLUMN  
      private static int VALUE_COLUMN  
      • Fields inherited from class javax.swing.table.AbstractTableModel

        listenerList
    • Constructor Summary

      Constructors 
      Constructor Description
      StatisticsModel()
      A standard constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Class<?> getColumnClass​(int column)
      int getColumnCount()
      java.lang.String getColumnName​(int column)
      int getRowCount()
      java.lang.Object getValueAt​(int row, int column)
      void setData​(java.util.Map<java.lang.String,​java.lang.String> statsData)
      Gives this table model the data that is being used in the table.
      • Methods inherited from class javax.swing.table.AbstractTableModel

        addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • columnNames

        private final java.lang.String[] columnNames
      • data

        private java.lang.Object[][] data
    • Constructor Detail

      • StatisticsModel

        public StatisticsModel()
        A standard constructor.
    • Method Detail

      • setData

        public void setData​(java.util.Map<java.lang.String,​java.lang.String> statsData)
        Gives this table model the data that is being used in the table. This method should only be called to initialize the data set. To modify or extend the data set use other methods.
        Parameters:
        statsData - The map of key,value pairs to enter.
      • getColumnClass

        public java.lang.Class<?> getColumnClass​(int column)
        Specified by:
        getColumnClass in interface javax.swing.table.TableModel
        Overrides:
        getColumnClass in class javax.swing.table.AbstractTableModel
      • getColumnName

        public java.lang.String getColumnName​(int column)
        Specified by:
        getColumnName in interface javax.swing.table.TableModel
        Overrides:
        getColumnName in class javax.swing.table.AbstractTableModel
      • getColumnCount

        public int getColumnCount()
      • getRowCount

        public int getRowCount()
      • getValueAt

        public java.lang.Object getValueAt​(int row,
                                           int column)