Package org.faceless.pdf2
Class AnnotationSound
- java.lang.Object
-
- org.faceless.pdf2.PDFAnnotation
-
- org.faceless.pdf2.AnnotationSound
-
- All Implemented Interfaces:
Cloneable
public final class AnnotationSound extends PDFAnnotation
A subtype of
PDFAnnotationthat allows audio samples to be attached to the PDF. There are several ways to add audio to Acrobat - this approach is the "Acrobat 5.0" compatible approach as described in Acrobat 9.0. The other main approach is to add aplaySoundaction to aFormButtonor similar object.- Since:
- 2.11.7
-
-
Constructor Summary
Constructors Constructor Description AnnotationSound()Create a new Sound annotation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Objectclone()PDFSoundgetSound()Return the PDFSound from this annotationvoidsetSound(PDFSound sound)Set the contents of this annotation to the specified sound.voidsetType(String type, Color color)Set the type of attachment - the physical appearance on the page.StringtoString()-
Methods inherited from class org.faceless.pdf2.PDFAnnotation
addPropertyChangeListener, addReview, flatten, getAction, getAssociatedFiles, getAuthor, getColor, getContents, getCreationDate, getDefaultColorSpace, getInReplyTo, getLocale, getMetaData, getModifyDate, getOpacity, getOptionalContentDescriptor, getPage, getPopup, getRectangle, getReplies, getReviews, getSubject, getType, getUniqueID, getUserData, getXMP, hasAppearanceState, isContentLocked, isPositionLocked, isPrintable, isReadOnly, isVisible, putUserData, rebuild, removePropertyChangeListener, setAction, setAuthor, setColor, setContents, setCreationDate, setDefaultColorSpace, setInReplyTo, setLocale, setLocked, setMetaData, setModifyDate, setOpacity, setOptionalContentDescriptor, setPage, setPrintable, setReadOnly, setRectangle, setSubject, setUniqueID, setVisible
-
-
-
-
Constructor Detail
-
AnnotationSound
public AnnotationSound()
Create a new Sound annotation. To actually set the attachment, thesetSound()method must be called.
-
-
Method Detail
-
setType
public void setType(String type, Color color)
Set the type of attachment - the physical appearance on the page. The type must be one of the three pre-defined types (Speaker, Mic or Ear) or anIllegalArgumentExceptionwill be thrown.- Parameters:
type- the type of attachment - one of the three values listed above.color- the color of the attachment
-
setSound
public void setSound(PDFSound sound)
Set the contents of this annotation to the specified sound.- Parameters:
sound- the PDFSound object to use
-
getSound
public PDFSound getSound()
Return the PDFSound from this annotation
-
toString
public String toString()
-
-