SoundAnnotation
Inheritance: java.lang.Object, com.aspose.pdf.BaseParagraph, com.aspose.pdf.Annotation, com.aspose.pdf.MarkupAnnotation
public final class SoundAnnotation extends MarkupAnnotation
Represents a sound annotation that contains sound recorded from the computer’s microphone or imported from a file.
Constructors
Constructor | Description |
---|---|
SoundAnnotation(Page page, Rectangle rect, String soundFile) | Creates new Sound annotation on the specified page. |
SoundAnnotation(Page page, Rectangle rect, String soundFile, SoundSampleData soundSampleData) | Creates new Sound annotation on the specified page. |
Methods
Method | Description |
---|---|
getIcon() | Gets an icon to be used in displaying the annotation. |
setIcon(int value) | Sets an icon to be used in displaying the annotation. |
getSoundData() | Gets a sound object defining the sound to be played when the annotation is activated. |
getAnnotationType() | Gets type of annotation. |
accept(AnnotationSelector visitor) | Accepts visitor object to process the annotation. |
SoundAnnotation(Page page, Rectangle rect, String soundFile)
public SoundAnnotation(Page page, Rectangle rect, String soundFile)
Creates new Sound annotation on the specified page.
Parameters:
Parameter | Type | Description |
---|---|---|
page | Page | The document’s page where annotation should be created. |
rect | Rectangle | The annotation rectangle, defining the location of the annotation on the page. |
soundFile | java.lang.String | A sound file defining the sound to be played when the annotation is activated. |
SoundAnnotation(Page page, Rectangle rect, String soundFile, SoundSampleData soundSampleData)
public SoundAnnotation(Page page, Rectangle rect, String soundFile, SoundSampleData soundSampleData)
Creates new Sound annotation on the specified page.
Parameters:
Parameter | Type | Description |
---|---|---|
page | Page | The document’s page where annotation should be created. |
rect | Rectangle | The annotation rectangle, defining the location of the annotation on the page. |
soundFile | java.lang.String | A sound file defining the sound to be played when the annotation is activated. |
soundSampleData | SoundSampleData | A sound sample data contains extra of sound parameters such as sampling rate, bits per sample and so on. |
getIcon()
public int getIcon()
Gets an icon to be used in displaying the annotation.
Returns: int - SoundIcon value
setIcon(int value)
public void setIcon(int value)
Sets an icon to be used in displaying the annotation.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | SoundIcon value |
getSoundData()
public SoundData getSoundData()
Gets a sound object defining the sound to be played when the annotation is activated.
Returns: SoundData - SoundData value
getAnnotationType()
public AnnotationType getAnnotationType()
Gets type of annotation.
Returns: AnnotationType - AnnotationType value
accept(AnnotationSelector visitor)
public void accept(AnnotationSelector visitor)
Accepts visitor object to process the annotation.
Parameters:
Parameter | Type | Description |
---|---|---|
visitor | AnnotationSelector | Visitor object. |