- java.lang.Object
-
- tvbrowser.core.icontheme.InfoThemeLoader
-
public class InfoThemeLoader extends java.lang.Object
A class to load all available info icon themes.- Author:
- René Mach
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DOWNLOAD_SPEC_URL
The url of the download specs.static java.io.File
USER_ICON_DIR
The icon dir of the current user.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addIconTheme(java.io.File iconTheme)
Adds a theme to the theme map.InfoIconTheme[]
getAvailableInfoIconThemes()
InfoIconTheme
getDefaultTheme()
Gets the default info icon theme.InfoIconTheme
getIconThemeForID(java.lang.String id)
Gets the theme with the given ID.InfoIconTheme
getIconThemeForIDOrDefault(java.lang.String id)
Gets the theme with the given ID or the default theme if no theme with ID exists.static InfoThemeLoader
getInstance()
Get the instance of this class.
-
-
-
Field Detail
-
USER_ICON_DIR
public static final java.io.File USER_ICON_DIR
The icon dir of the current user.
-
DOWNLOAD_SPEC_URL
public static final java.lang.String DOWNLOAD_SPEC_URL
The url of the download specs.- See Also:
- Constant Field Values
-
-
Method Detail
-
addIconTheme
public void addIconTheme(java.io.File iconTheme)
Adds a theme to the theme map. Theme will only be added if ID of theme doesn't already exists.- Parameters:
iconTheme
- The theme to add.
-
getInstance
public static InfoThemeLoader getInstance()
Get the instance of this class.- Returns:
- The instance of this class.
-
getIconThemeForID
public InfoIconTheme getIconThemeForID(java.lang.String id)
Gets the theme with the given ID.- Parameters:
id
- The ID of the theme to get.- Returns:
- The theme with the given ID or
null
if no theme with ID exists.
-
getIconThemeForIDOrDefault
public InfoIconTheme getIconThemeForIDOrDefault(java.lang.String id)
Gets the theme with the given ID or the default theme if no theme with ID exists.- Parameters:
id
- The ID of the theme to get.- Returns:
- The theme with the given ID or the default theme if no theme with ID exists.
-
getDefaultTheme
public InfoIconTheme getDefaultTheme()
Gets the default info icon theme.- Returns:
- The default info icon theme.
-
getAvailableInfoIconThemes
public InfoIconTheme[] getAvailableInfoIconThemes()
-
-