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 -
Method Summary
Modifier and TypeMethodDescriptiongetToken()
setBackground
(String background) setFontStyle
(String fontStyle) setForeground
(String foreground) 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
-
Constructor Details
-
EditorTokenThemeRule
public EditorTokenThemeRule()
-
-
Method Details
-
getBackground
- Returns:
- CSS color for the background that is applied to these tokens.
-
setBackground
- 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
- Returns:
- Value for the CSS font-style property that is applied to these tokens.
-
setFontStyle
- 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
- Returns:
- CSS color for the text color that is applied to these tokens.
-
setForeground
- 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
- 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 chooseCommand Palette
. Then search forDeveloper: Inspect Tokens
.
-
setToken
- 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 chooseCommand Palette
. Then search forDeveloper: Inspect Tokens
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-