|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Region interface is used to drive a Fun Lights region.
Notes: There is no need for implementing Region interface by MIDlet's
developer. For getting object which implements Region interface can be used
functions of FunLight class.
Region is an area of phone (display, keypad etc.) that can light or change
its
color.
Region's
ID |
Region
Name |
Common
description |
Colors |
1 |
Display |
Display region represents display backlight. |
The region supports white light that can be turned on/off.
When any non-zero value of color will be passed to setColor() method the color will be converted to FunLight.WHITE color which will be set for region, otherwise lights of region will be turned off. |
2 |
Navigation Keypad |
Navigation Keypad region represents lights of softkeys, navigation keys, SEND and END keys. | The region supports lights with multiple colors. The color is specified in 0x00RRGGBB format. When 0x00RRGGBB color will be passed to setColor() method the color will be converted to 0x00RGB color which will be set for region. getColor() method returns the color in 0x00RRGGBB format (0x00RGB color will be extended through duplication of R ,G and B components). |
3 |
Numeric
Keypad |
Numeric Keypad region represents lights of numeric keys. |
The region supports white light that can be turned on/off.
|
4 |
Sideband |
Sideband region represents lights of device's sides |
The region supports lights with multiple colors. The color is specified in 0x00RRGGBB format. When 0x00RRGGBB color will be passed to setColor() method the color will be converted to 0x00RGB color which will be set for region. getColor() method returns the color in 0x00RRGGBB format (0x00RGB color will be extended through duplication of R ,G and B components). |
Region's
ID |
Region
Name |
Common
description |
Colors |
1 |
Display
|
Display region represents display backlight. |
The region supports white light that can be turned on/off.
|
2 |
Keypad
& Side Lights |
Keypad & Side Lights region represents lights of keypad and lights of sides of device. |
The region supports white light that can be turned on/off.
|
3 |
Logo |
Logo region represents lights of Motorola's logo. |
The region supports white light that can be turned on/off.
|
4 |
Ring
around Logo |
Ring around Logo region represents lights of ring around Motorola's logo. |
The region supports lights with multiple colors. The color is specified in 0x00RRGGBB format. When 0x00RRGGBB color will be passed to setColor() method the color will be converted to 0x00RGB color which will be set for region. getColor() method returns the color in 0x00RRGGBB format (0x00RGB color will be extended through duplication of R ,G and B components). |
Region's ID |
Region
Name |
Common
description |
Colors |
1 |
Display |
Display region represents display backlight. |
The region supports white light that can be turned on/off.
|
2 |
Keypad |
Keypad region represents lights of keypad. |
The region supports white light that can be turned on/off.
|
3 |
Left
Sideband |
Left Sideband region represents lights of left side band of the device. |
The region supports lights with multiple colors. The color is specified in 0x00RRGGBB format. When 0x00RRGGBB color will be passed to setColor() method the color will be converted to 0x00RGB color which will be set for region. getColor() method returns the color in 0x00RRGGBB format (0x00RGB color will be extended through duplication of R ,G and B components). |
4 |
Right
Sideband |
Right Sideband region represents lights of right side band of the device. |
The region supports lights with multiple colors. The color is specified in 0x00RRGGBB format. When 0x00RRGGBB color will be passed to setColor() method the color will be converted to 0x00RGB color which will be set for region. getColor() method returns the color in 0x00RRGGBB format (0x00RGB color will be extended through duplication of R ,G and B components). |
Blank region was designed for ignoring
attempt to access to non-existing regions. For example, following code
illustrates this:
(Code 1: turn on Display Region for E380 device):
Region display = FunLight.getRegion(1);
display.setColor(FunLight.ON);
display.getControl();
(Code 2: turn on
Navigation Keypad
Region keypad = FunLight.getRegion(2);
keypad.setColor(FunLight.ON);
keypad.getControl();
Product E380 has both Display and Navigation Keypad
V300 does not support Fun Lights feature, therefore FunLight.getRegion(1) and
FunLight.getRegion(2) will return region object with following
attribute:
Region's
ID |
Region
Name |
Common
description |
Colors |
0 |
Blank |
Blank region represents non-existing region. |
FunLight.BLACK |
All methods applyed to Blank region will do nothing, and will not throw any exceptions.
Method Summary | |
int |
getColor()
Gets color of the region. |
int |
getControl()
Tries to occupy region's control. |
int |
getID()
Gets region's ID. |
void |
releaseControl()
Releases region's control. |
int |
setColor(byte red,
byte green,
byte blue)
Sets the color of region. |
int |
setColor(int color)
Sets the color of region. |
java.lang.String |
toString()
This method returns a string which contain the region name. |
Method Detail |
public int getColor()
FunLightException
- if setColor method was not
called before calling this method except Blank region.public int getControl()
public int getID()
public void releaseControl()
public int setColor(int color)
color
- color in RGB format (0x00RRGGBB). The high order byte of this
value is ignored.
public int setColor(byte red, byte green, byte blue)
red
- Red component of color.green
- Green component of color.blue
- Blue component of color.
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |