|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sciapp.filter.TableFilter
com.sciapp.filter.ListTableFilter
public class ListTableFilter
A table filter for filtering the rows of a TableModel based on a list of row indexes.
The list of rows that are accepted are passed in the constructor or can
be manipulated later on with the addIndex(int), removeIndex(int),
setAcceptedIndexes(int[]) and clear() methods.
| Field Summary |
|---|
| Fields inherited from class com.sciapp.filter.TableFilter |
|---|
ALL_COLUMNS, column, filter |
| Constructor Summary | |
|---|---|
ListTableFilter()
Constructs a ListTableFilter. |
|
ListTableFilter(int[] acceptedIndexes)
Constructs a ListTableFilter. |
|
| Method Summary | |
|---|---|
void |
addIndex(int index)
Adds a row index to the list of accepted indexes. |
void |
clear()
Clears all row indexes, therefore blocking all rows. |
boolean |
filter(ListTableModel model,
Object row)
This method will throw an UnsupportedOperationException since the row index cannot be evaluated from the supplied parameters. |
boolean |
filter(TableModel model,
int rowIndex)
Decides whether a particular row of a JTable will be filtered. |
int[] |
getAcceptedIndexes()
Retrieves the row indexes that this table filter will allow. |
void |
removeIndex(int index)
Removes a row index from the list of accepted indexes. |
void |
setAcceptedIndexes(int[] acceptedIndexes)
Assigns the row indexes that this table filter will allow. |
| Methods inherited from class com.sciapp.filter.TableFilter |
|---|
getColumn, getFilter, setColumn, setFilter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ListTableFilter()
public ListTableFilter(int[] acceptedIndexes)
| Method Detail |
|---|
public void addIndex(int index)
index - a row index that is accepted when filtering.public void clear()
public boolean filter(ListTableModel model,
Object row)
filter in class TableFiltermodel - the ListTableModel that holds a reference to the tabular row datarow - the row of the table to filter, represented as an object
public boolean filter(TableModel model,
int rowIndex)
filter in class TableFiltermodel - the TableModel that holds the unfiltered row datarowIndex - the index of the row of the table to filter
public int[] getAcceptedIndexes()
public void removeIndex(int index)
index - the row index to remove. The associated row will be blocked.public void setAcceptedIndexes(int[] acceptedIndexes)
acceptedIndexes - an array of row indexes that this table filter will allow while filtering
|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||