Top Description Fields Constructors Methods
org.apache.pdfbox.pdmodel.interactive.annotation

public Class PDAppearanceDictionary

extends Object
implements COSObjectable
Class Inheritance
All Implemented Interfaces
org.apache.pdfbox.pdmodel.common.COSObjectable
Imports
org.apache.pdfbox.cos.COSDictionary, .COSName, org.apache.pdfbox.pdmodel.common.COSObjectable

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

Field Summary

Modifier and TypeField and Description
private final COSDictionary

Constructor Summary

AccessConstructor and Description
public
PDAppearanceDictionary()

Constructor for embedding.

public
PDAppearanceDictionary(COSDictionary
The annotations dictionary.
dictionary
)

Constructor for reading.

Method Summary

Modifier and TypeMethod and Description
public COSDictionary
getCOSObject()

Implements org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

Convert this standard java object to a COS object.

public PDAppearanceEntry

Returns:

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

This will return a list of appearances.

public PDAppearanceEntry

Returns:

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

This will return a list of appearances.

public PDAppearanceEntry

Returns:

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

This will return a list of appearances.

public void
setDownAppearance(PDAppearanceEntry
appearance stream or subdictionary
entry
)

This will set a list of appearances.

public void
setDownAppearance(PDAppearanceStream
The appearance stream to show.
ap
)

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

public void
setNormalAppearance(PDAppearanceEntry
appearance stream or subdictionary
entry
)

This will set a list of appearances.

public void
setNormalAppearance(PDAppearanceStream
The appearance stream to show.
ap
)

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

public void
setRolloverAppearance(PDAppearanceEntry
appearance stream or subdictionary
entry
)

This will set a list of appearances.

public void
setRolloverAppearance(PDAppearanceStream
The appearance stream to show.
ap
)

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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dictionaryback to summary
private final COSDictionary dictionary

Constructor Detail

PDAppearanceDictionaryback to summary
public PDAppearanceDictionary()

Constructor for embedding.

PDAppearanceDictionaryback to summary
public PDAppearanceDictionary(COSDictionary dictionary)

Constructor for reading.

Parameters
dictionary:COSDictionary

The annotations dictionary.

Method Detail

getCOSObjectback to summary
public COSDictionary getCOSObject()

Implements org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

Doc from org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

Convert this standard java object to a COS object.

Returns:COSDictionary

The cos object that matches this Java object.

Annotations
@Override
getDownAppearanceback to summary
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:PDAppearanceEntry

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

getNormalAppearanceback to summary
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:PDAppearanceEntry

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

getRolloverAppearanceback to summary
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:PDAppearanceEntry

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

setDownAppearanceback to summary
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:PDAppearanceEntry

appearance stream or subdictionary

setDownAppearanceback to summary
public void setDownAppearance(PDAppearanceStream ap)

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

Parameters
ap:PDAppearanceStream

The appearance stream to show.

setNormalAppearanceback to summary
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:PDAppearanceEntry

appearance stream or subdictionary

setNormalAppearanceback to summary
public void setNormalAppearance(PDAppearanceStream ap)

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

Parameters
ap:PDAppearanceStream

The appearance stream to show.

setRolloverAppearanceback to summary
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:PDAppearanceEntry

appearance stream or subdictionary

setRolloverAppearanceback to summary
public void setRolloverAppearance(PDAppearanceStream ap)

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

Parameters
ap:PDAppearanceStream

The appearance stream to show.