Package com.iizix.prop.ui.device
Class UIThemes
java.lang.Object
com.iizix.prop.ui.device.UIThemes
The UI Themes definitions and routines.
- Author:
- Christopher Mindus
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The names of available themes for the Client.Field Summary
Modifier and TypeFieldDescriptionstatic final UIThemes.Name
The default desktop theme if one must be chosen: Flat.static final UIThemes.Name[]
The default names for desktop: Flat, Dojo Bootstrap and Claro.static final UIThemes.Name
The default mobile theme if one must be chosen: iOS 7+.static final UIThemes.Name[]
Just the flat theme name.static final UIThemes.Name[]
No themes: empty array.Constructor Summary
Method Summary
Modifier and TypeMethodDescriptionstatic UIThemes.Name[]
Gets all desktop themes.static UIThemes.Name[]
Gets all mobile themes.static String[]
getFullPathCSS
(String name) Gets the full path names of the theme CSS files array that is needed for the theme in question.static UIThemes.Name
getPrioritized
(boolean isMobile, UIThemes.Name[] names) From an array of theme names, return the one with the highest priority.static String[]
getShortCSS
(String name) Gets the short path names of the theme CSS files array that is needed for the theme in question.static UIThemes.Name
Gets a Name instance from it's name.static UIThemes.Name[]
parseNames
(String s) Parses a string of themes: "*" or "ALL" or "ANY" for (any) or "name1 name2 ...
Field Details
NONE
No themes: empty array.FLAT
Just the flat theme name.DEFAULT_DESKTOP_NAMES
The default names for desktop: Flat, Dojo Bootstrap and Claro.DEFAULT_DESKTOP_NAME
The default desktop theme if one must be chosen: Flat.DEFAULT_MOBILE_NAME
The default mobile theme if one must be chosen: iOS 7+.
Constructor Details
UIThemes
public UIThemes()
Method Details
getAllDesktopThemes
Gets all desktop themes.- Returns:
- The list of desktop themes: DO NOT MODIFY THIS ARRAY!
getAllMobileThemes
Gets all mobile themes.- Returns:
- The list of mobile themes: DO NOT MODIFY THIS ARRAY!
getTheme
Gets a Name instance from it's name.- Parameters:
name
- The name of the theme.- Returns:
- The theme, or null for not found.
parseNames
Parses a string of themes: "*" or "ALL" or "ANY" for (any) or "name1 name2 ... nameN".- Parameters:
s
- The string.- Returns:
- An array of theme names, or null for any (string = "*").
- Throws:
IllegalArgumentException
- If the name is invalid.
getShortCSS
Gets the short path names of the theme CSS files array that is needed for the theme in question.The return value is
null
if theme is not found.- Parameters:
name
- The name as DESKTOP_* or MOBILE_* constants specify.- Returns:
- An array of strings, starting with "D/" or "M/" that should be replaced with "/$dojo.root$/dijit/themes/" and "/$release.dojo.root$/dojox/mobile/themes/" respectively.
getFullPathCSS
Gets the full path names of the theme CSS files array that is needed for the theme in question.The return value is
null
if theme is not found.- Parameters:
name
- The name as DESKTOP_* or MOBILE_* constants specify.- Returns:
- An array of path file names to CSS files located in the web server root.
getPrioritized
From an array of theme names, return the one with the highest priority.- Parameters:
isMobile
- Flag for mobile selection, false means desktop.names
- The names to use, null for all.- Returns:
- null if none is found.