Module technology.sola.engine
Class StylesJsonBlueprintUtils
java.lang.Object
technology.sola.engine.graphics.gui.json.styles.StylesJsonBlueprintUtils
A collection of common
JsonElement
parsing methods for use by StylesJsonValueParser
s.-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable Color
parseColor
(technology.sola.json.JsonElement value) Parses aColor
from aJsonElement
.static @Nullable Integer
parseInteger
(technology.sola.json.JsonElement value) Parses an Integer or null value from aJsonElement
.static @Nullable String
parseString
(technology.sola.json.JsonElement value) Parses a String or null value from aJsonElement
.static @Nullable String
parseStyleValueAsString
(technology.sola.json.JsonElement value) Parses a validStyleValue
value as a string or null from aJsonElement
.
-
Method Details
-
parseString
Parses a String or null value from aJsonElement
.- Parameters:
value
- theJsonElement
to parse- Returns:
- the parsed String or null
-
parseInteger
Parses an Integer or null value from aJsonElement
.- Parameters:
value
- theJsonElement
to parse- Returns:
- the parsed Integer or null
-
parseStyleValueAsString
Parses a validStyleValue
value as a string or null from aJsonElement
.- Parameters:
value
- theJsonElement
to parse- Returns:
- a valid
StyleValue
as a string or null
-
parseColor
Parses aColor
from aJsonElement
.Valid formats:
rgb(int, int, int)
argb(int, int, int, int)
#rrggbb
#aarrggbb
- Parameters:
value
- theJsonElement
to parse- Returns:
- the parsed Color or null
-