Class Text

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

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

A text annotation represents a "sticky note" attached to a point in the PDF document. When closed, the annotation shall appear as an icon; when open, it shall display a popup window containing the text of the note in a font and size chosen by the interactive PDF processor.

  • Constructor Summary

    Constructors
    Constructor
    Description
    Text(float[] rect, int flags, String contents, float[] color, float strokingAlpha, float nonStrokingAlpha, boolean open, String icon)
    Create a new Text annotation.
    Text(float[] rect, int flags, String contents, float[] color, float strokingAlpha, float nonStrokingAlpha, String title, boolean open, String icon)
    Create a new Text annotation.
    Text(float[] rect, String contents, float[] color, boolean open, String icon)
    Create a new Text annotation.
    Text(float[] rect, String contents, float[] color, String icon)
    Create a new Text 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

    • Text

      public Text(float[] rect, String contents, float[] color, String icon)
      Create a new Text 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
      icon - the icon used. See "sticky note" icons AnnotationIcons
    • Text

      public Text(float[] rect, String contents, float[] color, boolean open, String icon)
      Create a new Text 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
      open - whether the text shall initially be display open
      icon - the icon used. See "sticky note" icons AnnotationIcons
    • Text

      public Text(float[] rect, int flags, String contents, float[] color, float strokingAlpha, float nonStrokingAlpha, boolean open, String icon)
      Create a new Text 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
      open - whether the text shall initially be display open
      icon - the icon used. See "sticky note" icons AnnotationIcons
    • Text

      public Text(float[] rect, int flags, String contents, float[] color, float strokingAlpha, float nonStrokingAlpha, String title, boolean open, String icon)
      Create a new Text 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
      open - whether the text shall initially be display open
      icon - the icon used. See "sticky note" icons AnnotationIcons
  • 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.