I looked up how to use multiple filters on here with a regular table and the answers all pointed to GlazedLists
. However, the answers didn't specify how to use it. I was able to get one filter to work but do not know how to get more than one.
For one filter I used:
// nameE is a BasicEventList containing classes (name) which
// contain the table values
TextFilterList filtered = new TextFilterList(nameE);
JTextField filterEdit = filtered.getFilterEdit();
// Inside the table value class (name) there is a filter for myName
public void getFilterStrings(List baseList) {
baseList.add(myName);
}
Duplicating the code and creating another JTextField
does not work. I looked this problem up and it appears CompositeMatcherEditor
may work. The problem is I do not know how to implement this.
Also, I am using Eclipse. I downloaded GlazedLists
1.8.0 and dropped it into Eclipse. However, I can't use it. I have red squares all over (except for the source folder)! I even added the jar file.
I hope I have explained myself correctly. Please let me know if I need to expand.
My Pastebin: Name, Browser, TableFormat, TableModel