Class TableSorter

java.lang.Object
javax.swing.table.AbstractTableModel
org.openscience.jmol.app.janocchio.TableSorter
All Implemented Interfaces:
Serializable, TableModel

public class TableSorter extends AbstractTableModel
See Also:
  • Field Details

  • Constructor Details

    • TableSorter

      public TableSorter()
    • TableSorter

      public TableSorter(TableModel tableModel)
    • TableSorter

      public TableSorter(TableModel tableModel, JTableHeader tableHeader)
  • Method Details

    • clearSortingState

      private void clearSortingState()
    • getTableModel

      public TableModel getTableModel()
    • setTableModel

      public void setTableModel(TableModel tableModel)
    • getTableHeader

      public JTableHeader getTableHeader()
    • setTableHeader

      public void setTableHeader(JTableHeader tableHeader)
    • isSorting

      public boolean isSorting()
    • getDirective

      private TableSorter.Directive getDirective(int column)
    • getSortingStatus

      public int getSortingStatus(int column)
    • sortingStatusChanged

      private void sortingStatusChanged()
    • setSortingStatus

      public void setSortingStatus(int column, int status)
    • getHeaderRendererIcon

      protected Icon getHeaderRendererIcon(int column, int size)
    • cancelSorting

      private void cancelSorting()
    • setColumnComparator

      public void setColumnComparator(Class type, Comparator comparator)
    • getComparator

      protected Comparator getComparator(int column)
    • getViewToModel

      private TableSorter.Row[] getViewToModel()
    • modelIndex

      public int modelIndex(int viewIndex)
    • getModelToView

      private int[] getModelToView()
    • getRowCount

      public int getRowCount()
    • getColumnCount

      public int getColumnCount()
    • getColumnName

      public String getColumnName(int column)
      Specified by:
      getColumnName in interface TableModel
      Overrides:
      getColumnName in class AbstractTableModel
    • getColumnClass

      public Class getColumnClass(int column)
      Specified by:
      getColumnClass in interface TableModel
      Overrides:
      getColumnClass in class AbstractTableModel
    • isCellEditable

      public boolean isCellEditable(int row, int column)
      Specified by:
      isCellEditable in interface TableModel
      Overrides:
      isCellEditable in class AbstractTableModel
    • getValueAt

      public Object getValueAt(int row, int column)
    • setValueAt

      public void setValueAt(Object aValue, int row, int column)
      Specified by:
      setValueAt in interface TableModel
      Overrides:
      setValueAt in class AbstractTableModel