net.rim.device.api.util
Class TimeZoneUtilities

java.lang.Object
  |
  +--net.rim.device.api.util.TimeZoneUtilities

public class TimeZoneUtilities
extends Object

This class provides utility methods for the time zones supported by the BlackBerry smartphone.

Since:
JDE 4.6.0

Field Summary
static int LONG
          A style specifier for long display names, which typically require an entire screen width to display properly.
static int SHORT
          A style specifier for short display names, which are suitable for use in a selection UI widget such as a ChoiceField.
 
Method Summary
static TimeZone[] getAvailableTimeZones()
          Returns an array of all available time zones, in order by GMT offset.
static String getDisplayName(TimeZone timeZone, int style)
          Returns the display name of the specified time zone in the specified style, localized according to the current locale.
static String[] getDisplayNames(int style)
          Returns the display names of all available time zones, in order by GMT offset, in the specified style, and localized according to the current locale.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LONG

public static final int LONG
A style specifier for long display names, which typically require an entire screen width to display properly.
Since:
JDE 4.6.0

SHORT

public static final int SHORT
A style specifier for short display names, which are suitable for use in a selection UI widget such as a ChoiceField.
Since:
JDE 4.6.0
Method Detail

getAvailableTimeZones

public static TimeZone[] getAvailableTimeZones()
Returns an array of all available time zones, in order by GMT offset.
Returns:
An array of all available time zones.
Since:
JDE 4.6.0

getDisplayName

public static String getDisplayName(TimeZone timeZone,
                                    int style)
Returns the display name of the specified time zone in the specified style, localized according to the current locale.
Parameters:
timeZone - The time zone whose display name is being retrieved.
style - Either LONG or SHORT.
Returns:
The display name.
Throws:
NullPointerException - if timeZone is null.
IllegalArgumentException - if timeZone is not a supported time zone, or style is not LONG or SHORT.
Since:
JDE 4.6.0

getDisplayNames

public static String[] getDisplayNames(int style)
Returns the display names of all available time zones, in order by GMT offset, in the specified style, and localized according to the current locale.
Parameters:
style - Either LONG or SHORT.
Returns:
The display names.
Throws:
IllegalArgumentException - if style is not LONG or SHORT.
Since:
JDE 4.6.0



Copyright 1999-2009 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.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.