Class LanternaThemes

java.lang.Object
com.googlecode.lanterna.bundle.LanternaThemes

public class LanternaThemes extends Object
Catalog of available themes, this class will initially contain the themes bundled with Lanterna but it is possible to add additional themes as well.
  • Field Details

  • Constructor Details

    • LanternaThemes

      private LanternaThemes()
  • Method Details

    • getRegisteredThemes

      public static Collection<String> getRegisteredThemes()
      Returns a collection of all themes registered with this class, by their name. To get the associated Theme object, please use getRegisteredTheme(String).
      Returns:
      Collection of theme names
    • getRegisteredTheme

      public static Theme getRegisteredTheme(String name)
      Returns the Theme registered with this class under name, or null if there is no such registration.
      Parameters:
      name - Name of the theme to retrieve
      Returns:
      Theme registered with the supplied name, or null if none
    • registerTheme

      public static void registerTheme(String name, Theme theme)
      Registers a Theme with this class under a certain name so that calling getRegisteredTheme(String) on that name will return this theme and calling getRegisteredThemes() will return a collection including this name.
      Parameters:
      name - Name to register the theme under
      theme - 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(String name, Properties properties)
    • loadPropTheme

      private static Properties loadPropTheme(String resourceFileName)