Class StampAnnotation

All Implemented Interfaces:
PermissionsProvider<Annotation>, PropertiesProvider, com.levigo.jadice.web.shared.model.annotation.internal.JwtAnnotation, Serializable, org.jadice.util.base.MementoOriginator

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:
  • Constructor Details

    • StampAnnotation

      public StampAnnotation()
  • Method Details

    • isUseCenterAsOrigin

      public boolean isUseCenterAsOrigin()
    • setUseCenterAsOrigin

      public void setUseCenterAsOrigin(boolean useCenterAsOrigin)
    • setText

      public void setText(String text)
      Description copied from class: TextAnnotation
      Sets the display text of this annotation. If the given text is null or empty a default text will be set.
      Overrides:
      setText in class TextAnnotation
      Parameters:
      text -
      See Also:
    • 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.
    • getPathIterator

      public PathIterator getPathIterator()
      Overrides:
      getPathIterator in class TextAnnotation
      Returns:
      Returns the PathIterator for the rotated shape
    • 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
    • copyAttributesTo

      protected void copyAttributesTo(Annotation annotation)
      Overrides:
      copyAttributesTo in class TextAnnotation
    • isAllowMultipleTextlines

      public boolean isAllowMultipleTextlines()
    • setAllowMultipleTextlines

      public void setAllowMultipleTextlines(boolean allowMultipleTextlines)
    • getShape

      public RectangularShape getShape()
      Description copied from class: ShapeBasedAnnotation
      Shape for render structure
      Overrides:
      getShape in class RectangleAnnotation
      Returns:
      Shape
    • 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
    • setItalic

      public void setItalic(boolean fontStyleItalic)
      Overrides:
      setItalic in class TextAnnotation
    • setBold

      public void setBold(boolean fontStyleBold)
      Overrides:
      setBold in class TextAnnotation
    • setLineWidth

      public void setLineWidth(float newValue)
      Description copied from class: ShapeBasedAnnotation
      Sets the border line width of this annotation.

      Notice, if this annotation has disabled the line painted attribute

      Overrides:
      setLineWidth in class ShapeBasedAnnotation
      Parameters:
      newValue - the new line width
      See Also:
    • isIgnoreLineWidth

      public boolean isIgnoreLineWidth()
    • setIgnoreLineWidth

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