Class Themes

java.lang.Object
com.illumon.iris.db.plot.themes.Themes
All Implemented Interfaces:
Map<String,Theme>

public class Themes extends Object implements Map<String,Theme>
Constructs Themes from .theme XML files. The constructed Themes are held in a Map with Theme names as keys.
  • Method Details

    • setDefaultTheme

      public static void setDefaultTheme(Theme defaultTheme)
      Defines the default Theme used when one isn't specified.
      Parameters:
      defaultTheme - default theme
    • theme

      public static Theme theme(String name)
      Returns a specified theme.
      Parameters:
      name - name of the theme
      Returns:
      theme
      Throws:
      IllegalArgumentException - no theme matching name
    • theme

      public static Theme theme()
      Returns the default theme. The deault is specified by the Plot.theme.default property.
      Returns:
      default theme
    • themeNames

      public static String[] themeNames()
      Returns the names of all available themess
      Returns:
      names of all available themes
    • addThemeFromFile

      public void addThemeFromFile(String filePath)
      Adds a theme to the collection from the filePath
      Parameters:
      filePath - must be chart format
    • addThemeFromFile

      public void addThemeFromFile(File file)
      Adds a theme to the collection from the file
      Parameters:
      file - must be chart format
    • size

      public int size()
      Specified by:
      size in interface Map<String,Theme>
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Map<String,Theme>
    • containsKey

      public boolean containsKey(Object key)
      Specified by:
      containsKey in interface Map<String,Theme>
    • containsValue

      public boolean containsValue(Object value)
      Specified by:
      containsValue in interface Map<String,Theme>
    • get

      public Theme get(Object key)
      Specified by:
      get in interface Map<String,Theme>
    • put

      public Theme put(String key, Theme value)
      Specified by:
      put in interface Map<String,Theme>
    • remove

      public Theme remove(Object key)
      Specified by:
      remove in interface Map<String,Theme>
    • putAll

      public void putAll(@NotNull Map<? extends String,? extends Theme> m)
      Specified by:
      putAll in interface Map<String,Theme>
    • clear

      public void clear()
      Specified by:
      clear in interface Map<String,Theme>
    • keySet

      @NotNull public Set<String> keySet()
      Specified by:
      keySet in interface Map<String,Theme>
    • values

      @NotNull public Collection<Theme> values()
      Specified by:
      values in interface Map<String,Theme>
    • entrySet

      @NotNull public Set<Map.Entry<String,Theme>> entrySet()
      Specified by:
      entrySet in interface Map<String,Theme>