sclass BackgroundProcessesUI {
Set processes = syncLinkedHashSet();
SimpleLiveValue lvCount = new SimpleLiveValue(Int, 0);
JLabel shortLabel() {
ret bindToolTipToTransformedLiveValue(
n -> n2(n, "background process", "background processes"),
transformedLiveValueLabel(n -> n2(n), lvCount));
}
void add(A process) {
if (processes.add(process))
lvCount.set(l(processes));
}
void remove(A process) {
if (processes.remove(process))
lvCount.set(l(processes));
}
}