public void setSelectedPage(int index) {
setSelectedPage(index, true);
}
public void setSelectedPage(int index, boolean issueEvent) {
LightArrayInt pagesX = scrollPanel.getPagesX();
if (index < 0 || index >= pagesX.length()) {
throw new IllegalArgumentException("invalid value for index: " + index);
}
currentPage = index;
scrollPanel.scrollToPage(index, 0, 300, issueEvent);
}