Class UIThemes

java.lang.Object
com.iizix.prop.ui.device.UIThemes

public class UIThemes extends Object
The UI Themes definitions and routines.
Author:
Christopher Mindus
  • Field Details

    • NONE

      public static final UIThemes.Name[] NONE
      No themes: empty array.
    • FLAT

      public static final UIThemes.Name[] FLAT
      Just the flat theme name.
    • DEFAULT_DESKTOP_NAMES

      public static final UIThemes.Name[] DEFAULT_DESKTOP_NAMES
      The default names for desktop: Flat, Dojo Bootstrap and Claro.
    • DEFAULT_DESKTOP_NAME

      public static final UIThemes.Name DEFAULT_DESKTOP_NAME
      The default desktop theme if one must be chosen: Flat.
    • DEFAULT_MOBILE_NAME

      public static final UIThemes.Name DEFAULT_MOBILE_NAME
      The default mobile theme if one must be chosen: iOS 7+.
  • Constructor Details

    • UIThemes

      public UIThemes()
  • Method Details

    • getAllDesktopThemes

      public static UIThemes.Name[] getAllDesktopThemes()
      Gets all desktop themes.
      Returns:
      The list of desktop themes: DO NOT MODIFY THIS ARRAY!
    • getAllMobileThemes

      public static UIThemes.Name[] getAllMobileThemes()
      Gets all mobile themes.
      Returns:
      The list of mobile themes: DO NOT MODIFY THIS ARRAY!
    • getTheme

      public static UIThemes.Name getTheme(String name)
      Gets a Name instance from it's name.
      Parameters:
      name - The name of the theme.
      Returns:
      The theme, or null for not found.
    • parseNames

      public static UIThemes.Name[] parseNames(String s)
      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

      public static String[] getShortCSS(String name)
      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

      public static String[] getFullPathCSS(String name)
      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

      public static UIThemes.Name getPrioritized(boolean isMobile, UIThemes.Name[] names)
      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.