|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
R
- the type representing the rows in this table modelC
- type type used to identify columns in this table model, Integer for simple indexed identification for examplepublic interface FilteredTableModel<R,C>
Specifies a table model that can be filtered.
Nested Class Summary | |
---|---|
static interface |
FilteredTableModel.SortingState
Specifies a sorting state for a column. |
Method Summary | |
---|---|
void |
addColumnHiddenListener(ActionListener listener)
|
void |
addColumnShownListener(ActionListener listener)
|
void |
addRefreshDoneListener(ActionListener listener)
|
void |
addRefreshStartedListener(ActionListener listener)
|
void |
addSelectedIndexListener(ActionListener listener)
|
void |
addSelectedItemIndex(int index)
Selects the item at index |
void |
addSelectedItemIndexes(List<Integer> indexes)
Adds these indexes to the selection |
void |
addSelectionChangedListener(ActionListener listener)
|
void |
addSortingListener(ActionListener listener)
|
void |
addTableDataChangedListener(ActionListener listener)
|
void |
clearSelection()
Clears the selection |
void |
clearSortingState()
Clears the column sorting states, without reordering the rows |
Point |
findNextItemCoordinate(int fromIndex,
boolean forward,
FilterCriteria<Object> criteria)
Returns a Point denoting the row (point.y) and column index (point.x) of the first value to fulfill the given search criteria. |
Point |
findNextItemCoordinate(int fromIndex,
boolean forward,
String searchText)
Returns a Point denoting the row (point.y) and column index (point.x) of the first value to fulfill the given search criteria. |
C |
getColumnIdentifer(int modelColumnIndex)
|
TableColumnModel |
getColumnModel()
|
ColumnSearchModel<C> |
getFilterModel(C columnIdentifier)
|
Collection<TableColumn> |
getHiddenColumns()
|
R |
getItemAt(int index)
Returns the item found at the given index |
StateObserver |
getMultipleSelectionState()
|
int |
getSelectedIndex()
|
Collection<Integer> |
getSelectedIndexes()
|
R |
getSelectedItem()
|
List<R> |
getSelectedItems()
|
int |
getSelectionCount()
|
StateObserver |
getSelectionEmptyState()
|
ListSelectionModel |
getSelectionModel()
|
SortingDirective |
getSortingDirective(C columnIdentifier)
|
int |
getSortingPriority(C columnIdentifier)
|
TableColumn |
getTableColumn(C identifier)
Returns the TableColumn with the given identifier |
int |
indexOf(R item)
Returns the index of the given item |
boolean |
isColumnVisible(C columnIdentifier)
|
boolean |
isRegularExpressionSearch()
|
boolean |
isSelectionEmpty()
|
void |
moveSelectionDown()
Moves all selected indexes down one index, wraps around |
void |
moveSelectionUp()
Moves all selected indexes up one index, wraps around |
void |
removeColumnHiddenListener(ActionListener listener)
|
void |
removeColumnShownListener(ActionListener listener)
|
void |
removeItem(R item)
Removes the given item from this table model |
void |
removeItems(Collection<R> items)
Removes the given items from this table model |
void |
removeRefreshDoneListener(ActionListener listener)
|
void |
removeRefreshStartedListener(ActionListener listener)
|
void |
removeSelectedIndexListener(ActionListener listener)
|
void |
removeSelectionChangedListener(ActionListener listener)
|
void |
removeSortingListener(ActionListener listener)
|
void |
removeTableDataChangedListener(ActionListener listener)
|
void |
selectAll()
Selects all visible entities |
void |
setColumnVisible(C columnIdentifier,
boolean visible)
Toggles the visibility of the column representing the given columnIdentifier. |
void |
setRegularExpressionSearch(boolean value)
Specifies whether or not to use regular expressions when searching this table model |
void |
setSelectedItem(R item)
Sets the selected item |
void |
setSelectedItemIndex(int index)
Clears the selection and selects the item at index |
void |
setSelectedItemIndexes(List<Integer> indexes)
Selects the given indexes |
void |
setSelectedItems(List<R> items)
Selects the given items |
void |
setSortingDirective(C columnIdentifier,
SortingDirective directive,
boolean addColumnToSort)
|
Methods inherited from interface org.jminor.common.model.FilteredModel |
---|
addFilteringListener, contains, filterContents, getAllItems, getFilterCriteria, getFilteredItemCount, getFilteredItems, getVisibleItemCount, getVisibleItems, isFiltered, isVisible, removeFilteringListener, setFilterCriteria |
Methods inherited from interface javax.swing.table.TableModel |
---|
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, removeTableModelListener, setValueAt |
Methods inherited from interface org.jminor.common.model.Refreshable |
---|
clear, refresh |
Method Detail |
---|
StateObserver getSelectionEmptyState()
StateObserver getMultipleSelectionState()
void addSelectionChangedListener(ActionListener listener)
listener
- a listener to be notified each time the selection changesvoid removeSelectionChangedListener(ActionListener listener)
listener
- the listener to removevoid addSelectedIndexListener(ActionListener listener)
listener
- a listener to be notified each time the selected index changesvoid removeSelectedIndexListener(ActionListener listener)
listener
- the listener to removevoid addRefreshStartedListener(ActionListener listener)
listener
- a listener to be notified each time a refresh is about to startvoid removeRefreshStartedListener(ActionListener listener)
listener
- the listener to removevoid addRefreshDoneListener(ActionListener listener)
listener
- a listener to be notified each time a refresh has endedvoid removeRefreshDoneListener(ActionListener listener)
listener
- the listener to removevoid addSortingListener(ActionListener listener)
listener
- a listener to be notified each time the model has been sorted or the sorting state has been clearedvoid removeSortingListener(ActionListener listener)
listener
- the listener to removevoid addColumnHiddenListener(ActionListener listener)
listener
- a listener to be notified each time a column is hiddenvoid removeColumnHiddenListener(ActionListener listener)
listener
- the listener to removevoid addColumnShownListener(ActionListener listener)
listener
- a listener to be notified each time a column is shownvoid removeColumnShownListener(ActionListener listener)
listener
- the listener to removevoid addTableDataChangedListener(ActionListener listener)
listener
- a listener to be notified each time the table data changesvoid removeTableDataChangedListener(ActionListener listener)
listener
- the listener to removeR getItemAt(int index)
index
- the index
int indexOf(R item)
item
- the item
void removeItems(Collection<R> items)
items
- the items to remove from the modelvoid removeItem(R item)
item
- the item to remove from the modelTableColumnModel getColumnModel()
TableColumn getTableColumn(C identifier)
identifier
- the column identifier
C getColumnIdentifer(int modelColumnIndex)
modelColumnIndex
- the column model index
Collection<TableColumn> getHiddenColumns()
boolean isColumnVisible(C columnIdentifier)
columnIdentifier
- the key for which to query if its column is visible
void setColumnVisible(C columnIdentifier, boolean visible)
columnIdentifier
- the column identifiervisible
- if true the column is shown, otherwise it is hiddenvoid setSortingDirective(C columnIdentifier, SortingDirective directive, boolean addColumnToSort)
columnIdentifier
- the identifier of the column to sort bydirective
- the sorting directiveaddColumnToSort
- if false then the sorting state is cleared, otherwise
this column is added to the sorted column set according to getSortingPriority()
getSortingPriority(Object)
SortingDirective getSortingDirective(C columnIdentifier)
columnIdentifier
- the column identifier
int getSortingPriority(C columnIdentifier)
columnIdentifier
- the column identifier
Point findNextItemCoordinate(int fromIndex, boolean forward, String searchText)
fromIndex
- the row index to start searching at, if this is larger than the size of
the table model or less than 0 the search starts from either 0 or rowCount - 1 depending on search direction.forward
- if true then the search is forward, backwards otherwisesearchText
- the text to search by
isRegularExpressionSearch()
,
FilterCriteria.include(Object)
Point findNextItemCoordinate(int fromIndex, boolean forward, FilterCriteria<Object> criteria)
fromIndex
- the row index to start searching at, if this is larger than the size of
the table model or less than 0 the search starts from either 0 or rowCount - 1 depending on search direction.forward
- if true then the search is forward, backwards otherwisecriteria
- the search criteria
FilterCriteria.include(Object)
boolean isRegularExpressionSearch()
void setRegularExpressionSearch(boolean value)
value
- the valueColumnSearchModel<C> getFilterModel(C columnIdentifier)
columnIdentifier
- the column identifier
boolean isSelectionEmpty()
int getSelectedIndex()
void addSelectedItemIndex(int index)
index
index
- the indexvoid setSelectedItemIndex(int index)
index
index
- the indexvoid clearSelection()
addSelectionChangedListener(java.awt.event.ActionListener)
void setSelectedItemIndexes(List<Integer> indexes)
indexes
- the indexes to selectvoid setSelectedItems(List<R> items)
items
- the items to selectList<R> getSelectedItems()
R getSelectedItem()
Collection<Integer> getSelectedIndexes()
void setSelectedItem(R item)
item
- the item to selectvoid selectAll()
addSelectionChangedListener(java.awt.event.ActionListener)
void addSelectedItemIndexes(List<Integer> indexes)
indexes
- the indexes to add to the selectionint getSelectionCount()
void moveSelectionDown()
addSelectionChangedListener(java.awt.event.ActionListener)
void moveSelectionUp()
addSelectionChangedListener(java.awt.event.ActionListener)
ListSelectionModel getSelectionModel()
void clearSortingState()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |