Class CalloutAnnotation

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

public class CalloutAnnotation extends TextAnnotation
A sub type of a TextAnnotation which has a text box and a callout arrow line which points to a specific point in the document.

At the moment, the arrow head is always an "open arrow". Its size can be defined via the "arrow width" and "arrow height" parameters.

See Also:
  • Field Details

    • rectangleTextbox

      protected Rectangle2D rectangleTextbox
    • callout

      protected Path2D callout
    • arrowWidth

      protected int arrowWidth
    • arrowHeight

      protected int arrowHeight
  • Constructor Details

    • CalloutAnnotation

      public CalloutAnnotation()
  • Method Details

    • setRectangleTextbox

      public void setRectangleTextbox(Rectangle2D rectangleTextbox)
      Set the Rectangle of the textbox of this callout annotation.
      rectangleTextbox - the rectangle of the textbox
    • getRectangleTextbox

      public Rectangle2D getRectangleTextbox()
      Returns the rectangle of the textbox of this CalloutAnnotation.
      the textbox rectangle
    • setCallout

      public void setCallout(Path2D callout)
      Sets the callout of this CalloutAnnotation. The callout is the arrow line with the following components (points):
      • Head-Point of the arrow
      • Knee-Point of the arrow
      • Anchor-Point of the arrow, anchoring it at the textbox
      callout - the new callout
      IllegalArgumentException - if the callout does not consist of exactly 3 points
    • 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.
      translate in class TextAnnotation
      dx - the distance to move this Rectangle along the x axis
      dy - the distance to move this Rectangle along the y axis
    • 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.
      setLocation in class TextAnnotation
      x - X-position
      y - Y-position
    • getCallout

      public Path2D getCallout()
    • clone

      public CalloutAnnotation clone()
      clone in class Annotation
    • copyAttributesTo

      protected void copyAttributesTo(Annotation annotation)
      copyAttributesTo in class TextAnnotation
    • getArrowWidth

      public int getArrowWidth()
    • setArrowWidth

      public void setArrowWidth(int arrowWidth)
    • getArrowHeight

      public int getArrowHeight()
    • setArrowHeight

      public void setArrowHeight(int arrowHeight)
    • copy

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