Class PDAppearanceDictionary
java.lang.Object
org.apache.pdfbox.pdmodel.interactive.annotation.PDAppearanceDictionary
- All Implemented Interfaces:
COSObjectable
This class represents a PDF /AP entry the appearance dictionary.
- Version:
- $Revision: 1.4 $
- Author:
- Ben Litchfield
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.Constructor. -
Method Summary
Modifier and TypeMethodDescriptionreturns the dictionary.returns the dictionary.This will return a list of appearances.This will return a list of appearances.This will return a list of appearances.void
setDownAppearance
(Map<String, PDAppearanceStream> appearanceMap) This will set a list of appearances.void
This will set the down appearance when there is down appearance to be shown.void
setNormalAppearance
(Map<String, PDAppearanceStream> appearanceMap) This will set a list of appearances.void
This will set the normal appearance when there is only one appearance to be shown.void
setRolloverAppearance
(Map<String, PDAppearanceStream> appearanceMap) This will set a list of appearances.void
This will set the rollover appearance when there is rollover appearance to be shown.
-
Constructor Details
-
PDAppearanceDictionary
public PDAppearanceDictionary()Constructor. -
PDAppearanceDictionary
Constructor.- Parameters:
dict
- The annotations dictionary.
-
-
Method Details
-
getDictionary
returns the dictionary.- Returns:
- the dictionary
-
getCOSObject
returns the dictionary.- Specified by:
getCOSObject
in interfaceCOSObjectable
- Returns:
- the dictionary
-
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
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:
appearanceMap
- The updated map with the appearance.
-
setNormalAppearance
This will set the normal appearance when there is only one appearance to be shown.- Parameters:
ap
- The appearance stream to show.
-
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
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:
appearanceMap
- The updated map with the appearance.
-
setRolloverAppearance
This will set the rollover appearance when there is rollover appearance to be shown.- Parameters:
ap
- The appearance stream to show.
-
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
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:
appearanceMap
- The updated map with the appearance.
-
setDownAppearance
This will set the down appearance when there is down appearance to be shown.- Parameters:
ap
- The appearance stream to show.
-