return filter;
}
private CardCriteria buildCriteria() {
CardCriteria criteria = new CardCriteria();
criteria.black(this.tbBlack.isSelected());
criteria.blue(this.tbBlue.isSelected());
criteria.green(this.tbGreen.isSelected());
criteria.red(this.tbRed.isSelected());
criteria.white(this.tbWhite.isSelected());
criteria.colorless(this.tbColorless.isSelected());
if (this.tbLand.isSelected()) {
criteria.types(CardType.LAND);
}
if (this.tbArifiacts.isSelected()) {
criteria.types(CardType.ARTIFACT);
}
if (this.tbCreatures.isSelected()) {
criteria.types(CardType.CREATURE);
}
if (this.tbEnchantments.isSelected()) {
criteria.types(CardType.ENCHANTMENT);
}
if (this.tbInstants.isSelected()) {
criteria.types(CardType.INSTANT);
}
if (this.tbSorceries.isSelected()) {
criteria.types(CardType.SORCERY);
}
if (this.tbPlaneswalkers.isSelected()) {
criteria.types(CardType.PLANESWALKER);
}
// criteria.types(CardType.TRIBAL);
// criteria.types(CardType.CONSPIRACY);
if (this.cbExpansionSet.isVisible()) {
String expansionSelection = this.cbExpansionSet.getSelectedItem().toString();
if (!expansionSelection.equals("- All Sets")) {
List<String> setCodes = ConstructedFormats.getSetsByFormat(expansionSelection);
criteria.setCodes(setCodes.toArray(new String[0]));
}
}
return criteria;
}