|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.portal.providers.context.Theme
A Theme is a collection of visual elements to be used when displaying a desktop. For example, channel background color, font face etc. Theme is a global setting (independent of channels) which a user can select from a preset list or customizing to his/her perference. The global preset list of themes is configured by the administrator and it cannot be changed using this API. The custom theme is the theme that each user can manipulate according to his/her perference. The constant CUSTOM_THEME defined in this class is to refer to the custom theme.
Themes are stored as properties accessed through ProviderContext
. This class serves as a wrapper over ProviderContext
to encapsulate the implementation details of theme.
For details of the theme design and steps to configure the global preset themes, please refer to the Desktop Customization Guide and the Administrator's Guide.
ProviderContext
Field Summary | |
static String |
CUSTOM_THEME
Constant refering to the custom theme. |
Constructor Summary | |
Theme()
|
Method Summary | |
static String |
getAttribute(String channel,
ProviderContext pc,
String name)
Gets an attribute value of the selected theme. |
static String |
getAttribute(String channel,
ProviderContext pc,
String theme,
String name)
Gets an attribute value of a theme. |
static Collection |
getGlobal(String channel,
ProviderContext pc)
Gets the global list of preset theme that is available. |
static Map |
getMap(String channel,
ProviderContext pc,
String theme)
Gets the attributes of a theme as a map. |
static String |
getSelectedName(String channel,
ProviderContext pc)
Gets the theme name to be used for displaying desktop. |
static void |
setCustomAttribute(String channel,
ProviderContext pc,
String name,
String value)
Sets an attribute value of the custom theme. |
static void |
setSelectedName(String channel,
ProviderContext pc,
String name)
Sets the theme to be used for displaying desktop. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String CUSTOM_THEME
Constructor Detail |
public Theme()
Method Detail |
public static String getSelectedName(String channel, ProviderContext pc) throws ProviderContextException
ProviderContext
- ProviderContextException
- if an error occurs in getting the
selected theme name.public static Collection getGlobal(String channel, ProviderContext pc) throws ProviderContextException
ProviderContext
- ProviderContextException
- if an error occurs in getting the
global theme names.public static Map getMap(String channel, ProviderContext pc, String theme) throws ProviderContextException
ProviderContext
- theme
- Theme name, either one from the preset list or
CUSTOM_THEME
for the custom theme.ProviderContextException
- if an error occurs in getting the
attributes of the theme.public static String getAttribute(String channel, ProviderContext pc, String theme, String name) throws ProviderContextException
ProviderContext
- theme
- Theme name, either one from the preset list or
CUSTOM_THEME
for the custom theme.name
- Attribute nameProviderContextException
- if an error occurs getting the attribute, or
the theme is not CUSTOM_THEME
or one in the preset list.public static String getAttribute(String channel, ProviderContext pc, String name) throws ProviderContextException
ProviderContext
- name
- Attribute nameProviderContextException
- if an error occurs getting the attribute.public static void setCustomAttribute(String channel, ProviderContext pc, String name, String value)
CUSTOM_THEME
ProviderContext
- name
- Attribute namevalue
- Attribute valuepublic static void setSelectedName(String channel, ProviderContext pc, String name) throws ProviderContextException
ProviderContext
- name
- Theme name, either one from the preset list or
CUSTOM_THEME
for the custom theme.ProviderContextException
- if an error occurs in setting the
selected theme name.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |