- java.lang.Object
-
- com.googlecode.lanterna.bundle.LanternaThemes
-
public class LanternaThemes extends java.lang.ObjectCatalog of available themes, this class will initially contain the themes bundled with Lanterna but it is possible to add additional themes as well.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.concurrent.ConcurrentHashMap<java.lang.String,Theme>REGISTERED_THEMES
-
Constructor Summary
Constructors Modifier Constructor Description privateLanternaThemes()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ThemegetDefaultTheme()Returns lanterna's default theme which is used if no other theme is selected.static ThemegetRegisteredTheme(java.lang.String name)static java.util.Collection<java.lang.String>getRegisteredThemes()Returns a collection of all themes registered with this class, by their name.private static java.util.PropertiesloadPropTheme(java.lang.String resourceFileName)private static voidregisterPropTheme(java.lang.String name, java.util.Properties properties)static voidregisterTheme(java.lang.String name, Theme theme)Registers aThemewith this class under a certain name so that callinggetRegisteredTheme(String)on that name will return this theme and callinggetRegisteredThemes()will return a collection including this name.
-
-
-
Field Detail
-
REGISTERED_THEMES
private static final java.util.concurrent.ConcurrentHashMap<java.lang.String,Theme> REGISTERED_THEMES
-
-
Method Detail
-
getRegisteredThemes
public static java.util.Collection<java.lang.String> getRegisteredThemes()
Returns a collection of all themes registered with this class, by their name. To get the associatedThemeobject, please usegetRegisteredTheme(String).- Returns:
- Collection of theme names
-
getRegisteredTheme
public static Theme getRegisteredTheme(java.lang.String name)
- Parameters:
name- Name of the theme to retrieve- Returns:
Themeregistered with the supplied name, ornullif none
-
registerTheme
public static void registerTheme(java.lang.String name, Theme theme)Registers aThemewith this class under a certain name so that callinggetRegisteredTheme(String)on that name will return this theme and callinggetRegisteredThemes()will return a collection including this name.- Parameters:
name- Name to register the theme undertheme- Theme to register with this name
-
getDefaultTheme
public static Theme getDefaultTheme()
Returns lanterna's default theme which is used if no other theme is selected.- Returns:
- Lanterna's default theme, as a
Theme
-
registerPropTheme
private static void registerPropTheme(java.lang.String name, java.util.Properties properties)
-
loadPropTheme
private static java.util.Properties loadPropTheme(java.lang.String resourceFileName)
-
-