code: private void changePage(final int direction) {
  		int currentPage = pages.indexOf(cardManager.getVisible());
  		currentPage = Math.min(2, Math.max(0, currentPage + direction));
  
  		cardManager.makeVisible(pages.get(currentPage));
  
  		prevButton.setDisabled(currentPage == 0);
  		nextButton.setDisabled(currentPage == 2);
  		finishButton.setDisabled(currentPage != 2);
  
  		cancelButton.setUnsavedChanges(currentPage > 0);
  	}
docs: Handles a pagination request.
  
  @param direction the direction and amount of pages to move through.