org.apache.pdfbox.pdmodel.fdf

## Class FDFAnnotationText

- java.lang.Object
- - org.apache.pdfbox.pdmodel.fdf.FDFAnnotation
  - - org.apache.pdfbox.pdmodel.fdf.FDFAnnotationText

All Implemented Interfaces:
  COSObjectable

    public class FDFAnnotationText
    extends FDFAnnotation

This represents a Text FDF annotation.

Author:
  Ben Litchfield, Johanneke Lamberink

### Field Summary

Fields
`static String` `SUBTYPE` COS Model value for SubType entry.

### Fields inherited from class org.apache.pdfbox.pdmodel.fdf.FDFAnnotation

`annot`

### Constructor Summary

Constructors
Constructor and Description
`FDFAnnotationText()` Default constructor.
`FDFAnnotationText(COSDictionary a)` Constructor.
`FDFAnnotationText(Element element)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `getIcon()` This will retrieve the icon (and hence appearance, AP taking precedence) For this annotation.
`String` `getState()` This will retrieve the annotation state.
`String` `getStateModel()` This will retrieve the annotation state model.
`void` `setIcon(String icon)` This will set the icon (and hence appearance, AP taking precedence) For this annotation.
`void` `setState(String state)` This will set the annotation state.
`void` `setStateModel(String stateModel)` This will set the annotation state model.

### Methods inherited from class org.apache.pdfbox.pdmodel.fdf.FDFAnnotation

`create, getBorderEffect, getBorderStyle, getColor, getContents, getCOSObject, getCreationDate, getDate, getIntent, getName, getOpacity, getPage, getRectangle, getRichContents, getStringOrStream, getSubject, getTitle, isHidden, isInvisible, isLocked, isLockedContents, isNoRotate, isNoView, isNoZoom, isPrinted, isReadOnly, isToggleNoView, setBorderEffect, setBorderStyle, setColor, setContents, setCreationDate, setDate, setHidden, setIntent, setInvisible, setLocked, setLockedContents, setName, setNoRotate, setNoView, setNoZoom, setOpacity, setPage, setPrinted, setReadOnly, setRectangle, setRichContents, setSubject, setTitle, setToggleNoView`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### SUBTYPE

    public static final String SUBTYPE

COS Model value for SubType entry.

See Also:
  Constant Field Values

### Constructor Detail

#### FDFAnnotationText

    public FDFAnnotationText()

Default constructor.

#### FDFAnnotationText

    public FDFAnnotationText(COSDictionary a)

Constructor.

Parameters:
  `a` - An existing FDF Annotation.

#### FDFAnnotationText

    public FDFAnnotationText(Element element)
                      throws IOException

Constructor.

Parameters:
  `element` - An XFDF element.
Throws:
  `IOException` - If there is an error extracting information from the element.

### Method Detail

#### setIcon

    public final void setIcon(String icon)

This will set the icon (and hence appearance, AP taking precedence) For this annotation. See the PDAnnotationText.NAME_XXX constants for valid values.

Parameters:
  `icon` - The name of the annotation

#### getIcon

    public String getIcon()

This will retrieve the icon (and hence appearance, AP taking precedence) For this annotation. The default is NOTE.

Returns:
  The name of this annotation, see the PDAnnotationText.NAME_XXX constants.

#### getState

    public String getState()

This will retrieve the annotation state.

Returns:
  the annotation state

#### setState

    public final void setState(String state)

This will set the annotation state.

Parameters:
  `state` - the annotation state

#### getStateModel

    public String getStateModel()

This will retrieve the annotation state model.

Returns:
  the annotation state model

#### setStateModel

    public final void setStateModel(String stateModel)

This will set the annotation state model. Allowed values are "Marked" and "Review"

Parameters:
  `stateModel` - the annotation state model