Skip to main content

SoundAnnotationIconName Enum

Lists PDF sound annotation icon names.

Declaration

public enum SoundAnnotationIconName extends Enum<SoundAnnotationIconName> implements IIntEnum

Members

Name Description
HEADPHONE

The Headphone icon.

MIC

The Mic icon.

SPEAKER

The Speaker icon.

fromValue(int value)

Returns the sound annotation icon name with the specified value.

getName()

Returns the sound annotation icon name item name.

getValue()

Returns the sound annotation icon name integer value.

toString()

Returns the string representation of the sound annotation icon name.

valueOf(String name)

Returns the sound annotation icon name enum constant with the specified name.

values()

Returns available sound annotation icon name constants.

Remarks

Use the setIconName(SoundAnnotationIconName value) method to specify the icon displayed for the sound annotation.

The following code snippet creates a sound annotation and embeds a WAV audio file:

 Sound Annotation, DevExpress PDF Document API for Java

static void createSoundAnnotation(Page page) {
    SoundAnnotation annotation =
            new SoundAnnotation(
                    new RectangleF(50, 420, 20, 20));

    annotation.setTitle("John Smith");
    annotation.setContent("Voice note");
    annotation.setIconName(SoundAnnotationIconName.MIC);

    try {
        Sound sound = new Sound();
        sound.setSamplingRate(44100);
        sound.setSoundChannels(2);
        sound.setBitsPerSample(16);
        sound.setEncoding(SoundEncoding.RAW);
        sound.setData(Files.readAllBytes(Path.of("VoiceNote.wav")));

        annotation.setSound(sound);

        page.getAnnotations().add(annotation);
    } catch (IOException e) {
        throw new UncheckedIOException("Failed to read the audio file.", e);
    }
}

Refer to the following help topic for additional information: File and Multimedia Annotations.

Implements

com.devexpress.java.enums.IIntEnum

Inherited Members

java.lang.Enum.<T>valueOf(java.lang.Class<T>,java.lang.String)
java.lang.Enum.clone()
java.lang.Enum.compareTo(E)
java.lang.Enum.describeConstable()
java.lang.Enum.equals(java.lang.Object)
java.lang.Enum.finalize()
java.lang.Enum.getDeclaringClass()
java.lang.Enum.hashCode()
java.lang.Enum.name()
java.lang.Enum.ordinal()
java.lang.Enum.toString()
java.lang.Object.getClass()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)

Inheritance

Object
java.lang.Enum
SoundAnnotationIconName