Class SortableFilterableTableModel

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

    public class SortableFilterableTableModel
    extends javax.swing.table.AbstractTableModel
    See Also:
    Serialized Form
    • Field Summary

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

        listenerList
    • Constructor Summary

      Constructors 
      Constructor Description
      SortableFilterableTableModel​(java.util.List<java.lang.String[]> data, java.lang.String[] headers)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void filter​(java.lang.String filter)  
      int getColumnCount()  
      java.lang.String getColumnName​(int col)  
      int getRowCount()  
      java.lang.Object getValueAt​(int rowIndex, int columnIndex)  
      boolean isAscending​(int column)  
      boolean isSorting​(int column)  
      void toggleSort​(int column)  
      • 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

      • SortableFilterableTableModel

        public SortableFilterableTableModel​(java.util.List<java.lang.String[]> data,
                                            java.lang.String[] headers)
    • Method Detail

      • getColumnName

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

        public int getRowCount()
      • getColumnCount

        public int getColumnCount()
      • filter

        public void filter​(java.lang.String filter)
      • getValueAt

        public java.lang.Object getValueAt​(int rowIndex,
                                           int columnIndex)
      • isAscending

        public boolean isAscending​(int column)
      • isSorting

        public boolean isSorting​(int column)
      • toggleSort

        public void toggleSort​(int column)