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

java.lang.Object
  extended by net.rim.device.api.ui.Field
      extended by net.rim.device.api.ui.Manager
          extended by net.rim.device.api.ui.Screen
              extended by net.rim.device.api.ui.container.FullScreen
                  extended by net.rim.blackberry.api.phone.phonegui.PhoneScreen

public class PhoneScreen
extends FullScreen

This class lets applications display information on the call screens on the BlackBerry® device.

The system initiates a separate thread to send the information to the call screens. The thread has a maximum time limit of 15 seconds. If this limit is exceeded, data is not sent to the call screens.

If multiple applications attempt to send data to the call screens concurrently, the incoming call screen displays the information in a slideshow, and the active call screen provides a menu item for users to toggle the information.

Recommendations:

Application control:

An application control policy can determine if information can be displayed on a BlackBerry device that is locked. This class verifies whether data can be displayed on a device that is locked regardless if the device is actually locked or not. You can also invoke PhoneScreen.isSupported() to check this policy.

Usage:

To download a sample application that demonstrates this class, visit www.blackberry.com/go/phonescreensample.

To create custom data, applications need to:

  1. Extend AbstractPhoneListener.
  2. Register the phone listener, for example Phone.addPhoneListener(phoneListener);.
  3. Override the phone listener's callIncoming(), callInitiated(), and callWaiting() methods.
    public void callIncoming(int callid)
     {
        PhoneScreen ps = new PhoneScreen(callid, application);
        ps.add(new LabelField("Hello World"));
        ps.sendDataToScreen();
     }

Tip: Your application can register to the phone listener on startup, and then keep it around as long as the BlackBerry device is running. You can deregister your application from the phone listener before it is closed.

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 5.0.0

Field Summary
Category: Signed static int ACTIVECALL
          Connected call screen.
Category: Signed static int INCOMING
          Incoming call screen.
Category: Signed static int LANDSCAPE
          Landscape orientation.
Category: Signed static int MAX_FIELD_COUNT
          The maximum number of field objects allowed to be written to a manager.
Category: Signed static int OUTGOING
          Outgoing call screen.
Category: Signed static int PORTRAIT
          Portrait orientation.
Category: Signed static int WAITING
          Call waiting screen.
 
Fields inherited from class net.rim.device.api.ui.Screen
DEFAULT_CLOSE, DEFAULT_MENU, NO_SYSTEM_MENU_ITEMS
 
Fields inherited from class net.rim.device.api.ui.Manager
BOTTOMMOST, DOWNWARD, HORIZONTAL_SCROLL, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_MASK, HORIZONTAL_SCROLL_MASK, LEAVE_BLANK_SPACE, LEFTMOST, LEFTWARD, NO_HORIZONTAL_SCROLL, NO_HORIZONTAL_SCROLLBAR, NO_SCROLL_RESET, NO_VERTICAL_SCROLL, NO_VERTICAL_SCROLLBAR, QUANTA_FONT, RIGHTMOST, RIGHTWARD, TOPMOST, UPWARD, VERTICAL_SCROLL, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_MASK, VERTICAL_SCROLL_MASK
 
Fields inherited from class net.rim.device.api.ui.Field
ACTION_INVOKE, AXIS_HORIZONTAL, AXIS_SEQUENTIAL, AXIS_VERTICAL, EDITABLE, EDITABLE_MASK, FIELD_BOTTOM, FIELD_HALIGN_MASK, FIELD_HCENTER, FIELD_LEADING, FIELD_LEFT, FIELD_RIGHT, FIELD_TOP, FIELD_TRAILING, FIELD_VALIGN_MASK, FIELD_VCENTER, FOCUSABLE, FOCUSABLE_MASK, HIGHLIGHT_FOCUS, HIGHLIGHT_SELECT, NON_FOCUSABLE, NON_SPELLCHECKABLE, READONLY, SPELLCHECKABLE, SPELLCHECKABLE_MASK, STATUS_MOVE_FOCUS_HORIZONTALLY, STATUS_MOVE_FOCUS_VERTICALLY, USE_ALL_HEIGHT, USE_ALL_WIDTH, VISUAL_STATE_ACTIVE, VISUAL_STATE_DISABLED, VISUAL_STATE_DISABLED_FOCUS, VISUAL_STATE_FOCUS, VISUAL_STATE_NORMAL
 
Constructor Summary
Category: Signed PhoneScreen(int callid, Application app)
          Constructor to create PhoneScreen instance.
 
Method Summary
Category: Signed  void add(Field field)
          Adds a field object.
Category: Signed  int addImage(Bitmap bitmap)
          Adds a bitmap object to the field.
Category: Signed  int addImage(EncodedImage image)
          Adds an encoded image to the field.
Category: Signed  void delete(Field field)
          Deletes a field object.
Category: Signed  void deleteRange(int start, int count)
          Deletes a range of field objects.
Category: Signed static XYRect getDimensions(int screenType)
          Returns the current dimensions of this field in the incoming or active call screens.
Category: Signed static XYRect getDimensions(int orientation, int screenType)
          Returns the current dimensions of this field in the incoming or active call screens.
Category: Signed  Field getField(int index)
          Retrieves the field from an index.
Category: Signed  int getFieldCount()
          Retrieves the number of fields.
Category: Signed  int getScreenBackground()
          Gets the background color of the PhoneScreen.
Category: Signed  int getScreenForeground()
          Gets the foreground color of the PhoneScreen.
Category: Signed  void insert(Field field, int index)
          Inserts a field object at a specified index.
Category: Signed static boolean isSupported()
          Verifies whether the device supports PhoneScreen objects and the application control policies permit the application to display information while the device is locked.
Category: Signed  void replace(Field oldField, Field newField)
          Replaces a field object.
Category: Signed  void sendDataToScreen()
          Send data to the incoming and active call screens.
Category: Signed  void setPadding(int top, int right, int bottom, int left)
          Sets the padding.
Category: Signed  void setPadding(XYEdges padding)
          Sets the padding.
Category: Signed  void setScreenBackground(int rgb)
          Sets the background color of the PhoneScreen.
Category: Signed  void setScreenForeground(int rgb)
          Sets the foreground color of the PhoneScreen.
 
Methods inherited from class net.rim.device.api.ui.container.FullScreen
sublayout
 
Methods inherited from class net.rim.device.api.ui.Screen
addKeyListener, addScreenUiEngineAttachedListener, addTrackwheelListener, close, doPaint, ensureRegionVisible, getAccessibleContext, getApplication, getDefaultMenuItem, getDelegate, getFieldAtLocation, getFieldWithFocus, getFieldWithFocusIndex, getFocusRect, getGraphics, getLeafFieldWithFocus, getMenu, getScreenAbove, getScreenBelow, getUiEngine, getVirtualKeyboard, invalidate, invalidate, invalidateAll, invalidateLayout, invokeAction, isDataValid, isDirty, isDisplayed, isFocus, isFocusable, isGlobal, isGlobalStatus, isMuddy, isSelecting, keyChar, keyCharUnhandled, keyControl, keyDown, keyRepeat, keyStatus, keyUp, layoutDelegate, makeMenu, navigationClick, navigationMovement, navigationUnclick, onClose, onDisplay, onExposed, onFocus, onFocusNotify, onMenu, onMenuDismissed, onMenuDismissed, onObscured, onSave, onSavePrompt, onUiEngineAttached, onUndisplay, onUnfocus, openDevelopmentBackdoor, openProductionBackdoor, paint, paintBackground, removeFocus, removeKeyListener, removeScreenUiEngineAttachedListener, removeTrackwheelListener, save, scroll, setBackdoorAltStatus, setDefaultClose, setDirty, setFocus, setFocus, setHorizontalQuantization, setPositionDelegate, setTrackballFilter, setTrackballSensitivityXOffset, setTrackballSensitivityYOffset, setVerticalQuantization, touchEvent, trackwheelClick, trackwheelClickUnhandled, trackwheelRoll, trackwheelUnclick, updateDisplay
 
Methods inherited from class net.rim.device.api.ui.Manager
addAll, deleteAll, getHorizontalScroll, getPreferredHeightOfChild, getPreferredWidthOfChild, getVerticalScroll, getVirtualHeight, getVirtualWidth, getVisibleHeight, getVisibleWidth, invalidateFieldRange, isDownArrowShown, isUpArrowShown, isValidLayout, layout, layoutChild, moveFocus, moveFocus, nextFocus, nextFocus, paintChild, setFocus, setHorizontalScroll, setHorizontalScroll, setPositionChild, setScrollListener, setScrollingInertial, setVerticalScroll, setVirtualExtent, subpaint
 
Methods inherited from class net.rim.device.api.ui.Field
drawFocus, drawHighlightRegion, fieldChangeNotify, focusAdd, focusRemove, getBackground, getBackground, getBorder, getBorder, getBorder, getChangeListener, getContentHeight, getContentLeft, getContentRect, getContentRect, getContentTop, getContentWidth, getContextMenu, getCookie, getExtent, getExtent, getFieldStyle, getFocusListener, getFont, getHeight, getIndex, getLeft, getManager, getOriginal, getPreferredHeight, getPreferredWidth, getScreen, getStyle, getTop, getVisualState, getWidth, isEditable, isPasteable, isSelectable, isSelectionCopyable, isSelectionCutable, isSelectionDeleteable, isSpellCheckable, isStyle, isVisible, makeContextMenu, onVisibilityChange, paste, select, selectionCopy, selectionCut, selectionDelete, setBackground, setBackground, setBorder, setBorder, setBorder, setBorder, setChangeListener, setCookie, setEditable, setExtent, setFocusListener, setFont, setMuddy, setNonSpellCheckable, setPosition, setVisualState, updateLayout
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Field Detail

PORTRAIT

public static final int PORTRAIT
Portrait orientation.

See Also:
Constant Field Values
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 5.0.0

LANDSCAPE

public static final int LANDSCAPE
Landscape orientation.

See Also:
Constant Field Values
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 5.0.0

INCOMING

public static final int INCOMING
Incoming call screen.

See Also:
Constant Field Values
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 5.0.0

WAITING

public static final int WAITING
Call waiting screen.

See Also:
Constant Field Values
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 5.0.0

OUTGOING

public static final int OUTGOING
Outgoing call screen.

See Also:
Constant Field Values
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 5.0.0

ACTIVECALL

public static final int ACTIVECALL
Connected call screen.

See Also:
Constant Field Values
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 5.0.0

MAX_FIELD_COUNT

public static final int MAX_FIELD_COUNT
The maximum number of field objects allowed to be written to a manager. The maximum is 5.

See Also:
Constant Field Values
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 5.0.0


Constructor Detail

PhoneScreen

public PhoneScreen(int callid,
                   Application app)
Constructor to create PhoneScreen instance.

Parameters:
callid - The call ID.
app - Instance of the third party application.
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 5.0.0


Method Detail

addImage

public int addImage(EncodedImage image)
Adds an encoded image to the field.

Parameters:
image - Encoded image to be added.
Returns:
int Index of the image in this screen.
Throws:
NullPointerException - if image is null.
RuntimeException - if the number of field exceeds PhoneScreen.MAX_FIELD_COUNT or if the device does not support PhoneScreen objects.
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 5.0.0

addImage

public int addImage(Bitmap bitmap)
Adds a bitmap object to the field.

Parameters:
bitmap - Bitmap object to be added.
Returns:
int Index of the image in this screen.
Throws:
NullPointerException - if bitmap is null.
RuntimeException - if the number of fields exceeds the PhoneScreen.MAX_FIELD_COUNT or if the device does not support PhoneScreen objects.
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 5.0.0

add

public void add(Field field)
Adds a field object.

Overrides:
add in class Screen
Parameters:
field - Field object to be added.
Throws:
NullPointerException - if the field is null.
IllegalArgumentException - if the field already has a manager or it is an instance of Screen.
RuntimeException - if the number of field exceeds PhoneScreen.MAX_FIELD_COUNT or if the device does not support PhoneScreen objects.
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 5.0.0

deleteRange

public void deleteRange(int start,
                        int count)
Deletes a range of field objects.

Overrides:
deleteRange in class Screen
Parameters:
start - Start index.
count - Number of field objects to be deleted.
Throws:
RuntimeException - if Manager is empty or if the device does not support PhoneScreen objects.
IndexOutOfBoundsException - if the start index does not fall into valid range or the range to be deleted exceeds the valid boundary.
IllegalArgumentException - if the count argument is less than 1.
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 5.0.0

delete

public void delete(Field field)
Deletes a field object.

Overrides:
delete in class Screen
Parameters:
field - Field object to be deleted.
Throws:
NullPointerException - if the field is null.
IllegalArgumentException - if the field does not have a manager or the field's manager is not the current manager instance.
RuntimeException - if the device does not support PhoneScreen objects.
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 5.0.0

replace

public void replace(Field oldField,
                    Field newField)
Replaces a field object.

Overrides:
replace in class Screen
Parameters:
oldField - Field object to be replaced.
newField - New field object to be added.
Throws:
NullPointerException - if the oldField or newField is null.
IllegalArgumentException - if the new field already has a manager, the old field does not have a manager or the old field's manager is not the current manager instance, or any of the fields are an instance of Screen.
RuntimeException - if the device does not support PhoneScreen objects.
See Also:
Manager.delete(Field), Manager.insert(Field, int), Field.getIndex(), Field.getManager(), Field.setFocus()
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 5.0.0

insert

public void insert(Field field,
                   int index)
Inserts a field object at a specified index.

Overrides:
insert in class Screen
Parameters:
field - Field object to be inserted.
index - Index where to insert the field object.
Throws:
NullPointerException - if the field is null.
RuntimeException - if the device does not support PhoneScreen objects.
IllegalArgumentException - if the field already has a manager or it is an instance of Screen.
IndexOutOfBoundsException - if index is not in the valid range.
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 5.0.0

getField

public Field getField(int index)
Retrieves the field from an index.

Overrides:
getField in class Screen
Parameters:
index - Index of the field.
Returns:
Field object at the position specified by the index. Returns null if the device does not support PhoneScreen objects or the index is not in a valid range.
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 5.0.0

getFieldCount

public int getFieldCount()
Retrieves the number of fields.

Overrides:
getFieldCount in class Screen
Returns:
Number of fields. Returns 0 if the device does not support PhoneScreen objects or if the delegate Manager is empty.
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 5.0.0

setPadding

public void setPadding(int top,
                       int right,
                       int bottom,
                       int left)
Sets the padding.

Overrides:
setPadding in class Field
Parameters:
top - Top-most padding coordinate.
right - Right-most padding coordinate.
bottom - Bottom-most padding coordinate.
left - Left-most padding coordinate.
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 5.0.0

setPadding

public void setPadding(XYEdges padding)
Sets the padding.

Overrides:
setPadding in class Field
Parameters:
padding - XYEdges representing the padding.
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 5.0.0

setScreenBackground

public void setScreenBackground(int rgb)
Sets the background color of the PhoneScreen.

To set the background color, the following conditions must be met:

Parameters:
rgb - Hexadecimal RGB background (for example, 0xFFFFFF). If you do not specify a background or specify -1, a transparent background is used.
Throws:
ControlledAccessException - if an application control policy does permit to display data in a locked device.
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 5.0.0

setScreenForeground

public void setScreenForeground(int rgb)
Sets the foreground color of the PhoneScreen.

To set the foreground color, the following conditions must be met:

Parameters:
rgb - Hexadecimal RGB foreground (for example, 0xFFFFFF).
Throws:
ControlledAccessException - if an application control policy does permit to display data in a locked device.
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 5.0.0

getScreenForeground

public int getScreenForeground()
Gets the foreground color of the PhoneScreen.

Returns:
int Hexadecimal RGB value of the foreground color.
Throws:
ControlledAccessException - if an application control policy does permit to display data in a locked device.
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 5.0.0

getScreenBackground

public int getScreenBackground()
Gets the background color of the PhoneScreen.

Returns:
int Hexadecimal RGB value of the background color. -1 represents a transparent background.
Throws:
ControlledAccessException - if an application control policy does permit to display data in a locked device.
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 5.0.0

isSupported

public static boolean isSupported()
Verifies whether the device supports PhoneScreen objects and the application control policies permit the application to display information while the device is locked. Because not all devices support PhoneScreen objects, you should invoke this method.

Returns:
true if the device supports PhoneScreen objects and application control policies permit the application to display information while the device is locked, false otherwise.
Throws:
ControlledAccessException - if an application control policy does permit to display data in a locked device.
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 5.0.0

sendDataToScreen

public void sendDataToScreen()
Send data to the incoming and active call screens. If the device does not support PhoneScreen objects, data is not sent to the device screen.

Throws:
ControlledAccessException - if an application control policy does permit to display data in a locked device.
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 5.0.0

getDimensions

public static XYRect getDimensions(int screenType)
Returns the current dimensions of this field in the incoming or active call screens.

Parameters:
screenType - Type of screen. Must be an incoming call screen (PhoneScreen.INCOMING or PhoneScreen.WAITING) or an active call screen (PhoneScreen.ACTIVECALL or PhoneScreen.OUTGOING).
Returns:
XYRect An XYRect object containing the current dimensions of this field. Returns null if the device does not support PhoneScreen objects. You can check for support by invoking PhoneScreen.isSupported().
Throws:
ControlledAccessException - if an application control policy does permit to display data in a locked device.
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 5.0.0

getDimensions

public static XYRect getDimensions(int orientation,
                                   int screenType)
Returns the current dimensions of this field in the incoming or active call screens.

Parameters:
orientation - Orientation of the screen. Must be PhoneScreen.PORTRAIT or PhoneScreen.LANDSCAPE.
screenType - Type of screen. Must be an incoming call screen (PhoneScreen.INCOMING or PhoneScreen.WAITING) or an active call screen (PhoneScreen.ACTIVECALL or PhoneScreen.OUTGOING).
Returns:
XYRect An XYRect object containing the current dimensions of this field. Returns null if the device does not support PhoneScreen objects. You can check for support by invoking PhoneScreen.isSupported().
Throws:
ControlledAccessException - if an application control policy does permit to display data in a locked device.
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 5.0.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.