Class EditorStandaloneTheme
- java.lang.Object
-
- org.primefaces.shaded.json.JSONObject
-
- org.primefaces.extensions.model.monacoeditor.EditorStandaloneTheme
-
- All Implemented Interfaces:
java.io.Serializable
public class EditorStandaloneTheme extends org.primefaces.shaded.json.JSONObject implements java.io.SerializableData that defines a custom theme for the Monaco code editor- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EditorStandaloneTheme()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EditorStandaloneThemeaddColor(java.lang.String key, java.lang.String value)Map between the color ID and the CSS color to use.EditorStandaloneThemeaddEncodedTokensColor(java.lang.String... items)EditorStandaloneThemeaddRule(EditorTokenThemeRule... items)java.lang.StringgetBase()org.primefaces.shaded.json.JSONObjectgetColors()org.primefaces.shaded.json.JSONArraygetEncodedTokensColors()org.primefaces.shaded.json.JSONArraygetRules()java.lang.BooleanisInherit()EditorStandaloneThemesetBase(java.lang.String base)EditorStandaloneThemesetBase(ETheme base)EditorStandaloneThemesetColors(java.util.Map<java.lang.String,java.lang.String> colors)EditorStandaloneThemesetColors(org.primefaces.shaded.json.JSONObject colors)EditorStandaloneThemesetEncodedTokensColors(java.util.List<java.lang.String> encodedTokensColors)EditorStandaloneThemesetEncodedTokensColors(org.primefaces.shaded.json.JSONArray encodedTokensColors)EditorStandaloneThemesetInherit(java.lang.Boolean inherit)EditorStandaloneThemesetRules(java.util.List<EditorTokenThemeRule> rules)EditorStandaloneThemesetRules(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, 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
-
-
-
-
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 tovs.
-
setBase
public EditorStandaloneTheme setBase(ETheme base)
- 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
public EditorStandaloneTheme setBase(java.lang.String base)
- 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
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 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
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.
-
-