public void onMouseDown(MouseDownEvent event) {
scrollLeftBtnDown = true;
scrollLeftBtnTimer.scheduleRepeating(CoreConstants.DEFAULT_DELAY_MILLIS);
}
});
scrollLeftBtn.addMouseUpHandler(new MouseUpHandler() {
public void onMouseUp(MouseUpEvent event) {
scrollLeftBtnDown = false;
scrollLeftBtnTimer.cancel();
}
});
navBar.add(scrollLeftBtn);
scrollRightBtn = new Button(Caption.IMAGES.toolArrowRight().getHTML(),
new ClickHandler() {
public void onClick(ClickEvent event) {
createScrollAnimation();
scrollAnimation.scrollTabBar(ScrollTabBar.this, SCROLL_OFFSET,
isAnimationEnabled);
}
});
scrollRightBtn.addMouseDownHandler(new MouseDownHandler() {
public void onMouseDown(MouseDownEvent event) {
scrollRightBtnDown = true;
scrollRightBtnTimer.scheduleRepeating(CoreConstants.DEFAULT_DELAY_MILLIS);
}
});
scrollRightBtn.addMouseUpHandler(new MouseUpHandler() {
public void onMouseUp(MouseUpEvent event) {
scrollRightBtnDown = false;
scrollRightBtnTimer.cancel();
}
});