Class BeanModelRowSorter<BEAN,​MODEL extends BeanTableModel<BEAN>,​V extends ViewToModel<BEAN>>

    • Field Detail

      • viewToModel

        protected java.util.List<V extends ViewToModel<BEAN>> viewToModel
      • modelToView

        protected int[] modelToView
    • Method Detail

      • setRowFilter

        public void setRowFilter​(java.util.function.Predicate<BEAN> rowFilter)
      • createViewFilter

        protected java.util.function.Predicate<V> createViewFilter​(java.util.function.Predicate<BEAN> rowFilter)
      • toggleSortOrder

        public void toggleSortOrder​(int column)
        Specified by:
        toggleSortOrder in class javax.swing.RowSorter<MODEL extends BeanTableModel<BEAN>>
      • convertRowIndexToModel

        public int convertRowIndexToModel​(int index)
        Specified by:
        convertRowIndexToModel in class javax.swing.RowSorter<MODEL extends BeanTableModel<BEAN>>
      • convertRowIndexToView

        public int convertRowIndexToView​(int index)
        Specified by:
        convertRowIndexToView in class javax.swing.RowSorter<MODEL extends BeanTableModel<BEAN>>
      • setSortKeys

        public void setSortKeys​(java.util.List<? extends javax.swing.RowSorter.SortKey> keys)
        Specified by:
        setSortKeys in class javax.swing.RowSorter<MODEL extends BeanTableModel<BEAN>>
      • getSortKeys

        public java.util.List<? extends javax.swing.RowSorter.SortKey> getSortKeys()
        Specified by:
        getSortKeys in class javax.swing.RowSorter<MODEL extends BeanTableModel<BEAN>>
      • getViewRowCount

        public int getViewRowCount()
        Specified by:
        getViewRowCount in class javax.swing.RowSorter<MODEL extends BeanTableModel<BEAN>>
      • getModelRowCount

        public int getModelRowCount()
        Specified by:
        getModelRowCount in class javax.swing.RowSorter<MODEL extends BeanTableModel<BEAN>>
      • modelStructureChanged

        public void modelStructureChanged()
        Specified by:
        modelStructureChanged in class javax.swing.RowSorter<MODEL extends BeanTableModel<BEAN>>
      • reset

        protected void reset()
      • allRowsChanged

        public void allRowsChanged()
        Specified by:
        allRowsChanged in class javax.swing.RowSorter<MODEL extends BeanTableModel<BEAN>>
      • rowsInserted

        public void rowsInserted​(int firstRow,
                                 int endRow)
        Specified by:
        rowsInserted in class javax.swing.RowSorter<MODEL extends BeanTableModel<BEAN>>
      • newModelRows

        protected abstract java.util.List<V> newModelRows​(int firstRow,
                                                          int lastRow)
        Create a list of view/model mappings.
        Parameters:
        firstRow - the starting model index (inclusive)
        lastRow - the ending model index (inclusive)
        Returns:
        a new list of view/model mappings
      • updateModelIndex

        protected void updateModelIndex​(int firstRow,
                                        int deltaRows)
      • isVisible

        protected boolean isVisible​(int modelRow)
      • rowsDeleted

        public void rowsDeleted​(int firstRow,
                                int endRow)
        Specified by:
        rowsDeleted in class javax.swing.RowSorter<MODEL extends BeanTableModel<BEAN>>
      • rowsUpdated

        public void rowsUpdated​(int firstRow,
                                int endRow)
        Specified by:
        rowsUpdated in class javax.swing.RowSorter<MODEL extends BeanTableModel<BEAN>>
      • rowsUpdated

        public void rowsUpdated​(int firstRow,
                                int endRow,
                                int column)
        Specified by:
        rowsUpdated in class javax.swing.RowSorter<MODEL extends BeanTableModel<BEAN>>
      • getBean

        protected BEAN getBean​(int rowIndex)
      • postSort

        protected abstract void postSort()