Class TextHighlightAnnotation

    • Field Detail

      • underscored

        protected boolean underscored
      • strikethrough

        protected boolean strikethrough
      • highlighted

        protected boolean highlighted
    • Constructor Detail

      • TextHighlightAnnotation

        public TextHighlightAnnotation()
    • Method Detail

      • addArea

        public void addArea​(Path2D path)
        Add Path2D object representing a rectangle (defined with 4 points) covering text content.

        Supported path operations (see PathIterator):

        • "move-to" "line-to" "line-to" "line-to"
        • "move-to" "line-to" "line-to" "line-to" "close"
        • "move-to" "line-to" "line-to" "line-to" "line-to" (last line-to must close path)
        • "move-to" "line-to" "line-to" "line-to" "line-to" "close" (last line-to must close path)
        Parameters:
        path - Path2D object to add to area.
        Throws:
        IllegalArgumentException - Thrown by unsupported path definitions.
      • translate

        public void translate​(double dx,
                              double dy)
        Not supported, annotation is not intended to be movable via GUI actions. It is possible to move the annotation via setLocation(double, double) method.
        Specified by:
        translate in class Annotation
        Parameters:
        dx - the distance to move this Rectangle along the x axis
        dy - the distance to move this Rectangle along the y axis
      • setSize

        public void setSize​(double width,
                            double height)
        Not supported, annotation is not intended to be resizable.
        Specified by:
        setSize in class Annotation
      • setLocation

        public void setLocation​(double x,
                                double y)
        Description copied from class: ShapeBasedAnnotation
        Set the location (upper-left corner) of the annotation to the given point. Caveat: it is currently necessary, to force a repaint on the viewer in order to make the results of the modification visible. Moreover there are no modification events fired on the page and document. This will change in the future.
        Overrides:
        setLocation in class ShapeBasedAnnotation
        Parameters:
        x - X-position
        y - Y-position
      • isUnderscored

        public boolean isUnderscored()
      • setUnderscored

        public void setUnderscored​(boolean underscored)
        Enable / disable underscore effect.
        Parameters:
        underscored -
      • isStrikethrough

        public boolean isStrikethrough()
      • setStrikethrough

        public void setStrikethrough​(boolean strikethrough)
        Enable / disable strike through effect.
        Parameters:
        strikethrough -
      • isHighlighted

        public boolean isHighlighted()
      • setHighlighted

        public void setHighlighted​(boolean highlighted)
        Enable / disable highlight effect.
        Parameters:
        highlighted -