Class Line

java.lang.Object
org.jpedal.annotation.Annotation
org.jpedal.annotation.Markup
org.jpedal.annotation.Line

public final class Line extends org.jpedal.annotation.Markup
Defines a Line annotation.

The purpose of a line annotation is to display a single straight line on the page.

  • Constructor Summary

    Constructors
    Constructor
    Description
    Line(float[] rect, float[] color, float[] line)
    Create a new Line annotation.
    Line(float[] rect, int flags, String contents, float[] color, float strokingAlpha, float nonStrokingAlpha, String title, float[] line, LineEndingStyle startStyle, LineEndingStyle endStyle, float[] endingColor, float leaderLength, float leaderExtensionLength, CaptionPosition captionPosition)
    Create a new Line annotation.
    Line(float[] rect, String contents, float[] color, float[] line)
    Create a new Line annotation.
    Line(float[] rect, String contents, float[] color, float[] line, CaptionPosition captionPosition)
    Create a new Line annotation.
    Line(float[] rect, String contents, float[] color, float[] line, LineEndingStyle startStyle, LineEndingStyle endStyle, float[] endingColor, float leaderLength, float leaderExtensionLength, CaptionPosition captionPosition)
    Create a new Line annotation.
    Line(float[] rect, String contents, float[] color, float[] line, LineEndingStyle startStyle, LineEndingStyle endStyle, float[] endingColor, CaptionPosition captionPosition)
    Create a new Line annotation.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.jpedal.io.annotation.utils.AnnotDict
    Creates the annotation dictionary.

    Methods inherited from class org.jpedal.annotation.Annotation

    getFlagsValue

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Line

      public Line(float[] rect, float[] color, float[] line)
      Create a new Line annotation.
      Parameters:
      rect - two diagonally opposite coordinate points that indicate the annotation's bounding box
      color - the color of the annotation
      line - An array of four numbers, [x1 y1 x2 y2], specifying the starting and ending coordinates of the line in default user space. If the leader length is not equal to zero, this value shall represent the endpoints of the leader lines rather than the endpoints of the line itself.
    • Line

      public Line(float[] rect, String contents, float[] color, float[] line)
      Create a new Line annotation.
      Parameters:
      rect - two diagonally opposite coordinate points that indicate the annotation's bounding box
      contents - text that shall be displayed or null
      color - the color of the annotation
      line - An array of four numbers, [x1 y1 x2 y2], specifying the starting and ending coordinates of the line in default user space. If the leader length is not equal to zero, this value shall represent the endpoints of the leader lines rather than the endpoints of the line itself.
    • Line

      public Line(float[] rect, String contents, float[] color, float[] line, CaptionPosition captionPosition)
      Create a new Line annotation.
      Parameters:
      rect - two diagonally opposite coordinate points that indicate the annotation's bounding box
      contents - text that shall be displayed or null
      color - the color of the annotation
      line - An array of four numbers, [x1 y1 x2 y2], specifying the starting and ending coordinates of the line in default user space. If the leader length is not equal to zero, this value shall represent the endpoints of the leader lines rather than the endpoints of the line itself.
      captionPosition - If true, the text specified by the contents entry shall be replicated as a caption in the appearance of the line. See CaptionPosition
    • Line

      public Line(float[] rect, String contents, float[] color, float[] line, LineEndingStyle startStyle, LineEndingStyle endStyle, float[] endingColor, CaptionPosition captionPosition)
      Create a new Line annotation.
      Parameters:
      rect - two diagonally opposite coordinate points that indicate the annotation's bounding box
      contents - text that shall be displayed or null
      color - the color of the annotation
      line - An array of four numbers, [x1 y1 x2 y2], specifying the starting and ending coordinates of the line in default user space. If the leader length is not equal to zero, this value shall represent the endpoints of the leader lines rather than the endpoints of the line itself.
      startStyle - the start line ending style. See LineEndingStyle
      endStyle - the end line ending style. See LineEndingStyle
      endingColor - the color of the line ending
      captionPosition - If true, the text specified by the contents entry shall be replicated as a caption in the appearance of the line. See CaptionPosition
    • Line

      public Line(float[] rect, String contents, float[] color, float[] line, LineEndingStyle startStyle, LineEndingStyle endStyle, float[] endingColor, float leaderLength, float leaderExtensionLength, CaptionPosition captionPosition)
      Create a new Line annotation.
      Parameters:
      rect - two diagonally opposite coordinate points that indicate the annotation's bounding box
      contents - text that shall be displayed or null
      color - the color of the annotation
      line - An array of four numbers, [x1 y1 x2 y2], specifying the starting and ending coordinates of the line in default user space. If the leader length is not equal to zero, this value shall represent the endpoints of the leader lines rather than the endpoints of the line itself.
      startStyle - the start line ending style. See LineEndingStyle
      endStyle - the end line ending style. See LineEndingStyle
      endingColor - the color of the line ending
      leaderLength - the length of the leaders lines
      leaderExtensionLength - A non-negative number that shall represent the length of leader line extensions that extend from the line proper 180 degrees from the leader lines
      captionPosition - If true, the text specified by the contents entry shall be replicated as a caption in the appearance of the line. See CaptionPosition
    • Line

      public Line(float[] rect, int flags, String contents, float[] color, float strokingAlpha, float nonStrokingAlpha, String title, float[] line, LineEndingStyle startStyle, LineEndingStyle endStyle, float[] endingColor, float leaderLength, float leaderExtensionLength, CaptionPosition captionPosition)
      Create a new Line annotation.
      Parameters:
      rect - two diagonally opposite coordinate points that indicate the annotation's bounding box
      flags - the annotation's flags. See Annotation.getFlagsValue(boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean)
      contents - text that shall be displayed or null
      color - the color of the annotation
      strokingAlpha - the line transparency value
      nonStrokingAlpha - the fill transparency value
      title - the text for the title bar
      line - An array of four numbers, [x1 y1 x2 y2], specifying the starting and ending coordinates of the line in default user space. If the leader length is not equal to zero, this value shall represent the endpoints of the leader lines rather than the endpoints of the line itself.
      startStyle - the start line ending style. See LineEndingStyle
      endStyle - the end line ending style. See LineEndingStyle
      endingColor - the color of the line ending
      leaderLength - the length of the leaders lines
      leaderExtensionLength - A non-negative number that shall represent the length of leader line extensions that extend from the line proper 180 degrees from the leader lines
      captionPosition - If true, the text specified by the contents entry shall be replicated as a caption in the appearance of the line. See CaptionPosition
  • Method Details

    • getDict

      public org.jpedal.io.annotation.utils.AnnotDict getDict()
      Creates the annotation dictionary.

      This method is considered as not part of the public API.

      Overrides:
      getDict in class org.jpedal.annotation.Markup
      Returns:
      a dictionary containing the relevant entries.