Interface StyleSource

All Known Implementing Classes:
MemoryStyleSource, NopStyleSource

public interface StyleSource
Interface for sources of style configuration.

A StyleSource provides access to style definitions organized by groups and names. It allows retrieving, setting, and removing style definitions, as well as listing available style groups and styles.

Style definitions are stored as strings in the format understood by StyleResolver, such as "bold,fg:red" or "underline,fg:blue".

Implementations of this interface include:

Example usage:

 StyleSource source = new MemoryStyleSource();
 source.set("mygroup", "error", "bold,fg:red");
 source.set("mygroup", "warning", "bold,fg:yellow");

 String errorStyle = source.get("mygroup", "error"); // Returns "bold,fg:red"
 
Since:
3.4
See Also: