|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
com.mot.iden.multimedia.Vibrator
This class represents the vibrator present on the Phone. It provides methods to actuate and deactuate the vibrator. When Java is in the paused state the vibrator will no long vibrate until java is resumed. When Java is resumed, any periodic vibration will resume vibrating the phone, any non-periodic vibration will not resume vibrating the phone.
MOTOROLA and the Stylized M Logo are registered trademarks of
Motorola, Inc. Reg. U.S. Pat. & Tm. Off.
? Copyright 2002 Motorola, Inc. All Rights Reserved.
Field Summary | |
static int |
MAX_VIBRATE_TIME
MAX_VIBRATE_TIME The maximum time the vibrator can vibrate for. |
static int |
MIN_PAUSE_TIME
MIN_PAUSE_TIME The minimum time to pause between the vibrator stopping and starting again. |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Method Summary | |
void |
run()
this is the run method for the Vibration thread. |
static void |
vibrateFor(int timeInMs)
This method has the vibrator vibrate for the time period specified. |
static void |
vibratePeriodicaly(int timeInMs)
This method creates a periodic vibrator that has the same on and off time. |
static void |
vibratePeriodicaly(int timeOnInMs,
int timeOffInMs)
This method turns off and on the vibrator for the times specified. |
static void |
vibratorOff()
This method turns off the vibrator. |
static void |
vibratorOn()
This method turns on the vibrator for MAX_VIBRATE_TIME |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int MAX_VIBRATE_TIME
public static final int MIN_PAUSE_TIME
Method Detail |
public static void vibratorOn()
MAX_VIBRATE_TIME
public static void vibratorOff()
public static void vibrateFor(int timeInMs) throws java.lang.IllegalArgumentException
timeInMs
- amount of time to vibrate the phone for
IllegalArumentException
- Generated if timeInMs is less then or equal
or equal to zero or is greater then
MAX_VIBRATE_TIME
java.lang.IllegalArgumentException
public static void vibratePeriodicaly(int timeOnInMs, int timeOffInMs) throws java.lang.IllegalArgumentException
MAX_VIBRATE_TIME
timeOffInMS must be greater than or equal toMIN_PAUSE_TIME
.
timeOnInMs
- time to leave the vibrator on in miliseconds
IllegalArumentException
- Generated if timeInMs is less then or equal
or equal to zero or is greater then
MAX_VIBRATE_TIME
, or if timeOffInMs is less
then MIN_PAUSE_TIME
.
java.lang.IllegalArgumentException
public static void vibratePeriodicaly(int timeInMs) throws java.lang.IllegalArgumentException
MIN_PAUSE_TIME
to MAX_VIBRATE_TIME
timeInMs
- The time the vibrator is supose to stay on.
IllegalArumentException
- Generated if timeInMs is less then or equal
or equal to zero or is greater then
MAX_VIBRATE_TIME
, or if timeOnInMs is less
then MIN_PAUSE_TIME
.
java.lang.IllegalArgumentException
public void run()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |