net.rim.blackberry.api.phone.phonegui
Class ScreenModel

java.lang.Object
  extended by net.rim.blackberry.api.phone.phonegui.ScreenModel

public class ScreenModel
extends Object

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.

See Also:
PhoneScreen, PhoneScreenVerticalManager, PhoneScreenHorizontalManager
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0

Constructor Summary
Category: Signed ScreenModel(int callid)
          Constructor of the screen model.
 
Method Summary
Category: Signed  int getCallId()
          Retrieves the call ID of the screen model.
Category: Signed static int getCurrentOrientation()
          Retrieves the physical orientation of the device.
Category: Signed static XYRect getDimensions(int screenType)
          Retrieves the current dimensions of this PhoneScreen on the incoming or active call screens.
Category: Signed static XYRect getDimensions(int orientation, int screenType)
          Retrieves the dimensions of this PhoneScreen in either of the incoming or active call screens.
Category: Signed  PhoneScreen getPhoneScreen(int orientation, int screenType)
          Retrieves the phone screen for data drawing.
Category: Signed  boolean isSupported()
          Identifies whether a device supports drawing on the phone screen.
Category: Signed  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

ScreenModel

public ScreenModel(int callid)
Constructor of the screen model.

Parameters:
callid - The call ID.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0


Method Detail

getCallId

public int getCallId()
Retrieves the call ID of the screen model. ScreenModel objects generate a unique ID for each application.

Returns:
The call ID of the screen model.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0

isSupported

public boolean isSupported()
Identifies whether a device supports drawing on the phone screen.

Returns:
true if the device supports drawing on the phone screens and applications are allowed to display information while the device is locked, false otherwise.
Throws:
ControlledAccessException - if the application does not have permission to display data on the screen when the device is locked.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0

sendAllDataToScreen

public void sendAllDataToScreen()
Adds data to the incoming/waiting call and active/outgoing call screens. Data is not sent if the device does not support drawing on the phone screen.

Throws:
ControlledAccessException - if the application does not have permission to display data on the phone screen when the device is locked.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0

getPhoneScreen

public PhoneScreen getPhoneScreen(int orientation,
                                  int screenType)
Retrieves the phone screen for data drawing.

Parameters:
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).
Returns:
A PhoneScreen object specified by the orientation and screen type, or null if the device does not support the API.
Throws:
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.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0

getDimensions

public static XYRect getDimensions(int screenType)
Retrieves the current dimensions of this PhoneScreen on the incoming or active call screens.

Parameters:
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).
Returns:
Either an 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.
Throws:
ControlledAccessException - if the application does not have permission to display data on the phone screen when the device is locked.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0

getDimensions

public static XYRect getDimensions(int orientation,
                                   int screenType)
Retrieves the dimensions of this PhoneScreen in either of the incoming or active call screens.

Parameters:
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)
Returns:
Either an 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.
Throws:
ControlledAccessException - if the application does not have permission to display data on the phone screen when the device is locked.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0

getCurrentOrientation

public static int getCurrentOrientation()
Retrieves the physical orientation of the device.

Returns:
The orientation of the screen, either PhoneScreen.PORTRAIT or PhoneScreen.LANDSCAPE.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0





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