Class JTableHpr.SampleModel

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

    public static class JTableHpr.SampleModel
    extends javax.swing.table.AbstractTableModel
    A simple sample table model so Ribs app can show sample table data.
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class javax.swing.table.AbstractTableModel

        listenerList
    • Constructor Summary

      Constructors 
      Constructor Description
      SampleModel()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getColumnCount()
      Returns the number of columns.
      java.lang.String getColumnName​(int col)
      Return the column name at given column index.
      int getRowCount()
      Returns the number of row.
      java.lang.Object getValueAt​(int row, int col)
      Returns the object for given row/col.
      void setColumnCount​(int aValue)
      Sets the number of columns.
      • Methods inherited from class javax.swing.table.AbstractTableModel

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

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

      • SampleModel

        public SampleModel()
    • Method Detail

      • getColumnCount

        public int getColumnCount()
        Returns the number of columns.
      • setColumnCount

        public void setColumnCount​(int aValue)
        Sets the number of columns.
      • getColumnName

        public java.lang.String getColumnName​(int col)
        Return the column name at given column index.
        Specified by:
        getColumnName in interface javax.swing.table.TableModel
        Overrides:
        getColumnName in class javax.swing.table.AbstractTableModel
      • getRowCount

        public int getRowCount()
        Returns the number of row.
      • getValueAt

        public java.lang.Object getValueAt​(int row,
                                           int col)
        Returns the object for given row/col.