com.nokia.mid.theme
Class ThemeManager

java.lang.Object
  extended by com.nokia.mid.theme.ThemeManager

public class ThemeManager
extends java.lang.Object

ThemeManager allows for registering ThemeChangeListeners, getting a list of Themes, the current Theme, and activating a different Theme.


Constructor Summary
ThemeManager()
           
 
Method Summary
static void addThemeChangeListener(ThemeChangeListener l)
          Add a ThemeChangeListener to be notified when the Theme is changed.
static Theme getCurrentTheme()
          Get the currently active Theme
static Theme[] getThemes()
          Get a list of all available Themes
static void removeThemeChangeListener(ThemeChangeListener l)
          Remove a ThemeChangeListener
static boolean setCurrentTheme(Theme theme)
          Change the active Theme for this MIDlet, for the current session.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThemeManager

public ThemeManager()
Method Detail

getCurrentTheme

public static Theme getCurrentTheme()
                             throws ThemeException
Get the currently active Theme

Returns:
The current Theme
Throws:
ThemeException

getThemes

public static Theme[] getThemes()
                         throws ThemeException
Get a list of all available Themes

Returns:
A list of available Themes
Throws:
ThemeException

setCurrentTheme

public static boolean setCurrentTheme(Theme theme)
                               throws ThemeException
Change the active Theme for this MIDlet, for the current session. Note that the Theme must be set before showing a Displayable.

Parameters:
theme - The theme to active (must be gotten through getCurrentTheme() or getThemes().
Throws:
ThemeException - When theme is null

addThemeChangeListener

public static void addThemeChangeListener(ThemeChangeListener l)
                                   throws ThemeException
Add a ThemeChangeListener to be notified when the Theme is changed.

Parameters:
l - The ThemeChangeListener to add. If the listener is null or has already been added, the call will be silently ignored.
Throws:
ThemeException

removeThemeChangeListener

public static void removeThemeChangeListener(ThemeChangeListener l)
Remove a ThemeChangeListener

Parameters:
l - The ThemeChangeListener to remove. If the listener is null, the call will be silently ignored.


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.