|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.fx.Sound
Sound is used to play sounds such as beeps and tones.
Playing beeps is supported under all platforms but tones are only supported where the underlying platform supports generating tones. Tones aren't supported under Java or Windows CE.
Here is an example that beeps the speaker and plays a tone:
Sound.beep(); Sound.tone(4000, 300);
| Field Summary | |
static int |
MB_ICONASTERISK
|
static int |
MB_ICONEXCLAMATION
|
static int |
MB_ICONHAND
|
static int |
MB_ICONQUESTION
|
static int |
MB_OK
|
| Constructor Summary | |
Sound()
|
|
| Method Summary | |
static void |
beep()
Plays the device's default beep sound. |
static void |
beep(int sound)
Plays one of the device's beep sounds. |
static void |
tone(int freq,
int duration)
Plays a tone of the specified frequency for the specified duration. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, toString |
| Field Detail |
public static final int MB_OK
public static final int MB_ICONHAND
public static final int MB_ICONQUESTION
public static final int MB_ICONEXCLAMATION
public static final int MB_ICONASTERISK
| Constructor Detail |
public Sound()
| Method Detail |
public static void beep()
public static void beep(int sound)
public static void tone(int freq,
int duration)
freq - frequency in hertz from 32 to 32767duration - duration in milliseconds
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||