reactfx/src/main/java/org/reactfx/Indicator.java
public <T> T onWhile(Supplier<T> f) {
        try(Guard g = on()) {
            return f.get();
        }
    }
public <T> T onWhile(Supplier<T> f) {
        try(Guard g = on()) {
            return f.get();
        }
    }
Runs the given computation, making sure this indicator is on.
When done, this indicator is reset to the previous state.

<pre>
T t = indicator.onWhile(f);
</pre>

is equivalent to

<pre>
T t;
try(Guard g = on()) {
t = f.get();
}
</pre>