Package com.storedobject.chart
Class AbstractLabel
java.lang.Object
com.storedobject.chart.TextStyle
com.storedobject.chart.AbstractLabel
- All Implemented Interfaces:
ComponentProperty
,VisibleProperty
- Direct Known Subclasses:
Axis.PointerLabel
,Label
,TextLabel
- Author:
- Syam
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Encode the JSON string with the properties of this.int
getGap()
Set the gap between the part and labels.protected String
Name of the gap to be used when rendering (It is different when different parts are used).boolean
Checks if this property is currently visible.void
setGap
(int gap) Set the gap between the part and labels.void
setVisible
(boolean visible) Sets the visibility of this property.Methods inherited from class com.storedobject.chart.TextStyle
getAlignment, getBackground, getBorder, getColor, getFontStyle, getPadding, getRichTextStyle, getTextBorder, setAlignment, setBackground, setBorder, setColor, setFontStyle, setPadding, setRichTextStyle, setTextBorder
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.storedobject.chart.VisibleProperty
hide, show
-
Constructor Details
-
AbstractLabel
public AbstractLabel()
-
-
Method Details
-
setVisible
public void setVisible(boolean visible) Description copied from interface:VisibleProperty
Sets the visibility of this property.- Specified by:
setVisible
in interfaceVisibleProperty
- Parameters:
visible
- A boolean indicating whether this property should be visible (true) or hidden (false).
-
isVisible
public boolean isVisible()Description copied from interface:VisibleProperty
Checks if this property is currently visible.- Specified by:
isVisible
in interfaceVisibleProperty
- Returns:
- true if the property is visible, false otherwise.
-
encodeJSON
Description copied from interface:ComponentProperty
Encode the JSON string with the properties of this.- Specified by:
encodeJSON
in interfaceComponentProperty
- Overrides:
encodeJSON
in classTextStyle
- Parameters:
sb
- Encoded JSON string to be appended to this.
-
getGapName
Name of the gap to be used when rendering (It is different when different parts are used).- Returns:
- Name of the gap.
-
getGap
public int getGap()Set the gap between the part and labels.- Returns:
- Gap in pixels.
-
setGap
public void setGap(int gap) Set the gap between the part and labels.- Parameters:
gap
- Gap in pixels.
-