com.nokia.mid.ui.locale
Class LocaleManager

java.lang.Object
  extended bycom.nokia.mid.ui.locale.LocaleManager

public class LocaleManager
extends java.lang.Object

LocaleManager provides the access point to locale details of the device. By using this class, a caller may:

Clients may use this class to register a LocaleListener for changes in locale setting.


Method Summary
 void addLocaleListener(LocaleListener listener)
          Registers a LocaleListener for locale related change notifications.
 Locale[] getAvailableLocales()
          Retrieves all locales that the device supports.
 Locale getDefaultLocale()
          Retrieves the default (currently selected) locale from the device.
static LocaleManager getInstance()
          Gets a reference to the LocaleManager instance.
 void removeLocaleListener(LocaleListener listener)
          Deregisters a LocaleListener from locale related change notifications.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static LocaleManager getInstance()

Gets a reference to the LocaleManager instance.

In case LocaleManager cannot be instantiated null is returned.

Returns:
A reference to LocaleManager instance.

addLocaleListener

public void addLocaleListener(LocaleListener listener)

Registers a LocaleListener for locale related change notifications.

Parameters:
listener - An instance of LocaleListener to be registered.

removeLocaleListener

public void removeLocaleListener(LocaleListener listener)

Deregisters a LocaleListener from locale related change notifications.

Parameters:
listener - An instance of LocaleListener to be deregistered.

getAvailableLocales

public Locale[] getAvailableLocales()

Retrieves all locales that the device supports.

Returns:
An array of supported Locales in the device. Array is always non-null and contains at least one element.

getDefaultLocale

public Locale getDefaultLocale()

Retrieves the default (currently selected) locale from the device.

Returns:
The default locale. Value is always non-null.


Copyright © 2012 Nokia Corporation. All rights reserved.

Nokia is registered trademark of Nokia Corporation. Java and all Java-based marks are trademarks or registered trademarks of Oracle Corporation. Other product and company names mentioned herein may be trademarks or trade names of their respective owners. This document is confidential information of Nokia Corporation.

Disclaimer
The information in this document is provided "as is," with no warranties whatsoever, including any warranty of merchantability, fitness for any particular purpose, or any warranty otherwise arising out of any proposal, specification, or sample. Furthermore, information provided in this document is preliminary, and may be changed substantially prior to final release.

Nokia Corporation disclaims all liability, including liability for infringement of any proprietary rights, relating to this document and implementation of any information presented in this document.

Nokia Corporation retains the right to make changes to this document at any time, without notice.

License
Subject to above disclaimer, a license is hereby granted to use this documentation solely under existing Limited License Agreement and non-disclosure agreement between the companies for the agreed application development for Series 40 Nokia phones. No other licenses e.g. to any intellectual property rights are granted herein. Any use of the screen shots of this documentation, including any icons thereof, is subject to Nokia's prior written approval.