org.apache.pdfbox.pdmodel.fdf

## Class FDFAnnotationFreeText

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

All Implemented Interfaces:
  COSObjectable

    public class FDFAnnotationFreeText
    extends FDFAnnotation

This represents a FreeText FDF annotation.

Author:
  Ben Litchfield

### 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
`FDFAnnotationFreeText()` Default constructor.
`FDFAnnotationFreeText(COSDictionary a)` Constructor.
`FDFAnnotationFreeText(Element element)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`float[]` `getCallout()` This will get the coordinates of the callout line.
`String` `getDefaultAppearance()` Get the default appearance string.
`String` `getDefaultStyle()` Get the default style string.
`PDRectangle` `getFringe()` This will get the fringe.
`String` `getJustification()` This will get the form of quadding (justification) of the annotation text.
`String` `getLineEndingStyle()` This will retrieve the line ending style.
`String` `getRotation()` This will get the clockwise rotation in degrees.
`void` `setCallout(float[] callout)` This will set the coordinates of the callout line.
`void` `setDefaultAppearance(String appearance)` Set the default appearance string.
`void` `setDefaultStyle(String style)` Set the default style string.
`void` `setFringe(PDRectangle fringe)` This will set the fringe rectangle.
`void` `setJustification(String justification)` This will set the form of quadding (justification) of the annotation text.
`void` `setLineEndingStyle(String style)` This will set the line ending style.
`void` `setRotation(int rotation)` This will set the clockwise rotation in degrees.

### 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

#### FDFAnnotationFreeText

    public FDFAnnotationFreeText()

Default constructor.

#### FDFAnnotationFreeText

    public FDFAnnotationFreeText(COSDictionary a)

Constructor.

Parameters:
  `a` - An existing FDF Annotation.

#### FDFAnnotationFreeText

    public FDFAnnotationFreeText(Element element)
                          throws IOException

Constructor.

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

### Method Detail

#### setCallout

    public final void setCallout(float[] callout)

This will set the coordinates of the callout line.

Parameters:
  `callout` - An array of four or six numbers specifying a callout line attached to the free text annotation. Six numbers [ x1 y1 x2 y2 x3 y3 ] represent the starting, knee point, and ending coordinates of the line in default user space, Four numbers [ x1 y1 x2 y2 ] represent the starting and ending coordinates of the line.

#### getCallout

    public float[] getCallout()

This will get the coordinates of the callout line.

Returns:
  An array of four or six numbers specifying a callout line attached to the free text annotation. Six numbers [ x1 y1 x2 y2 x3 y3 ] represent the starting, knee point, and ending coordinates of the line in default user space, Four numbers [ x1 y1 x2 y2 ] represent the starting and ending coordinates of the line.

#### setJustification

    public final void setJustification(String justification)

This will set the form of quadding (justification) of the annotation text.

Parameters:
  `justification` - The quadding of the text.

#### getJustification

    public String getJustification()

This will get the form of quadding (justification) of the annotation text.

Returns:
  The quadding of the text.

#### setRotation

    public final void setRotation(int rotation)

This will set the clockwise rotation in degrees.

Parameters:
  `rotation` - The number of degrees of clockwise rotation.

#### getRotation

    public String getRotation()

This will get the clockwise rotation in degrees.

Returns:
  The number of degrees of clockwise rotation.

#### setDefaultAppearance

    public final void setDefaultAppearance(String appearance)

Set the default appearance string.

Parameters:
  `appearance` - The new default appearance string.

#### getDefaultAppearance

    public String getDefaultAppearance()

Get the default appearance string.

Returns:
  The default appearance of the annotation.

#### setDefaultStyle

    public final void setDefaultStyle(String style)

Set the default style string.

Parameters:
  `style` - The new default style string.

#### getDefaultStyle

    public String getDefaultStyle()

Get the default style string.

Returns:
  The default style of the annotation.

#### setFringe

    public final void setFringe(PDRectangle fringe)

This will set the fringe rectangle. Giving the difference between the annotations rectangle and where the drawing occurs. (To take account of any effects applied through the BE entry for example)

Parameters:
  `fringe` - the fringe

#### getFringe

    public PDRectangle getFringe()

This will get the fringe. Giving the difference between the annotations rectangle and where the drawing occurs. (To take account of any effects applied through the BE entry for example)

Returns:
  the rectangle difference

#### setLineEndingStyle

    public final void setLineEndingStyle(String style)

This will set the line ending style.

Parameters:
  `style` - The new style.

#### getLineEndingStyle

    public String getLineEndingStyle()

This will retrieve the line ending style.

Returns:
  The ending style for the start point.