Changeset 8431 for trunk/gli/src/org/greenstone/gatherer/gui/metaaudit
- Timestamp:
- 2004-11-03T11:30:47+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/metaaudit/Filter.java
r8243 r8431 84 84 } 85 85 } 86 87 86 88 /** Determine if a certain row should be shown in the table by checking it against all the current filters. 87 89 * @param model The <strong>TableModel</strong> the row is from. … … 89 91 * @return <i>true</i> if the rows data matches all autofilters set and should be displayed, <i>false</i> otherwise. 90 92 */ 91 public boolean filter(TableModel model, int row) {92 boolean result = true; 93 for (int i = 0; result &&i < filters.length; i++) {94 if (filters[i] != null && filters[i].active()) {93 public boolean filter(TableModel model, int row) 94 { 95 for (int i = 0; i < filters.length; i++) { 96 if (filters[i] != null && filters[i].active()) { 95 97 ArrayList values = (ArrayList) model.getValueAt(row, i); 96 result = result && filters[i].filter(values); 98 if (filters[i].filter(values) == false) { 99 return false; 100 } 97 101 } 98 102 } 99 return result; 103 104 return true; 100 105 } 106 107 101 108 /** Retrieve the autofilter associated with a certain column. 102 109 * @param column The column number as an <i>int</i>.
Note:
See TracChangeset
for help on using the changeset viewer.