org.apache.pdfbox.pdmodel.interactive.annotation

## Class PDAppearanceDictionary

- java.lang.Object
- - org.apache.pdfbox.pdmodel.interactive.annotation.PDAppearanceDictionary

All Implemented Interfaces:
  COSObjectable

    public class PDAppearanceDictionary
    extends Object
    implements COSObjectable

An appearance dictionary specifying how the annotation shall be presented visually on the page.

Author:
  Ben Litchfield

### Constructor Summary

Constructors
Constructor and Description
`PDAppearanceDictionary()` Constructor for embedding.
`PDAppearanceDictionary(COSDictionary dictionary)` Constructor for reading.

### Method Summary

All Methods Instance Methods Concrete Methods
`COSDictionary` `getCOSObject()` Convert this standard java object to a COS object.
`PDAppearanceEntry` `getDownAppearance()` This will return a list of appearances.
`PDAppearanceEntry` `getNormalAppearance()` This will return a list of appearances.
`PDAppearanceEntry` `getRolloverAppearance()` This will return a list of appearances.
`void` `setDownAppearance(PDAppearanceEntry entry)` This will set a list of appearances.
`void` `setDownAppearance(PDAppearanceStream ap)` This will set the down appearance when there is down appearance to be shown.
`void` `setNormalAppearance(PDAppearanceEntry entry)` This will set a list of appearances.
`void` `setNormalAppearance(PDAppearanceStream ap)` This will set the normal appearance when there is only one appearance to be shown.
`void` `setRolloverAppearance(PDAppearanceEntry entry)` This will set a list of appearances.
`void` `setRolloverAppearance(PDAppearanceStream ap)` This will set the rollover appearance when there is rollover appearance to be shown.

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

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

### Constructor Detail

#### PDAppearanceDictionary

    public PDAppearanceDictionary()

Constructor for embedding.

#### PDAppearanceDictionary

    public PDAppearanceDictionary(COSDictionary dictionary)

Constructor for reading.

Parameters:
  `dictionary` - The annotations dictionary.

### Method Detail

#### getCOSObject

    public COSDictionary getCOSObject()

Description copied from interface: `COSObjectable`
Convert this standard java object to a COS object.

Specified by:
  `getCOSObject` in interface `COSObjectable`
Returns:
  The cos object that matches this Java object.

#### getNormalAppearance

    public PDAppearanceEntry getNormalAppearance()

This will return a list of appearances. In the case where there is only one appearance the map will contain one entry whose key is the string "default".

Returns:
  A list of key(java.lang.String) value(PDAppearanceStream) pairs

#### setNormalAppearance

    public void setNormalAppearance(PDAppearanceEntry entry)

This will set a list of appearances. If you would like to set the single appearance then you should use the key "default", and when the PDF is written back to the filesystem then there will only be one stream.

Parameters:
  `entry` - appearance stream or subdictionary

#### setNormalAppearance

    public void setNormalAppearance(PDAppearanceStream ap)

This will set the normal appearance when there is only one appearance to be shown.

Parameters:
  `ap` - The appearance stream to show.

#### getRolloverAppearance

    public PDAppearanceEntry getRolloverAppearance()

This will return a list of appearances. In the case where there is only one appearance the map will contain one entry whose key is the string "default". If there is no rollover appearance then the normal appearance will be returned. Which means that this method will never return null.

Returns:
  A list of key(java.lang.String) value(PDAppearanceStream) pairs

#### setRolloverAppearance

    public void setRolloverAppearance(PDAppearanceEntry entry)

This will set a list of appearances. If you would like to set the single appearance then you should use the key "default", and when the PDF is written back to the filesystem then there will only be one stream.

Parameters:
  `entry` - appearance stream or subdictionary

#### setRolloverAppearance

    public void setRolloverAppearance(PDAppearanceStream ap)

This will set the rollover appearance when there is rollover appearance to be shown.

Parameters:
  `ap` - The appearance stream to show.

#### getDownAppearance

    public PDAppearanceEntry getDownAppearance()

This will return a list of appearances. In the case where there is only one appearance the map will contain one entry whose key is the string "default". If there is no rollover appearance then the normal appearance will be returned. Which means that this method will never return null.

Returns:
  A list of key(java.lang.String) value(PDAppearanceStream) pairs

#### setDownAppearance

    public void setDownAppearance(PDAppearanceEntry entry)

This will set a list of appearances. If you would like to set the single appearance then you should use the key "default", and when the PDF is written back to the filesystem then there will only be one stream.

Parameters:
  `entry` - appearance stream or subdictionary

#### setDownAppearance

    public void setDownAppearance(PDAppearanceStream ap)

This will set the down appearance when there is down appearance to be shown.

Parameters:
  `ap` - The appearance stream to show.