Class StampAnnotation

  • All Implemented Interfaces:
    com.google.gwt.user.client.rpc.IsSerializable, PermissionsProvider<Annotation>, PropertiesProvider, com.levigo.jadice.web.shared.model.annotation.internal.JwtAnnotation, Serializable

    public class StampAnnotation
    extends TextAnnotation
    An annotation looking like a stamp.

    An stamp annotation could be used to set an entrance day stamp on a interesting part of the displayed document page. For this purpose it can be rotated, changed its appearance color and text style.

    See Also:
    Serialized Form
    • Constructor Detail

      • StampAnnotation

        public StampAnnotation()
    • Method Detail

      • isUseCenterAsOrigin

        public boolean isUseCenterAsOrigin()
      • setUseCenterAsOrigin

        public void setUseCenterAsOrigin​(boolean useCenterAsOrigin)
      • getGap

        public int getGap()
        Returns the insets width of stamp border and displayed text
        Returns:
        int gap between border and text
      • getRotation

        public int getRotation()
        Gets the roration angle.
        Overrides:
        getRotation in class TextAnnotation
        Returns:
        int
      • setGap

        public void setGap​(int gap)
        Returns the insets gap width of stamp border and displayed text
        Parameters:
        gap - gap between border and text
      • setRotation

        public void setRotation​(int rotation)
        Sets the rotation.
        Overrides:
        setRotation in class TextAnnotation
        Parameters:
        rotation - The rotation to set
      • 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 TextAnnotation
        Parameters:
        x - X-position
        y - Y-position
      • getLineCount

        public int getLineCount​(String text)
      • setFontSize

        public void setFontSize​(float fontSize)
        Description copied from class: TextAnnotation
        Sets the font size of the displayed text.
        Overrides:
        setFontSize in class TextAnnotation
        Parameters:
        fontSize - The fontSize to set
      • setHorizontalAlignment

        public void setHorizontalAlignment​(HorizontalAlignment horizontalAlignment)
        Description copied from class: TextAnnotation
        Sets the horizontal alignment of the text within the annotation. This effects the rendered text and the text while editing the annotation. See also: HorizontalAlignment
        Overrides:
        setHorizontalAlignment in class TextAnnotation
        Parameters:
        horizontalAlignment - The alignment for the text.
      • getBounds

        public Rectangle2D getBounds()
        Returns the bounds of this annotation
        Overrides:
        getBounds in class TextAnnotation
        Returns:
        rectangle the bounds of the annotations rectangle
      • translate

        public void translate​(double dx,
                              double dy)
        Description copied from class: Annotation
        Translates this Annotation the indicated distance, to the right along the x coordinate axis, and downward along the y coordinate axis.
        Overrides:
        translate in class TextAnnotation
        Parameters:
        dx - the distance to move this Rectangle along the x axis
        dy - the distance to move this Rectangle along the y axis
      • copy

        public StampAnnotation copy()
        Specified by:
        copy in interface com.levigo.jadice.web.shared.model.annotation.internal.JwtAnnotation
        Overrides:
        copy in class TextAnnotation
      • isAllowMultipleTextlines

        public boolean isAllowMultipleTextlines()
      • setAllowMultipleTextlines

        public void setAllowMultipleTextlines​(boolean allowMultipleTextlines)
      • setFontFace

        public void setFontFace​(String fontFace)
        Description copied from class: TextAnnotation
        Sets the logical name of the font to display.
        Overrides:
        setFontFace in class TextAnnotation
        Parameters:
        fontFace - The fontFace to set
      • isAllowRotation

        public boolean isAllowRotation()
        Returns current rotation handle flag.
        Returns:
        Current flag
      • setAllowRotation

        public void setAllowRotation​(boolean allowRotation)
        Set flag to enable/disable the rotation handle.
        Parameters:
        allowRotation -
      • isIgnoreLineWidth

        public boolean isIgnoreLineWidth()
      • setIgnoreLineWidth

        public void setIgnoreLineWidth​(boolean ignoreLineWidth)
        Flag to ignore line width for annotation size update.
        Parameters:
        ignoreLineWidth -