Class ArrowAnnotation

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

public class ArrowAnnotation extends LineAnnotation
An annotation looking like an arrow.

An arrow annotation could be used to point to something interesting part of the displayed document page. For this purpose it can be rotated and change its appearance color.

See Also:
  • Constructor Details

    • ArrowAnnotation

      public ArrowAnnotation()
  • Method Details

    • setTip

      public void setTip(Point2D tip)
    • setBottom

      public void setBottom(Point2D bottom)
    • getHeadEdges

      public Point2D[] getHeadEdges()
    • updateShape

      protected void updateShape(LineAnnotation previousState)
      Update the polygon representing the arrow.
      Overrides:
      updateShape in class LineAnnotation
    • getHeadAngle

      public int getHeadAngle()
      Returns the head Angle in degrees.
      Returns:
      Head angle
    • getHeadLength

      public int getHeadLength()
      Returns the head length.
      Returns:
      Head length
    • setHeadAngle

      public void setHeadAngle(int headAngle)
      Sets the head angle in degrees.
      Parameters:
      headAngle - The headAngle to set
    • setHeadLength

      public void setHeadLength(int headLength)
      Sets the head length which is defined by the isHeadLengthInPercent() value.
      Parameters:
      headLength - The headLength to set
    • getPoints

      public Point2D[] getPoints()
      Get the points of the arrow in a point array:
      • bottom
      • tip
      • edge of head arm 1
      • edge of head arm 2
      Overrides:
      getPoints in class LineAnnotation
      Returns:
      Point2D[]
    • getBounds

      public Rectangle2D getBounds()
      Description copied from class: ShapeBasedAnnotation
      Returns an integer Rectanglethat completely encloses the annotation.
      Overrides:
      getBounds in class LineAnnotation
      Returns:
      Rectangle annotation bounding box
    • copy

      public ArrowAnnotation copy()
      Specified by:
      copy in interface com.levigo.jadice.web.shared.model.annotation.internal.JwtAnnotation
      Overrides:
      copy in class LineAnnotation
      See Also:
      • JwtAnnotation.copy()
    • copyAttributesTo

      protected void copyAttributesTo(Annotation annotation)
      Overrides:
      copyAttributesTo in class LineAnnotation
    • isHeadLengthInPercent

      public boolean isHeadLengthInPercent()
      Returns current head length flag.
      Returns:
      Head length flag
    • setHeadLengthInPercent

      public void setHeadLengthInPercent(boolean headLengthInPercent)
      Sets the mode for the setHeadAngle(int) value:
      true - head length in percent of the total length.
      false - head length in pixel.
      Default value is true.
      Parameters:
      headLengthInPercent -