public class PDActionSound extends PDAction
Modifier and Type | Field and Description |
---|---|
static String |
SUB_TYPE
This type of action this object represents.
|
Constructor and Description |
---|
PDActionSound()
Default constructor.
|
PDActionSound(COSDictionary a)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getMix()
Gets the flag specifying whether to mix this sound with any other sound already playing.
|
boolean |
getRepeat()
Gets whether to repeat the sound indefinitely.
|
String |
getS()
Deprecated.
|
COSStream |
getSound()
Gets the sound object.
|
boolean |
getSynchronous()
Gets the synchronous flag.
|
float |
getVolume()
Sets the volume.
|
void |
setMix(boolean mix)
The flag specifying whether to mix this sound with any other sound already playing.
|
void |
setRepeat(boolean repeat)
A flag specifying whether to repeat the sound indefinitely.
|
void |
setS(String s)
Deprecated.
|
void |
setSound(COSStream sound)
Sets the sound object.
|
void |
setSynchronous(boolean synchronous)
A flag specifying whether to play the sound synchronously or asynchronously.
|
void |
setVolume(float volume)
Gets the volume at which to play the sound, in the range −1.0 to 1.0.
|
getCOSObject, getNext, getSubType, getType, setNext, setSubType, setType
public static final String SUB_TYPE
public PDActionSound()
public PDActionSound(COSDictionary a)
a
- The action dictionary.@Deprecated public String getS()
PDAction.getSubType()
.@Deprecated public void setS(String s)
PDAction.setSubType(java.lang.String)
.s
- The Sound action.public void setSound(COSStream sound)
sound
- the sound object defining the sound that shall be played.public COSStream getSound()
public void setVolume(float volume)
volume
- The volume at which to play the sound, in the range −1.0 to 1.0.IllegalArgumentException
- if the volume parameter is outside of the range −1.0 to 1.0.public float getVolume()
public void setSynchronous(boolean synchronous)
synchronous
- Whether to play the sound synchronously (true) or asynchronously (false).public boolean getSynchronous()
public void setRepeat(boolean repeat)
repeat
- Whether to repeat the sound indefinitely.public boolean getRepeat()
public void setMix(boolean mix)
mix
- whether to mix this sound with any other sound already playing. (false).public boolean getMix()
Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.