Package adams.gui.core
Interface SearchableListModel
-
- All Superinterfaces:
ListModel
- All Known Implementing Classes:
SearchableWrapperListModel
public interface SearchableListModel extends ListModel
Interface for ListModels that can be searched.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getActualIndex(int index)
Returns the actual index in the model.int
getActualSize()
Returns the actual size of the model.String
getSeachString()
Returns the current search string.boolean
isRegExpSearch()
Returns whether the last search was a regular expression based one.void
search(String searchString, boolean regexp)
Performs a search for the given string.-
Methods inherited from interface javax.swing.ListModel
addListDataListener, getElementAt, getSize, removeListDataListener
-
-
-
-
Method Detail
-
getActualIndex
int getActualIndex(int index)
Returns the actual index in the model.- Parameters:
index
- the index of the currently displayed data- Returns:
- the index in the underlying data
-
getActualSize
int getActualSize()
Returns the actual size of the model.- Returns:
- the size in the underlying data
-
search
void search(String searchString, boolean regexp)
Performs a search for the given string. Limits the display of rows to ones containing the search string.- Parameters:
searchString
- the string to search forregexp
- whether to perform regular expression matching or just plain string comparison
-
getSeachString
String getSeachString()
Returns the current search string.- Returns:
- the search string, null if not filtered
-
isRegExpSearch
boolean isRegExpSearch()
Returns whether the last search was a regular expression based one.- Returns:
- true if last search was a reg exp one
-
-