Class EditorStandaloneTheme

java.lang.Object
org.primefaces.shaded.json.JSONObject
org.primefaces.extensions.model.monacoeditor.EditorStandaloneTheme
All Implemented Interfaces:
Serializable

public class EditorStandaloneTheme extends org.primefaces.shaded.json.JSONObject implements Serializable
Data that defines a custom theme for the Monaco code editor
See Also:
  • Constructor Details

    • EditorStandaloneTheme

      public EditorStandaloneTheme()
  • Method Details

    • getBase

      public String getBase()
      Returns:
      Base theme from which to extend when is set to true. This is required, when not set it defaults to vs.
    • setBase

      public EditorStandaloneTheme setBase(ETheme base)
      Parameters:
      base - Base theme from which to extend when is set to true. This is required, when not set it defaults to vs.
      Returns:
      This same instance, useful for chaining multiple setter methods in one call.
    • setBase

      public EditorStandaloneTheme setBase(String base)
      Parameters:
      base - Base theme from which to extend when is set to true. This is required, when not set it defaults to vs.
      Returns:
      This same instance, useful for chaining multiple setter methods in one call.
    • getColors

      public org.primefaces.shaded.json.JSONObject getColors()
      Returns:
      Map between the color ID and the CSS color to use. This is required, when not set, it defaults to an empty map.
    • setColors

      public EditorStandaloneTheme setColors(org.primefaces.shaded.json.JSONObject colors)
      Parameters:
      colors - Map between the color ID and the CSS color to use. This is required, when not set, it defaults to an empty map.
      Returns:
      This same instance, useful for chaining multiple setter methods in one call.
    • addColor

      public EditorStandaloneTheme addColor(String key, String value)
      Map between the color ID and the CSS color to use. This is required, when not set, it defaults to an empty map.
      Parameters:
      key - The key of the map entry to add.
      value - The value to associate with the key.
      Returns:
      This same instance, useful for chaining multiple setter methods in one call.
    • setColors

      public EditorStandaloneTheme setColors(Map<String,String> colors)
      Parameters:
      colors - Map between the color ID and the CSS color to use. This is required, when not set, it defaults to an empty map.
      Returns:
      This same instance, useful for chaining multiple setter methods in one call.
    • getEncodedTokensColors

      public org.primefaces.shaded.json.JSONArray getEncodedTokensColors()
      Returns:
      Optional list of encoded token colors.
    • setEncodedTokensColors

      public EditorStandaloneTheme setEncodedTokensColors(org.primefaces.shaded.json.JSONArray encodedTokensColors)
      Parameters:
      encodedTokensColors - Optional list of encoded token colors.
      Returns:
      This same instance, useful for chaining multiple setter methods in one call.
    • addEncodedTokensColor

      public EditorStandaloneTheme addEncodedTokensColor(String... items)
      Returns:
      Optional list of encoded token colors.
    • setEncodedTokensColors

      public EditorStandaloneTheme setEncodedTokensColors(List<String> encodedTokensColors)
      Parameters:
      encodedTokensColors - Optional list of encoded token colors.
      Returns:
      This same instance, useful for chaining multiple setter methods in one call.
    • isInherit

      public Boolean isInherit()
      Returns:
      Whether this theme should inherit from the given base theme. This is required, when not set it defaults to false.
    • setInherit

      public EditorStandaloneTheme setInherit(Boolean inherit)
      Parameters:
      inherit - Whether this theme should inherit from the given base theme. This is required, when not set it defaults to false.
      Returns:
      This same instance, useful for chaining multiple setter methods in one call.
    • getRules

      public org.primefaces.shaded.json.JSONArray getRules()
      Returns:
      Styling options for individual token types, such as how to style variables, certain keywords, and parentheses. This is required, when not set it defaults to an empty array.
    • setRules

      public EditorStandaloneTheme setRules(org.primefaces.shaded.json.JSONArray rules)
      Parameters:
      rules - Styling options for individual token types, such as how to style variables, certain keywords, and parentheses. This is required, when not set it defaults to an empty array.
      Returns:
      This same instance, useful for chaining multiple setter methods in one call.
    • addRule

      public EditorStandaloneTheme addRule(EditorTokenThemeRule... items)
      Returns:
      Styling options for individual token types, such as how to style variables, certain keywords, and parentheses. This is required, when not set it defaults to an empty array.
    • setRules

      Parameters:
      rules - Styling options for individual token types, such as how to style variables, certain keywords, and parentheses. This is required, when not set it defaults to an empty array.
      Returns:
      This same instance, useful for chaining multiple setter methods in one call.