}
private class PageNumberListener implements AdjustmentListener {
public void adjustmentValueChanged(AdjustmentEvent e) {
if (displayMode == PreviewPanel.CONTINUOUS || displayMode == PreviewPanel.CONT_FACING) {
Adjustable a = e.getAdjustable();
int value = +e.getValue();
int min = a.getMinimum();
int max = a.getMaximum();
int page = ( (renderer.getNumberOfPages() * value) / (max - min) );
if (page != currentPage) {
int oldPage = currentPage;
currentPage = page;
firePageChange(oldPage, currentPage);