public void updateDocumentView() {

        if (disposed)
            return;
        int oldTool = getDocumentViewToolMode();
        try {
            setDisplayTool(DocumentViewModelImpl.DISPLAY_TOOL_WAIT);

            reflectPageChangeInComponents();


            PageTree pageTree = getPageTree();

            if (currentPageNumberTextField != null)
                currentPageNumberTextField.setText(Integer.toString(documentViewController.getCurrentPageDisplayValue()));
            if (numberOfPagesLabel != null) {

                if (pageTree != null) {
                    Object[] messageArguments = new Object[]{String.valueOf(pageTree.getNumberOfPages())};
                    MessageFormat formatter =
                            new MessageFormat(
                                    messageBundle.getString("viewer.toolbar.pageIndicator"));
                    String numberOfPages = formatter.format(messageArguments);

                    numberOfPagesLabel.setText(numberOfPages);
                }
            }

            if (statusLabel != null) {
                if (pageTree != null) {
                    // progress bar for printing
                    Object[] messageArguments = new Object[]{
                            String.valueOf(documentViewController.getCurrentPageDisplayValue()),
                            String.valueOf(pageTree.getNumberOfPages())
                    };
                    MessageFormat formatter = new MessageFormat(
                            messageBundle.getString("viewer.statusbar.currentPage"));
                    statusLabel.setText(formatter.format(messageArguments));
                }
            }
        } catch (Exception e) {
            logger.log(Level.FINE, "Error updating page view.", e);
        } finally {
            setDisplayTool(oldTool);
        }
    }