Class EditorStandaloneTheme

  • All Implemented Interfaces:
    java.io.Serializable

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

      • EditorStandaloneTheme

        public EditorStandaloneTheme()
    • Method Detail

      • getBase

        public java.lang.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​(java.lang.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​(java.lang.String key,
                                              java.lang.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​(java.util.Map<java.lang.String,​java.lang.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​(java.lang.String... items)
        Returns:
        Optional list of encoded token colors.
      • setEncodedTokensColors

        public EditorStandaloneTheme setEncodedTokensColors​(java.util.List<java.lang.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 java.lang.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​(java.lang.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

        public EditorStandaloneTheme setRules​(java.util.List<EditorTokenThemeRule> 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.