@Override public void refresh(Object obj) { super.refresh(obj); // Every sub-tree refresh should update the hidden elements label int totalElements = countChildren(getRoot()); int filteredElements = countFilteredChildren(getRoot()); hiddenElementCount.setValue(totalElements - filteredElements); }