*/
    public void propertyChange(PropertyChangeEvent evt) {
        Object newValue = evt.getNewValue();
        Object oldValue = evt.getOldValue();
        String propertyName = evt.getPropertyName();
        if (propertyName.equals(PropertyConstants.DOCUMENT_CURRENT_PAGE)) {
            if (currentPageNumberTextField != null && newValue instanceof Integer) {
                updateDocumentView();
            }
        }
        // text selected,
        else if (propertyName.equals(PropertyConstants.TEXT_SELECTED)) {
            // enable the copy menu
            boolean canExtract = havePermissionToExtractContent();
            setEnabled(copyMenuItem, canExtract);
            setEnabled(deselectAllMenuItem, canExtract);
        }
        // text deselected
        else if (propertyName.equals(PropertyConstants.TEXT_DESELECTED)) {
            // disable the copy menu
            boolean canExtract = havePermissionToExtractContent();
            setEnabled(copyMenuItem, false);
            setEnabled(deselectAllMenuItem, false);
            setEnabled(selectAllMenuItem, canExtract);
        }
        // select all
        else if (propertyName.equals(PropertyConstants.TEXT_SELECT_ALL)) {
            boolean canExtract = havePermissionToExtractContent();
            setEnabled(selectAllMenuItem, false);
            setEnabled(deselectAllMenuItem, canExtract);
            setEnabled(copyMenuItem, canExtract);
        }
        // annotation is selected
        else if (propertyName.equals(PropertyConstants.ANNOTATION_SELECTED)) {
            // enable the delete menu
            setEnabled(deleteMenuItem, true);
            // get the current selected tool, we only care about the select tool or
            // link annotation tool.
            if (documentViewController.getToolMode() ==
                    DocumentViewModelImpl.DISPLAY_TOOL_SELECTION) {
                AnnotationComponentImpl annotationComponent =
                        (AnnotationComponentImpl) newValue;
                if (annotationComponent != null &&
                        annotationComponent.getAnnotation() != null) {
                    // set the annotationPane with the new annotation component
                    if (logger.isLoggable(Level.FINE)) {
                        logger.fine("selected annotation " + annotationComponent);
                    }
                    showAnnotationPanel(annotationComponent);
                }
            }
        }
        // annotation is deselected
        else if (propertyName.equals(PropertyConstants.ANNOTATION_DESELECTED)) {
            if (documentViewController.getToolMode() ==
                    DocumentViewModelImpl.DISPLAY_TOOL_SELECTION) {
                if (logger.isLoggable(Level.FINE)) {
                    logger.fine("Deselected current annotation");
                }
                // disable the delete menu
                setEnabled(deleteMenuItem, false);
                if (annotationPanel != null) {
                    annotationPanel.setEnabled(false);
                }
            }
        }
        // annotation bounds have changed.
        else if (propertyName.equals(PropertyConstants.ANNOTATION_BOUNDS)) {
            if (documentViewController.getToolMode() ==
                    DocumentViewModelImpl.DISPLAY_TOOL_SELECTION) {
                AnnotationState oldAnnotationState = (AnnotationState) oldValue;
                AnnotationState newAnnotationState = (AnnotationState) newValue;

                // saves the state changes back to the document structure.
                newAnnotationState.apply(newAnnotationState);
                newAnnotationState.restore();

                // add new states to care taker implementation.
                documentViewController.getDocumentViewModel()
                        .addMemento(oldAnnotationState,
                                newAnnotationState);
            }
            // check to see if undo/redo can be enabled/disabled.
            reflectUndoCommands();
        }
        // divider has been moved, save the location as it changes.
        else if (propertyName.equals(JSplitPane.LAST_DIVIDER_LOCATION_PROPERTY)) {
            JSplitPane sourceSplitPane = (JSplitPane) evt.getSource();
            int dividerLocation = (Integer) evt.getNewValue();
            if (sourceSplitPane.getDividerLocation() != dividerLocation) {
                if (propertiesManager != null && dividerLocation > 5) {
                    utilityAndDocumentSplitPaneLastDividerLocation = dividerLocation;
                    propertiesManager.setInt(
                            PropertiesManager.PROPERTY_DIVIDER_LOCATION,
                            utilityAndDocumentSplitPaneLastDividerLocation);
                }
            }
        }
    }