Class FreeText

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

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

A free text annotation displays text directly on the page. Unlike an ordinary Text annotation a FreeText annotation has no open or closed state.

  • Constructor Summary

    Constructors
    Constructor
    Description
    FreeText(float[] rect, int flags, String contents, float[] color, float strokingAlpha, float nonStrokingAlpha, String baseFontName, int fontSize, float[] fontColor, Quadding justification)
    Create a new FreeText annotation.
    FreeText(float[] rect, int flags, String contents, float[] color, float strokingAlpha, float nonStrokingAlpha, String title, String baseFontName, int fontSize, float[] fontColor, Quadding justification)
    Create a new FreeText annotation.
    FreeText(float[] rect, String contents, float[] color, String baseFontName, int fontSize, Quadding justification)
    Create a new FreeText 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

    • FreeText

      public FreeText(float[] rect, String contents, float[] color, String baseFontName, int fontSize, Quadding justification)
      Create a new FreeText 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
      baseFontName - the name of the base font to use. See BaseFont
      fontSize - the font size
      justification - the quadding (text justification). See Quadding
    • FreeText

      public FreeText(float[] rect, int flags, String contents, float[] color, float strokingAlpha, float nonStrokingAlpha, String baseFontName, int fontSize, float[] fontColor, Quadding justification)
      Create a new FreeText 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
      baseFontName - the name of the base font to use. See BaseFont
      fontSize - the font size
      fontColor - the color of the text
      justification - the quadding (text justification). See Quadding
    • FreeText

      public FreeText(float[] rect, int flags, String contents, float[] color, float strokingAlpha, float nonStrokingAlpha, String title, String baseFontName, int fontSize, float[] fontColor, Quadding justification)
      Create a new FreeText 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
      baseFontName - the name of the base font to use. See BaseFont
      fontSize - the font size
      fontColor - the color of the text
      justification - the quadding. See Quadding
  • 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.