use of dna.renderer.AttributeTableModel in project dna by leifeld.
the class AttributePanel method variableFilter.
private void variableFilter(String variable, int statementTypeId) {
RowFilter<AttributeTableModel, Integer> attributeFilter = new RowFilter<AttributeTableModel, Integer>() {
public boolean include(Entry<? extends AttributeTableModel, ? extends Integer> entry) {
AttributeTableModel atm = entry.getModel();
AttributeVector av = atm.get(entry.getIdentifier());
int stId = av.getStatementTypeId();
String var = av.getVariable();
if (variable.equals(var) && stId == statementTypeId) {
return true;
} else {
return false;
}
}
};
sorter.setRowFilter(attributeFilter);
}
Aggregations