use of org.freeplane.features.filter.condition.NoFilteringCondition in project freeplane by freeplane.
the class FilterController method saveConditions.
void saveConditions(final DefaultComboBoxModel filterConditionModel, final String pathToFilterFile) throws IOException {
final XMLElement saver = new XMLElement();
saver.setName("filter_conditions");
final Writer writer = new FileWriter(pathToFilterFile);
for (int i = 0; i < filterConditionModel.getSize(); i++) {
final ASelectableCondition cond = (ASelectableCondition) filterConditionModel.getElementAt(i);
if (cond != null && !(cond instanceof NoFilteringCondition)) {
cond.toXml(saver);
}
}
final XMLWriter xmlWriter = new XMLWriter(writer);
xmlWriter.write(saver, true);
writer.close();
}
Aggregations