Package com.storedobject.chart
Class Label
java.lang.Object
com.storedobject.chart.TextStyle
com.storedobject.chart.AbstractLabel
com.storedobject.chart.Label
- All Implemented Interfaces:
ComponentProperty
- Direct Known Subclasses:
Axis.Label
,Chart.Label
- Author:
- Syam
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
Check whether to "escape" the formatted JSON value or not.The format parser that converts the formatter string to the real JSON value.protected String
The formatter string. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Encode the JSON string with the properties of this.final String
Get the label formatter currently set.final int
Get the rotation of the label.final boolean
isInside()
Check if the label is drawn inside or outside the part.abstract void
setFormatter
(String formatter) Set the label formatter.void
setInside
(boolean inside) Setting for drawing the label inside the part.void
setRotation
(int rotation) Set the rotation of the label.Methods inherited from class com.storedobject.chart.AbstractLabel
getGap, getGapName, hide, setGap, show
Methods inherited from class com.storedobject.chart.TextStyle
getAlignment, getBackground, getBorder, getColor, getFontStyle, getPadding, getRichTextStyle, getTextBorder, setAlignment, setBackground, setBorder, setColor, setFontStyle, setPadding, setRichTextStyle, setTextBorder
-
Field Details
-
formatter
The formatter string. -
formatParser
-
doNotEscapeFormat
protected boolean doNotEscapeFormatCheck whether to "escape" the formatted JSON value or not.
-
-
Constructor Details
-
Label
public Label()Constructor.
-
-
Method Details
-
getRotation
public final int getRotation()Get the rotation of the label.- Returns:
- Rotation in degrees.
-
setRotation
public void setRotation(int rotation) Set the rotation of the label.- Parameters:
rotation
- Rotation in degrees. (Must be between -90 and 90).
-
isInside
public final boolean isInside()Check if the label is drawn inside or outside the part.- Returns:
- True if inside.
-
setInside
public void setInside(boolean inside) Setting for drawing the label inside the part.- Parameters:
inside
- True if inside.
-
encodeJSON
Description copied from interface:ComponentProperty
Encode the JSON string with the properties of this.- Specified by:
encodeJSON
in interfaceComponentProperty
- Overrides:
encodeJSON
in classAbstractLabel
- Parameters:
sb
- Encoded JSON string to be appended to this.
-
getFormatter
-
setFormatter
Set the label formatter.- Parameters:
formatter
- Label formatter to be set.
-