|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.blackberry.api.phone.phonegui.ScreenModel
public class ScreenModel
Provides the ability to initialize PhoneScreen objects so that you can display information on the incoming and active call screens.
You can use this class to retrieve incoming and active PhoneScreen objects for each orientation of the device that is available (for example, landscape and portrait if applicable).
You can then use the PhoneScreen to add UI fields to the phone screen and invoke ScreenModel.sendAllDataToScreen() to update the call screens.
See the package overview for more information on how to use this class and add content to a call screen.
PhoneScreen,
PhoneScreenVerticalManager,
PhoneScreenHorizontalManager| Constructor Summary | ||
|---|---|---|
|
ScreenModel(int callid)
Constructor of the screen model. |
|
| Method Summary | ||
|---|---|---|
|
int |
getCallId()
Retrieves the call ID of the screen model. |
|
static int |
getCurrentOrientation()
Retrieves the physical orientation of the device. |
|
static XYRect |
getDimensions(int screenType)
Retrieves the current dimensions of this PhoneScreen on the incoming or active call screens. |
|
static XYRect |
getDimensions(int orientation,
int screenType)
Retrieves the dimensions of this PhoneScreen in either of the incoming or active call screens. |
|
PhoneScreen |
getPhoneScreen(int orientation,
int screenType)
Retrieves the phone screen for data drawing. |
|
boolean |
isSupported()
Identifies whether a device supports drawing on the phone screen. |
|
void |
sendAllDataToScreen()
Adds data to the incoming/waiting call and active/outgoing call screens. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ScreenModel(int callid)
callid - The call ID.| Method Detail |
|---|
public int getCallId()
ScreenModel objects generate a unique ID for each application.
public boolean isSupported()
true if the device supports drawing on the phone screens and applications are allowed to display
information while the device is locked, false otherwise.
ControlledAccessException - if the application does not have permission to display data on the screen when the device is locked.PhoneScreen.isSupported()public void sendAllDataToScreen()
ControlledAccessException - if the application does not have permission to display data on the phone screen when the device is locked.
public PhoneScreen getPhoneScreen(int orientation,
int screenType)
orientation - The orientation of the screen, either PhoneScreen.PORTRAIT or PhoneScreen.LANDSCAPE.screenType - The type of phone screen. Either an incoming call screen (PhoneScreen.INCOMING or PhoneScreen.WAITING) or an
active call screen (PhoneScreen.ACTIVECALL or PhoneScreen.OUTGOING).
PhoneScreen object specified by the orientation and screen type, or null if the device does not support the API
or if the device does support the API but not the given orientation.
ControlledAccessException - if the application does not have permission to display data on the phone screen when the device is locked.
IllegalArgumentException - if the call is inactive, the call is neither incoming nor outgoing, or if any of the input parameters are invalid.public static XYRect getDimensions(int screenType)
PhoneScreen on the incoming or active call screens.
screenType - The type of phone screen. Either an incoming call screen (PhoneScreen.INCOMING or PhoneScreen.WAITING) or an
active call screen (PhoneScreen.ACTIVECALL or PhoneScreen.OUTGOING).
XYRect object containing the current dimensions of this PhoneScreen or an empty XYRect object if parameters are invalid or
null if the device does not support the API.
ControlledAccessException - if the application does not have permission to display data on the phone screen when the device is locked.
public static XYRect getDimensions(int orientation,
int screenType)
PhoneScreen in either of the incoming or active call screens.
orientation - The orientation of the screen, either PhoneScreen.PORTRAIT or PhoneScreen.LANDSCAPE.screenType - The type of phone screens. Either an incoming call screen (PhoneScreen.INCOMING or PhoneScreen.WAITING) or an
active call screen (PhoneScreen.ACTIVECALL or PhoneScreen.OUTGOING)
XYRect object containing the current dimensions of this PhoneScreen or an empty XYRect object if parameters are invalid or
null if the device does not support the API.
ControlledAccessException - if the application does not have permission to display data on the phone screen when the device is locked.public static int getCurrentOrientation()
PhoneScreen.PORTRAIT or PhoneScreen.LANDSCAPE.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal