use of org.freeplane.features.filter.condition.ConditionSnapshotFactory in project freeplane by freeplane.
the class FilterController method createFilter.
private Filter createFilter(final ASelectableCondition selectedCondition) {
final ASelectableCondition filterCondition;
if (selectedCondition == null || selectedCondition.equals(NO_FILTERING)) {
filterCondition = null;
} else if (selectedCondition instanceof ConditionSnapshotFactory) {
filterCondition = ((ConditionSnapshotFactory) selectedCondition).createSnapshotCondition();
} else {
filterCondition = selectedCondition;
}
final Filter filter = new Filter(filterCondition, showAncestors.isSelected(), showDescendants.isSelected(), applyToVisibleNodeOnly.isSelected());
return filter;
}
Aggregations