public class FilterListModel<T>
extends javax.swing.AbstractListModel<T>
Constructor and Description |
---|
FilterListModel()
Default constructor.
|
FilterListModel(java.lang.String title,
java.util.function.BiPredicate<T,java.lang.String> matcher)
Constructor with custom list element matching.
|
Modifier and Type | Method and Description |
---|---|
T |
getElementAt(int i) |
javax.swing.JTextField |
getFilterField()
Returns the text field used for filtering.
|
javax.swing.JComponent |
getFilterPanel()
Returns a panel containing the text field and some surrounding
components.
|
int |
getSize() |
void |
setItems(java.util.List<T> items)
Sets the unfiltered content of this model.
|
public FilterListModel()
public FilterListModel(java.lang.String title, java.util.function.BiPredicate<T,java.lang.String> matcher)
title
- title textmatcher
- indicates whether a list element is to be included
given string content of this model's text fieldpublic void setItems(java.util.List<T> items)
items
- list itemspublic javax.swing.JTextField getFilterField()
public javax.swing.JComponent getFilterPanel()
public int getSize()
public T getElementAt(int i)