if (this.restartAnimation) { for (int i = 0; i < this.yAdjustments.length; i++ ) { this.yAdjustments[i] = this.contentHeight;
if (this.isAnimationRunning) { boolean startNextPeriode = true; int max = this.currentMaximum; if (this.isDownwardsAnimation) { for (int i = 0; i < this.yAdjustments.length; i++ ) { int y = this.yAdjustments[i] ; if (y > max) { y -= this.speed; if (y < max) { y = max; } startNextPeriode = false; } max += this.damping; if (max > 0) { max = 0; } this.yAdjustments[i] = y; } } else { for (int i = 0; i < this.yAdjustments.length; i++ ) { int y = this.yAdjustments[i]; if (y < max) { y += this.speed; if (y > max) { y = max; } startNextPeriode = false; } max -= this.damping; if (max < 0) { max = 0; } this.yAdjustments[i] = y; }
	public boolean animate() {		if (this.restartAnimation) {			for (int i = 0; i < this.yAdjustments.length; i++ ) {				this.yAdjustments[i] = this.contentHeight; 			}			this.isAnimationRunning = true;			this.restartAnimation = false;			return true;		} else if (this.isAnimationRunning) {			boolean continueAnimation = false;			for (int i = 0; i < this.yAdjustments.length; i++ ) {				int y = this.yAdjustments[i] - 10;				if (y < 0) {					y = 0;				} else {					continueAnimation = true;				}				this.yAdjustments[i] = y;				}			if (!continueAnimation) {				this.isAnimationRunning = false;			}			return true;		} else {			return false;		}	}