org.apache.pdfbox.pdmodel.interactive.annotation

## Class PDAnnotationPolyline

- java.lang.Object
- - org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation
  - - org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup
    - - org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationPolyline

All Implemented Interfaces:
  COSObjectable

    public class PDAnnotationPolyline
    extends PDAnnotationMarkup

Author:
  Paul King

### Field Summary

Fields
`static String` `SUB_TYPE` The type of annotation.

### Fields inherited from class org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup

`RT_GROUP, RT_REPLY`

### Constructor Summary

Constructors
Constructor and Description
`PDAnnotationPolyline()` Constructor.
`PDAnnotationPolyline(COSDictionary dict)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `constructAppearances()` Create the appearance entry for this annotation.
`void` `constructAppearances(PDDocument document)` Create the appearance entry for this annotation.
`String` `getEndPointEndingStyle()` This will retrieve the line ending style for the end point, possible values shown in the LE_ constants section.
`PDColor` `getInteriorColor()` This will retrieve the interior color with which to fill the annotation’s line endings.
`String` `getStartPointEndingStyle()` This will retrieve the line ending style for the start point, possible values shown in the LE_ constants section.
`float[]` `getVertices()` This will retrieve the numbers that shall represent the alternating horizontal and vertical coordinates.
`void` `setCustomAppearanceHandler(PDAppearanceHandler appearanceHandler)` Set a custom appearance handler for generating the annotations appearance streams.
`void` `setEndPointEndingStyle(String style)` This will set the line ending style for the end point, see the LE_ constants for the possible values.
`void` `setInteriorColor(PDColor ic)` This will set interior color of the line endings defined in the LE entry.
`void` `setStartPointEndingStyle(String style)` This will set the line ending style for the start point, see the LE_ constants for the possible values.
`void` `setVertices(float[] points)` This will set the numbers that shall represent the alternating horizontal and vertical coordinates.

### Methods inherited from class org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup

`getBorderStyle, getConstantOpacity, getCreationDate, getExternalData, getInReplyTo, getIntent, getPopup, getReplyType, getRichContents, getSubject, getTitlePopup, setBorderStyle, setConstantOpacity, setCreationDate, setExternalData, setInReplyTo, setIntent, setPopup, setReplyType, setRichContents, setSubject, setTitlePopup`

### Methods inherited from class org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation

`createAnnotation, equals, getAnnotationFlags, getAnnotationName, getAppearance, getAppearanceState, getBorder, getColor, getColor, getContents, getCOSObject, getModifiedDate, getNormalAppearanceStream, getOptionalContent, getPage, getRectangle, getStructParent, getSubtype, hashCode, isHidden, isInvisible, isLocked, isLockedContents, isNoRotate, isNoView, isNoZoom, isPrinted, isReadOnly, isToggleNoView, setAnnotationFlags, setAnnotationName, setAppearance, setAppearanceState, setAppearanceState, setBorder, setColor, setContents, setHidden, setInvisible, setLocked, setLockedContents, setModifiedDate, setModifiedDate, setNoRotate, setNoView, setNoZoom, setOptionalContent, setPage, setPrinted, setReadOnly, setRectangle, setStructParent, setSubtype, setToggleNoView`

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

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

### Field Detail

#### SUB_TYPE

    public static final String SUB_TYPE

The type of annotation.

See Also:
  Constant Field Values

### Constructor Detail

#### PDAnnotationPolyline

    public PDAnnotationPolyline()

Constructor.

#### PDAnnotationPolyline

    public PDAnnotationPolyline(COSDictionary dict)

Constructor.

Parameters:
  `dict` - The annotations dictionary.

### Method Detail

#### setStartPointEndingStyle

    public void setStartPointEndingStyle(String style)

This will set the line ending style for the start point, see the LE_ constants for the possible values.

Parameters:
  `style` - The new style.

#### getStartPointEndingStyle

    public String getStartPointEndingStyle()

This will retrieve the line ending style for the start point, possible values shown in the LE_ constants section.

Returns:
  The ending style for the start point, LE_NONE if missing, never null.

#### setEndPointEndingStyle

    public void setEndPointEndingStyle(String style)

This will set the line ending style for the end point, see the LE_ constants for the possible values.

Parameters:
  `style` - The new style.

#### getEndPointEndingStyle

    public String getEndPointEndingStyle()

This will retrieve the line ending style for the end point, possible values shown in the LE_ constants section.

Returns:
  The ending style for the end point, LE_NONE if missing, never null.

#### setInteriorColor

    public void setInteriorColor(PDColor ic)

This will set interior color of the line endings defined in the LE entry.

Parameters:
  `ic` - color.

#### getInteriorColor

    public PDColor getInteriorColor()

This will retrieve the interior color with which to fill the annotation’s line endings.

Returns:
  object representing the color.

#### getVertices

    public float[] getVertices()

This will retrieve the numbers that shall represent the alternating horizontal and vertical coordinates.

Returns:
  An array of floats representing the alternating horizontal and vertical coordinates.

#### setVertices

    public void setVertices(float[] points)

This will set the numbers that shall represent the alternating horizontal and vertical coordinates.

Parameters:
  `points` - an array with the numbers that shall represent the alternating horizontal and vertical coordinates.

#### setCustomAppearanceHandler

    public void setCustomAppearanceHandler(PDAppearanceHandler appearanceHandler)

Set a custom appearance handler for generating the annotations appearance streams.

Parameters:
  `appearanceHandler` - custom appearance handler

#### constructAppearances

    public void constructAppearances()

Description copied from class: `PDAnnotation`
Create the appearance entry for this annotation. Not having it may prevent display in some viewers. This method is for overriding in subclasses, the default implementation does nothing.

Overrides:
  `constructAppearances` in class `PDAnnotation`

#### constructAppearances

    public void constructAppearances(PDDocument document)

Description copied from class: `PDAnnotation`
Create the appearance entry for this annotation. Not having it may prevent display in some viewers. This method is for overriding in subclasses, the default implementation does nothing.

Overrides:
  `constructAppearances` in class `PDAnnotation`
Parameters:
  `document` - the related document