void () { if (!myDisposed) { myMouseOverScrollbarExpandAnimator = new Animator("Mac scrollbar mouse over animator", 10, 200, false) { @Override protected void paintCycleEnd() { myMouseOverScrollbarExpandLevel = 1; if (scrollbar != null) scrollbar.repaint(); } @Override public void paintNow(int frame, int totalFrames, int cycle) { int delay = totalFrames / 2; int frameAfterDelay = frame - delay; if (frameAfterDelay > 0) { myMouseOverScrollbarExpandLevel = frameAfterDelay / (float)(totalFrames - delay); if (scrollbar != null) scrollbar.repaint(); } } }; myMacScrollbarFadeTimer = new Alarm(); myMacScrollbarFadeAnimator = new Animator("Mac scrollbar fade animator", 30, 300, false) { @Override protected void paintCycleEnd() { myMacScrollbarHidden = true; myMouseOverScrollbar = false; myMouseOverScrollbarExpandLevel = 0; if (scrollbar != null) scrollbar.repaint(); } @Override public void paintNow(int frame, int totalFrames, int cycle) { myMacScrollbarFadeLevel = frame / (float)totalFrames; if (scrollbar != null) scrollbar.repaint(); } }; } }