private void updateGlobalStrollBarView() {
    long pagesAmount;
    try {
      pagesAmount = dataProvider.getPagesAmount();
    }
    catch (IOException e) {
      LOG.warn(e);
      return;
    }

    if (pagesAmount >= Integer.MAX_VALUE) {
      LOG.warn("[Large File Editor Subsystem] EditorModel.updateGlobalStrollBarView():" +
               "pagesAmount > Integer.MAX_VALUE. pagesAmount=" + pagesAmount);
    }

    int extent = 1; // to make thumb of minimum size
    myGlobalScrollBar.setValues((int)targetVisiblePosition.pageNumber, extent, 0, (int)pagesAmount + 1);
  }
private void updateGlobalStrollBarView()