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:
-
Field Summary
Fields inherited from class org.primefaces.shaded.json.JSONObject
NULL
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMap between the color ID and the CSS color to use.addEncodedTokensColor
(String... items) addRule
(EditorTokenThemeRule... items) getBase()
org.primefaces.shaded.json.JSONObject
org.primefaces.shaded.json.JSONArray
org.primefaces.shaded.json.JSONArray
getRules()
setColors
(org.primefaces.shaded.json.JSONObject colors) setEncodedTokensColors
(List<String> encodedTokensColors) setEncodedTokensColors
(org.primefaces.shaded.json.JSONArray encodedTokensColors) setInherit
(Boolean inherit) setRules
(List<EditorTokenThemeRule> rules) setRules
(org.primefaces.shaded.json.JSONArray rules) 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
-
EditorStandaloneTheme
public EditorStandaloneTheme()
-
-
Method Details
-
getBase
- Returns:
- Base theme from which to extend when is set to
true
. This is required, when not set it defaults tovs
.
-
setBase
- Parameters:
base
- Base theme from which to extend when is set totrue
. This is required, when not set it defaults tovs
.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
setBase
- Parameters:
base
- Base theme from which to extend when is set totrue
. This is required, when not set it defaults tovs
.- 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
- 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
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
- 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
- Returns:
- Optional list of encoded token colors.
-
setEncodedTokensColors
- Parameters:
encodedTokensColors
- Optional list of encoded token colors.- Returns:
- This same instance, useful for chaining multiple setter methods in one call.
-
isInherit
- Returns:
- Whether this theme should inherit from the given base theme. This is required, when not set it defaults
to
false
.
-
setInherit
- Parameters:
inherit
- Whether this theme should inherit from the given base theme. This is required, when not set it defaults tofalse
.- 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
- 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
- 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.
-