|
Java DTV API 1.3 18-Nov-2009 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.dtv.lwuit.plaf.UIManager
public class UIManager
Central point singleton managing the look of the application, this class allows us to customize the styles (themes) as well as the look instance.
Method Summary | |
---|---|
Style |
getComponentStyle(String id)
Returns the style of the component with the given id or a new instance of the default style. |
static UIManager |
getInstance()
Singleton instance method. |
LookAndFeel |
getLookAndFeel()
Returns the currently installed look and feel. |
Hashtable |
getResourceBundle()
The resource bundle allows us to implicitly localize the UI on the fly, once its installed all internal application strings query the resource bundle and extract their values from this table if applicable. |
String |
getThemeName()
Returns the name of the current theme for theme switching UI's. |
void |
loadTheme(InputStream input)
Loads a theme from the given input stream. |
String |
localize(String key,
String defaultValue)
Localizes the given string from the resource bundle if such a String exists in the resource bundle. |
void |
setComponentStyle(String id,
Style style)
Allows a developer to programmatically install a style into the UI manager. |
void |
setLookAndFeel(LookAndFeel plaf)
Sets the currently installed look and feel. |
void |
setResourceBundle(Hashtable resourceBundle)
The resource bundle allows us to implicitly localize the UI on the fly, once its installed all internal application strings query the resource bundle and extract their values from this table if applicable. |
void |
setThemeProps(Hashtable themeProps)
Allows manual theme loading from a hashtable of key/value pairs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static UIManager getInstance()
public LookAndFeel getLookAndFeel()
setLookAndFeel(com.sun.dtv.lwuit.plaf.LookAndFeel)
public void setLookAndFeel(LookAndFeel plaf)
plaf
- the look and feelgetLookAndFeel()
public void setComponentStyle(String id, Style style)
id
- the component id matching the given stylestyle
- the style object to installgetComponentStyle(java.lang.String)
public Style getComponentStyle(String id)
id
- the component id
setComponentStyle(java.lang.String, com.sun.dtv.lwuit.plaf.Style)
public void loadTheme(InputStream input) throws IOException
ButtonFont=System{FACE_SYSTEM;STYLE_PLAIN;SIZE_SMALL} LabelFgColor=333333
input
- the input stream
IOException
- if loading failspublic String getThemeName()
public void setThemeProps(Hashtable themeProps)
themeProps
- the hashtable containing the theme's propspublic Hashtable getResourceBundle()
setResourceBundle(java.util.Hashtable)
public void setResourceBundle(Hashtable resourceBundle)
resourceBundle
- the resourceBundlegetResourceBundle()
public String localize(String key, String defaultValue)
key
- The key used to lookup in the resource bundledefaultValue
- the value returned if no such key exists
|
Java DTV API 1.3 18-Nov-2009 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |