Interface StyleSource

All Known Implementing Classes:
MemoryStyleSource, NopStyleSource

public interface StyleSource
Provides the source of style configuration.
Since:
3.4
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clear all styles.
    get(String group, String name)
    Returns the appropriate style for the given style-group and style-name, or null if missing.
    Returns configured style-group names.
    void
    remove(String group)
    Remove all styles for given style-group.
    void
    remove(String group, String name)
    Remove a specific style from style-group.
    void
    set(String group, String name, String style)
    Set a specific style in a style-group.
    styles(String group)
    Returns configured styles for given style-group.
  • Method Details

    • get

      @Nullable String get(String group, String name)
      Returns the appropriate style for the given style-group and style-name, or null if missing.
      Parameters:
      group - the group
      name - the style name
      Returns:
      the style
    • set

      void set(String group, String name, String style)
      Set a specific style in a style-group.
      Parameters:
      group - the group
      name - the style name
      style - the style to set
    • remove

      void remove(String group)
      Remove all styles for given style-group.
      Parameters:
      group - the group
    • remove

      void remove(String group, String name)
      Remove a specific style from style-group.
      Parameters:
      group - the group
      name - the style name to remove
    • clear

      void clear()
      Clear all styles.
    • groups

      Iterable<String> groups()
      Returns configured style-group names.
      Returns:
      Immutable collection.
    • styles

      Map<String,String> styles(String group)
      Returns configured styles for given style-group.
      Parameters:
      group - the style group
      Returns:
      Immutable map.