com.mot.iden.multimedia
Class Lighting

java.lang.Object
  extended bycom.mot.iden.multimedia.Lighting

public class Lighting
extends java.lang.Object

This class represents an interface to the various lights present on the phone. It allows for the changing the states of these lights. One thing to keep in mind is that when Java is suspended calls to these function will not cause any changes to the lighting, and when java is resumed the lights will be in the default state they were when java was started.

See Also:

MOTOROLA and the Stylized M Logo are registered trademarks of Motorola, Inc. Reg. U.S. Pat. & Tm. Off.
? Copyright 2002 - 2003 Motorola, Inc. All Rights Reserved.


Field Summary
static int LIGHT_CALL_INDICATOR
          LIGHT_CALL_INDICATOR Call Indicator Light LIGHT_CALL_INDICATOR has a value of 0x04
static int LIGHT_DISPLAY
          LIGHT_DISPLAY Display Backlight LIGHT_DISPLAY has a value of 0x01
static int LIGHT_KEYPAD
          LIGHT_KEYPAD Key Pad Backlight LIGHT_KEYPAD has a value of 0x02
static int LIGHT_STATE_BLUE
          LIGHT_STATE_BLUE Changes the Specified light to Blue LIGHT_STATE_BLUE has a value of 0x04
static int LIGHT_STATE_CYAN
          LIGHT_STATE_CYAN Changes the Specified light to Cyan LIGHT_STATE_CYAN has a value of 0x05
static int LIGHT_STATE_GREEN
          LIGHT_STATE_RED Changes the Specified light to Red.
static int LIGHT_STATE_MAGENTA
          LIGHT_STATE_MAGENTA Changes the Specified light to MAGENTA LIGHT_STATE_MAGENTA has a value of 0x06
static int LIGHT_STATE_OFF
          LIGHT_STATE_OFF Turn off the specified light LIGHT_STATE_OFF has a value of 0x00
static int LIGHT_STATE_ON
          LIGHT_STATE_ON Turn on the specified light LIGHT_STATE_ON has a value of 0xFF
static int LIGHT_STATE_RED
          LIGHT_STATE_GREEN Changes the Specified light to Green.
static int LIGHT_STATE_WHITE
          LIGHT_STATE_WHITE Changes the Specified light to White LIGHT_STATE_WHITE has a value of 0x07
static int LIGHT_STATE_YELLOW
          LIGHT_STATE_YELLOW Changes the Specified light to Yellow LIGHT_STATE_YELLOW has a value of 0x03
static int LIGHT_STATUS
          LIGHT_STATUS Status Light LIGHT_STATUS has a value of 0x03
static int STATUS_AMBER
          Deprecated. This value is replaced with LIGHT_STATE_YELLOW
static int STATUS_GREEN
          Deprecated. This value is replaced with LIGHT_STATE_GREEN
static int STATUS_OFF
          Deprecated. This value is replaced with LIGHT_STATE_OFF
static int STATUS_RED
          Deprecated. This value is replaced with LIGHT_STATE_RED
 
Method Summary
static void backlightOff()
          Deprecated. This method is replaced with setLighting
static void backlightOn()
          Deprecated. This method is replaced with setLighting
static int getPhotoSensorLevel()
          This native method is used to retrive the light level from the photo sensor This function is not supported in Gemini.
static void javaOverRideLighting(boolean state)
          This method sets the coresponding light to the specified state.
static void keypadLightOff()
          Deprecated. This method is replaced with setLighting
static void keypadLightOn()
          Deprecated. This method is replaced with setLighting
static void setLighting(int light, int state)
          This method sets the coresponding light to the specified state.
static void setStatusLight(int color)
          Deprecated. This method is replaced with setLighting
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATUS_OFF

public static final int STATUS_OFF
Deprecated. This value is replaced with LIGHT_STATE_OFF

STATUS_OFF State of Status light is in the off state

STATUS_OFF has a value of 0

See Also:
Constant Field Values

STATUS_GREEN

public static final int STATUS_GREEN
Deprecated. This value is replaced with LIGHT_STATE_GREEN

STATUS_GREEN State of Status light is in the green state

STATUS_GREEN has a value of 1

See Also:
Constant Field Values

STATUS_RED

public static final int STATUS_RED
Deprecated. This value is replaced with LIGHT_STATE_RED

STATUS_RED State of Status light is in the red state

STATUS_RED has a value of 2

See Also:
Constant Field Values

STATUS_AMBER

public static final int STATUS_AMBER
Deprecated. This value is replaced with LIGHT_STATE_YELLOW

STATUS_AMBER State of Status light is in the amber state

STATUS_AMBER has a value of 3

See Also:
Constant Field Values

LIGHT_DISPLAY

public static final int LIGHT_DISPLAY
LIGHT_DISPLAY Display Backlight

LIGHT_DISPLAY has a value of 0x01

See Also:
Constant Field Values

LIGHT_KEYPAD

public static final int LIGHT_KEYPAD
LIGHT_KEYPAD Key Pad Backlight

LIGHT_KEYPAD has a value of 0x02

See Also:
Constant Field Values

LIGHT_STATUS

public static final int LIGHT_STATUS
LIGHT_STATUS Status Light

LIGHT_STATUS has a value of 0x03

See Also:
Constant Field Values

LIGHT_CALL_INDICATOR

public static final int LIGHT_CALL_INDICATOR
LIGHT_CALL_INDICATOR Call Indicator Light

LIGHT_CALL_INDICATOR has a value of 0x04

See Also:
Constant Field Values

LIGHT_STATE_ON

public static final int LIGHT_STATE_ON
LIGHT_STATE_ON Turn on the specified light

LIGHT_STATE_ON has a value of 0xFF

See Also:
Constant Field Values

LIGHT_STATE_OFF

public static final int LIGHT_STATE_OFF
LIGHT_STATE_OFF Turn off the specified light

LIGHT_STATE_OFF has a value of 0x00

See Also:
Constant Field Values

LIGHT_STATE_GREEN

public static final int LIGHT_STATE_GREEN
LIGHT_STATE_RED Changes the Specified light to Red.

LIGHT_STATE_RED has a value of 0x01

See Also:
Constant Field Values

LIGHT_STATE_RED

public static final int LIGHT_STATE_RED
LIGHT_STATE_GREEN Changes the Specified light to Green.

LIGHT_STATE_GREEN has a value of 0x02

See Also:
Constant Field Values

LIGHT_STATE_BLUE

public static final int LIGHT_STATE_BLUE
LIGHT_STATE_BLUE Changes the Specified light to Blue

LIGHT_STATE_BLUE has a value of 0x04

See Also:
Constant Field Values

LIGHT_STATE_YELLOW

public static final int LIGHT_STATE_YELLOW
LIGHT_STATE_YELLOW Changes the Specified light to Yellow

LIGHT_STATE_YELLOW has a value of 0x03

See Also:
Constant Field Values

LIGHT_STATE_CYAN

public static final int LIGHT_STATE_CYAN
LIGHT_STATE_CYAN Changes the Specified light to Cyan

LIGHT_STATE_CYAN has a value of 0x05

See Also:
Constant Field Values

LIGHT_STATE_MAGENTA

public static final int LIGHT_STATE_MAGENTA
LIGHT_STATE_MAGENTA Changes the Specified light to MAGENTA

LIGHT_STATE_MAGENTA has a value of 0x06

See Also:
Constant Field Values

LIGHT_STATE_WHITE

public static final int LIGHT_STATE_WHITE
LIGHT_STATE_WHITE Changes the Specified light to White

LIGHT_STATE_WHITE has a value of 0x07

See Also:
Constant Field Values
Method Detail

setLighting

public static void setLighting(int light,
                               int state)
                        throws java.lang.IllegalStateException
This method sets the coresponding light to the specified state.

Parameters:
light - Which light to chaneg the state of
state - What State to set the light to
Throws:
java.lang.IllegalStateException - Thrown when a state is an invalid state for a particular light.

backlightOn

public static void backlightOn()
Deprecated. This method is replaced with setLighting

This method turns on the backlight


backlightOff

public static void backlightOff()
Deprecated. This method is replaced with setLighting

This method turns off the backlight


keypadLightOn

public static void keypadLightOn()
Deprecated. This method is replaced with setLighting

This method turns on the keypad's light


keypadLightOff

public static void keypadLightOff()
Deprecated. This method is replaced with setLighting

This method turns off the keypad light


setStatusLight

public static void setStatusLight(int color)
Deprecated. This method is replaced with setLighting

This method changes the color of the status light.

Parameters:
color - the color to change the status light to. Where color is STATUS_OFF, STATUS_GREEN, STATUS_RED, STATUS_AMBER.

getPhotoSensorLevel

public static int getPhotoSensorLevel()
This native method is used to retrive the light level from the photo sensor This function is not supported in Gemini. A useless level (-100) will be returned.

Returns:
a value in the range of 0 to 256 that is the current light level being read

javaOverRideLighting

public static void javaOverRideLighting(boolean state)
This method sets the coresponding light to the specified state. This function is not supported in Gemini.

Parameters:
state - true if Java shall over ride all lighting settings, and false if it shall not.