private void restoreHighlightStyle(Annotation annotation) {
        if (annotation instanceof LinkAnnotation) {
            LinkAnnotation linkAnnotation = (LinkAnnotation) annotation;
            Object object = linkAnnotation.getObject(
                    LinkAnnotation.HIGHLIGHT_MODE_KEY);
            // update the entry
            if (object != null && object instanceof Name) {
                linkAnnotation.getEntries().put(
                        LinkAnnotation.HIGHLIGHT_MODE_KEY,
                        new Name(highlightStyle));
            } else {
                // add the new entry
                linkAnnotation.getEntries().put(
                        LinkAnnotation.HIGHLIGHT_MODE_KEY,
                        new Name(highlightStyle));
            }
        }
    }