private CustomProgressBar createProgressBar() { final CustomProgressBar progress = new CustomProgressBar(); progress.setName("PROGRESSBAR"); color = UNKNOWN_COLOR; Timer timer = new Timer( animator.getAnimationRate(), new ActionListener() { @Override public void actionPerformed(ActionEvent e) { progress.setForeground(animator.shiftColorOnAnimationTick(color)); progress.repaint(); animator.tick(); } }); timer.start(); return progress; }
public int getAngerLevel() { return animator.getAngerLevel(); }
public void setAngerLevel(int anger) { animator.setAngerLevel(anger); }
public void setAngerBasedOnTime(long timeSinceGreen) { animator.setAngerBasedOnTime(timeSinceGreen); }