Search in sources :

Example 1 with ConditionSnapshotFactory

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;
}
Also used : ConditionSnapshotFactory(org.freeplane.features.filter.condition.ConditionSnapshotFactory) ASelectableCondition(org.freeplane.features.filter.condition.ASelectableCondition)

Aggregations

ASelectableCondition (org.freeplane.features.filter.condition.ASelectableCondition)1 ConditionSnapshotFactory (org.freeplane.features.filter.condition.ConditionSnapshotFactory)1