Package com.oorian.echarts.options
Class EChartsTextStyle
java.lang.Object
com.oorian.echarts.options.EChartsTextStyle
- All Implemented Interfaces:
com.oorian.json.Jsonable
Represents the text style configuration for ECharts chart elements. This includes properties for
font color, style, weight, size, and family.
- Author:
- Oorian
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new EChartsTextStyle instance with default settings. -
Method Summary
Modifier and TypeMethodDescriptiongetColor()Returns the text color.Returns the font family.Returns the font size in pixels.Returns the font style.Returns the font weight.voidinitFromJson(com.oorian.json.JsonValue json) Initializes this EChartsTextStyle from a JSON value.voidSets the text color.voidsetFontFamily(String fontFamily) Sets the font family.voidsetFontSize(Integer fontSize) Sets the font size in pixels.voidsetFontStyle(String fontStyle) Sets the font style.voidsetFontWeight(String fontWeight) Sets the font weight.Converts this EChartsTextStyle to a JSON string.com.oorian.json.JsonValueConverts this EChartsTextStyle to a JSON value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.oorian.json.Jsonable
initFromJson, initFromJson
-
Constructor Details
-
EChartsTextStyle
public EChartsTextStyle()Creates a new EChartsTextStyle instance with default settings.
-
-
Method Details
-
setColor
Sets the text color.- Parameters:
color- The color value (e.g., "#333", "rgba(0,0,0,0.8)").
-
setFontStyle
Sets the font style.- Parameters:
fontStyle- The font style (e.g., "normal", "italic", "oblique").
-
setFontWeight
Sets the font weight.- Parameters:
fontWeight- The font weight (e.g., "normal", "bold", "bolder", "lighter").
-
setFontSize
Sets the font size in pixels.- Parameters:
fontSize- The font size.
-
setFontFamily
Sets the font family.- Parameters:
fontFamily- The font family (e.g., "sans-serif", "Arial").
-
getColor
Returns the text color.- Returns:
- The color value.
-
getFontStyle
Returns the font style.- Returns:
- The font style.
-
getFontWeight
Returns the font weight.- Returns:
- The font weight.
-
getFontSize
Returns the font size in pixels.- Returns:
- The font size.
-
getFontFamily
Returns the font family.- Returns:
- The font family.
-
initFromJson
public void initFromJson(com.oorian.json.JsonValue json) Initializes this EChartsTextStyle from a JSON value.- Specified by:
initFromJsonin interfacecom.oorian.json.Jsonable- Parameters:
json- The JSON value to initialize from.
-
toJsonValue
public com.oorian.json.JsonValue toJsonValue()Converts this EChartsTextStyle to a JSON value.- Specified by:
toJsonValuein interfacecom.oorian.json.Jsonable- Returns:
- The JSON representation of this EChartsTextStyle.
-
toJsonString
Converts this EChartsTextStyle to a JSON string.- Specified by:
toJsonStringin interfacecom.oorian.json.Jsonable- Returns:
- The JSON string representation of this EChartsTextStyle.
-