|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.objectxp.msg.ems.EMSElement
com.objectxp.msg.ems.EMSSound
public class EMSSound
This class represents a EMS Sound element.
Multiple sounds and melodies can be inserted in one message, and also in
combination with pictures and animations. The sound or melody is played when
the user selects its icon in the display; this is referred to as putting it
into focus.
There are two different types of sounds that are supported by EMS:
EMSMessage,
Serialized Form| Field Summary | |
|---|---|
static EMSSound |
CHIMES_HIGH
Predefined Sound: Chimes High |
static EMSSound |
CHIMES_LOW
Predefined Sound: Chimes Low |
static EMSSound |
CHORD_HIGH
Predefined Sound: Chord High |
static EMSSound |
CHORD_LOW
Predefined Sound: Chord Low |
static EMSSound |
CLAPS
Predefined Sound: Claps |
static EMSSound |
DING
Predefined Sound: Ding |
static EMSSound |
DRUM
Predefined Sound: Drum |
static EMSSound |
FANFAR
Predefined Sound: FanFar |
static EMSSound |
NOTIFY
Predefined Sound: Notify |
static EMSSound |
TADA
Predefined Sound: TaDa |
| Constructor Summary | |
|---|---|
EMSSound(int number)
Construct a predefined EMS Sound element. |
|
EMSSound(java.lang.String iMelody)
Construct a new user-defined EMS Sound element. |
|
| Method Summary | |
|---|---|
int |
getPredefinedSound()
Gets the number of the predefined sound. |
java.lang.String |
getUserDefinedSound()
Gets user defined sound as iMelody. |
static EMSSound[] |
splitMelody(java.lang.String iMelody)
Splits a iMelody in multiple parts if the length of the melody doesn't fit in a single EMSSound element. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final EMSSound CHIMES_HIGH
public static final EMSSound CHIMES_LOW
public static final EMSSound DING
public static final EMSSound TADA
public static final EMSSound NOTIFY
public static final EMSSound DRUM
public static final EMSSound CLAPS
public static final EMSSound FANFAR
public static final EMSSound CHORD_HIGH
public static final EMSSound CHORD_LOW
| Constructor Detail |
|---|
public EMSSound(java.lang.String iMelody)
throws java.lang.IllegalArgumentException
Example:
String myMelody = "BEGIN:IMELODY\n"+
"VERSION:1.2\n"+
"FORMAT:CLASS1.0\n"+
"BEAT:120\n"+
"MELODY:*5#d5*5#f5*5b2*6c3*5#d5*5a5*5b2*6#d3*4b5*5g5*6e1r4\n"+
"END:IMELODY";
EMSSound sound = new EMSSound(myMelody);
iMelody - the sound data coded according to the iMelody format.
java.lang.IllegalArgumentException - if the sound is null or exceeds 128 bytes.public EMSSound(int number)
number - the number of the predefined sound.| Method Detail |
|---|
public static EMSSound[] splitMelody(java.lang.String iMelody)
throws java.lang.IllegalArgumentException
iMelody - the iMelody
java.lang.IllegalArgumentException - if the iMelody cannot be parsed
java.lang.IllegalArgumentException - if the header and footer parameters exceed 126 bytespublic int getPredefinedSound()
public java.lang.String getUserDefinedSound()
public java.lang.String toString()
toString in class java.lang.Object
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||