void (double fraction) { if (Double.isNaN(fraction)) { fraction = 1.0; } if (myIndeterminate) { if (myFraction >= 1.0) { myIndeterminateInc = -INDETERMINATE_INC_OFFSET; } else if (myFraction <= 0) { myIndeterminateInc = INDETERMINATE_INC_OFFSET; } final boolean changed = myFraction == 0 || getBricksToDraw(myFraction) != getBricksToDraw(myFraction + myIndeterminateInc); myFraction += myIndeterminateInc; if (changed) { repaint(); } } else { boolean changed = myFraction == 0 || getBricksToDraw(myFraction) != getBricksToDraw(fraction); myFraction = fraction; if (changed) { repaint(); } } }