Class EditorTokenThemeRule

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

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

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

    NULL
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    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, optBooleanObject, optBooleanObject, optDouble, optDouble, optDoubleObject, optDoubleObject, optEnum, optEnum, optFloat, optFloat, optFloatObject, optFloatObject, optInt, optInt, optIntegerObject, optIntegerObject, optJSONArray, optJSONArray, optJSONObject, optJSONObject, optLong, optLong, optLongObject, optLongObject, 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 Details

    • EditorTokenThemeRule

      public EditorTokenThemeRule()
  • Method Details

    • getBackground

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

      public EditorTokenThemeRule setBackground(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 String getFontStyle()
      Returns:
      Value for the CSS font-style property that is applied to these tokens.
    • setFontStyle

      public EditorTokenThemeRule setFontStyle(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 String getForeground()
      Returns:
      CSS color for the text color that is applied to these tokens.
    • setForeground

      public EditorTokenThemeRule setForeground(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 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(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.