expandedProperty().addListener((Observable observable) -> {
expansionMap.put(f.getDisplayName(), isExpanded());
});
if (f instanceof CompoundFilter) {
CompoundFilter cf = (CompoundFilter) f;
for (Filter af : cf.getSubFilters()) {
getChildren().add(new FilterTreeItem(af, expansionMap));
}
}
}