public class FilterRowTM extends WrapTM
| Modifier and Type | Class and Description |
|---|---|
protected static class |
FilterRowTM.SyncDeleteOpts |
protected static class |
FilterRowTM.SyncOpts<T extends FilterRowTM.SyncOpts> |
| Modifier and Type | Field and Description |
|---|---|
protected xyz.cofe.collection.Predicate<RowData> |
rowFilter |
protected xyz.cofe.collection.set.IndexSet<Integer> |
source |
evSupport, tableModel, tableModelListener, tableModelListenerStarted| Constructor and Description |
|---|
FilterRowTM() |
| Modifier and Type | Method and Description |
|---|---|
void |
applyFilter()
Фильтрует все строки исходной модели
|
void |
applyFilter(boolean fireAllChanged)
Фильтрует все строки исходной модели
|
xyz.cofe.collection.set.IndexSetBasic<Integer> |
buildSourceIndex()
Создает индексированный набор исходных строк
|
boolean |
filterSource(int sourceRow)
Проверка на включение исходной строки в результирующий набор строк - т.е. фильтрация
|
int |
getColumnCount() |
int |
getRowCount() |
xyz.cofe.collection.Predicate<RowData> |
getRowFilter()
Возвращает фильтр строк
|
xyz.cofe.collection.set.IndexSet<Integer> |
getSourceIndexSet()
Возвращает индексированный набор (IndexSet) исходных строк
|
int |
mapColumnToInside(int columnIndex)
Карта отображения запрашиваемой колонки в исходную колонку.
|
int |
mapRowToInside(int rowIndex)
Карта отображения запрашиваемой строки в исходную строку.
|
int |
mapRowToOutside(int rowIndex)
Карта отображения внутреней строки на -> внешнюю
По умолчанию возвращает запрашиваемое значение.
|
protected List<TableModelEvent> |
onRowDeleted(TableModelEvent onDeleteEvent,
int firstRow,
int lastRow)
Вызывается при событии удаления строк из оригинальной таблицы
|
protected List<TableModelEvent> |
onRowInserted(TableModelEvent e,
int firstRow,
int lastRow)
Вызывается при событии добавления строк в оригинальную таблицу
|
protected List<TableModelEvent> |
onRowUpdated(TableModelEvent e,
int firstRow,
int lastRow)
Вызывается при событии обновления строк в оригинальной таблицы
|
protected List<TableModelEvent> |
onTableChanged(TableModelEvent e)
Вызывается при полном изменении оригинальной таблицы включая структуру
|
List<TableModelEvent> |
processRowUpdated(int sourceFirstRow,
int sourceLastRow)
Производит фильтрацию строк исходной таблицы, вызывается когда произошло событие обновления строк исходной таблицы
|
void |
setRowFilter(xyz.cofe.collection.Predicate<RowData> filter)
Устанавливает фильтр строк
|
void |
setTableModel(TableModel tableModel)
Указывает исходную модель таблицы, фильтрует текущее содержание таблицы
|
protected void |
shiftOnDeleteIndexes(int from,
int toInc,
xyz.cofe.common.Reciver<Integer> deletedOutterIndexes)
Сдвиг индексов при удалении исходных
|
protected void |
shiftOnInsertIndexes(int from,
int toInc)
Сдвиг индексов при вставке исходных
|
protected List<TableModelEvent> |
syncOnDelete(FilterRowTM.SyncDeleteOpts sopts) |
addPropertyChangeListener, addTableModelListener, attachTMListener, deletageTMEvent, detachTMListener, fireAllChanged, fireCellChanged, fireColumnsChanged, firePropertyChange, fireRowsDeleted, fireRowsInserted, fireRowsUpdated, fireRowUpdated, fireTableModelEvent, getColumnClass, getColumnName, getListeners, getListenersCollection, getTableModel, getValueAt, isCellEditable, isSourceListen, mapColumnToOutside, propertySupport, removePropertyChangeListener, removeTableModelListener, setSourceListen, setValueAtprotected xyz.cofe.collection.Predicate<RowData> rowFilter
protected xyz.cofe.collection.set.IndexSet<Integer> source
public void setRowFilter(xyz.cofe.collection.Predicate<RowData> filter)
filter - фильтр строкpublic xyz.cofe.collection.Predicate<RowData> getRowFilter()
public xyz.cofe.collection.set.IndexSet<Integer> getSourceIndexSet()
public int getRowCount()
getRowCount in interface TableModelgetRowCount in class WrapTMpublic int getColumnCount()
getColumnCount in interface TableModelgetColumnCount in class WrapTMpublic int mapColumnToInside(int columnIndex)
WrapTMmapColumnToInside in class WrapTMcolumnIndex - индекс запрашиваемой колонкиpublic int mapRowToInside(int rowIndex)
WrapTMmapRowToInside in class WrapTMrowIndex - индекс запрашиваемой строкиpublic int mapRowToOutside(int rowIndex)
WrapTMmapRowToOutside in class WrapTMrowIndex - индекс запрашиваемой строкиpublic void applyFilter()
public void applyFilter(boolean fireAllChanged)
fireAllChanged - сгенерировать сообщение о измении всех строк таблицыpublic boolean filterSource(int sourceRow)
sourceRow - исходная строкаpublic xyz.cofe.collection.set.IndexSetBasic<Integer> buildSourceIndex()
public void setTableModel(TableModel tableModel)
setTableModel in class WrapTMtableModel - исходная модель таблицыprotected void shiftOnInsertIndexes(int from,
int toInc)
from - исходный индекс - началоtoInc - исходный индекс - конецprotected void shiftOnDeleteIndexes(int from,
int toInc,
xyz.cofe.common.Reciver<Integer> deletedOutterIndexes)
from - исходный индекс - началоtoInc - исходный индекс - конецdeletedOutterIndexes - удаление исходящих индексовprotected List<TableModelEvent> onRowInserted(TableModelEvent e, int firstRow, int lastRow)
WrapTMonRowInserted in class WrapTMe - Исходное событиеfirstRow - Начальная строкаlastRow - Конечная (включительно) строкаpublic List<TableModelEvent> processRowUpdated(int sourceFirstRow, int sourceLastRow)
sourceFirstRow - Начало диапазона обновленных исходных строкsourceLastRow - Конец (включительно) диапазона обновленных исходных строкprotected List<TableModelEvent> onRowUpdated(TableModelEvent e, int firstRow, int lastRow)
WrapTMonRowUpdated in class WrapTMe - Исходное событиеfirstRow - Начальная строкаlastRow - Конечная (включительно) строкаprotected List<TableModelEvent> onRowDeleted(TableModelEvent onDeleteEvent, int firstRow, int lastRow)
WrapTMonRowDeleted in class WrapTMonDeleteEvent - Исходное событиеfirstRow - Начальная строкаlastRow - Конечная (включительно) строкаprotected List<TableModelEvent> syncOnDelete(FilterRowTM.SyncDeleteOpts sopts)
protected List<TableModelEvent> onTableChanged(TableModelEvent e)
WrapTMonTableChanged in class WrapTMe - Исходное событиеCopyright © 2019. All rights reserved.