Class EditorTokenThemeRule

  • All Implemented Interfaces:
    java.io.Serializable

    public class EditorTokenThemeRule
    extends org.primefaces.shaded.json.JSONObject
    implements java.io.Serializable
    Defines how to style a certain token in the Monaco code editor.
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class org.primefaces.shaded.json.JSONObject

        NULL
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getBackground()  
      java.lang.String getFontStyle()  
      java.lang.String getForeground()  
      java.lang.String getToken()  
      EditorTokenThemeRule setBackground​(java.lang.String background)  
      EditorTokenThemeRule setFontStyle​(java.lang.String fontStyle)  
      EditorTokenThemeRule setForeground​(java.lang.String foreground)  
      EditorTokenThemeRule setToken​(java.lang.String token)  
      • Methods inherited from class org.primefaces.shaded.json.JSONObject

        accumulate, append, clear, doubleToString, entrySet, get, getBigDecimal, getBigInteger, getBoolean, getDouble, getEnum, getFloat, getInt, getJSONArray, getJSONObject, getLong, getMapType, getNames, getNames, getNumber, getString, has, increment, isDecimalNotation, isEmpty, isNull, keys, keySet, length, names, numberToString, opt, optBigDecimal, optBigInteger, optBoolean, optBoolean, optDouble, optDouble, optEnum, optEnum, optFloat, optFloat, optInt, optInt, optJSONArray, optJSONObject, optJSONObject, optLong, optLong, optNumber, optNumber, optQuery, optQuery, optString, optString, put, put, put, put, put, put, put, put, putOnce, putOpt, query, query, quote, quote, remove, similar, stringToNumber, stringToValue, testValidity, toJSONArray, toMap, toString, toString, valueToString, wrap, write, write
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • EditorTokenThemeRule

        public EditorTokenThemeRule()
    • Method Detail

      • getBackground

        public java.lang.String getBackground()
        Returns:
        CSS color for the background that is applied to these tokens.
      • setBackground

        public EditorTokenThemeRule setBackground​(java.lang.String background)
        Parameters:
        background - CSS color for the background that is applied to these tokens.
        Returns:
        This same instance, useful for chaining multiple setter methods in one call.
      • getFontStyle

        public java.lang.String getFontStyle()
        Returns:
        Value for the CSS font-style property that is applied to these tokens.
      • setFontStyle

        public EditorTokenThemeRule setFontStyle​(java.lang.String fontStyle)
        Parameters:
        fontStyle - Value for the CSS font-style property that is applied to these tokens.
        Returns:
        This same instance, useful for chaining multiple setter methods in one call.
      • getForeground

        public java.lang.String getForeground()
        Returns:
        CSS color for the text color that is applied to these tokens.
      • setForeground

        public EditorTokenThemeRule setForeground​(java.lang.String foreground)
        Parameters:
        foreground - CSS color for the text color that is applied to these tokens.
        Returns:
        This same instance, useful for chaining multiple setter methods in one call.
      • getToken

        public java.lang.String getToken()
        Returns:
        Type of token to which to apply these rules. Can be suffixed with the language ID to which they should apply. E.g. comment would apply to comment tokens of all languages, comment.js would only apply to JavaScript comment tokens. You can inspect the tokens in the Monaco editor. Right click on the editor and choose Command Palette. Then search for Developer: Inspect Tokens.
      • setToken

        public EditorTokenThemeRule setToken​(java.lang.String token)
        Parameters:
        token - Type of token to which to apply these rules. Can be suffixed with the language ID to which they should apply. E.g. comment would apply to comment tokens of all languages, comment.js would only apply to JavaScript comment tokens. You can inspect the tokens in the Monaco editor. Right click on the editor and choose Command Palette. Then search for Developer: Inspect Tokens.
        Returns:
        This same instance, useful for chaining multiple setter methods in one call.