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,VisibleProperty
- Direct Known Subclasses:
Axis.Label,Chart.Label
- Author:
- Syam
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanCheck whether to "escape" the formatted JSON value or not.The format parser that converts the formatter string to the real JSON value.protected StringThe formatter string. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidEncode the JSON string with the properties of this.final StringGet the label formatter currently set.final intGet the rotation of the label.final booleanisInside()Check if the label is drawn inside or outside the part.abstract voidsetFormatter(String formatter) Set the label formatter.voidsetInside(boolean inside) Setting for drawing the label inside the part.voidsetRotation(int rotation) Set the rotation of the label.Methods inherited from class com.storedobject.chart.AbstractLabel
getGap, getGapName, isVisible, setGap, setVisibleMethods inherited from class com.storedobject.chart.TextStyle
getAlignment, getBackground, getBorder, getColor, getFontStyle, getPadding, getRichTextStyle, getTextBorder, setAlignment, setBackground, setBorder, setColor, setFontStyle, setPadding, setRichTextStyle, setTextBorderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.storedobject.chart.VisibleProperty
hide, show
-
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:ComponentPropertyEncode the JSON string with the properties of this.- Specified by:
encodeJSONin interfaceComponentProperty- Overrides:
encodeJSONin classAbstractLabel- Parameters:
sb- Encoded JSON string to be appended to this.
-
getFormatter
-
setFormatter
Set the label formatter.- Parameters:
formatter- Label formatter to be set.
-