-
public class LegendItem extends Text
Inner class for representing legend item.
-
-
Constructor Summary
Constructors Constructor Description LegendItem(String jsChart)
-
Method Summary
Modifier and Type Method Description static LegendIteminstantiate()StringgetJsBase()voiddisablePointerEvents()Getter for the pointer events. LegendItemdisablePointerEvents(Boolean enabled)Setter for the pointer events. LegendItemdraw()Draws legend item. voidenabled()Getter for the element state (enabled or disabled). LegendItemenabled(Boolean enabled)Setter for the element enabled state. voidfontColor()Getter for the text font color. LegendItemfontColor(String color)Setter for the text font color. voidfontDecoration()Getter for the text font decoration. LegendItemfontDecoration(Decoration value)Setter for the text font decoration. LegendItemfontDecoration(String value)Setter for the text font decoration. voidfontFamily()Getter for the font family. LegendItemfontFamily(String family)Setter for the font family. voidfontOpacity()Getter for the text font opacity. LegendItemfontOpacity(Number opacity)Setter for the text font opacity. voidfontSize()Getter for the text font size. LegendItemfontSize(String size)Setter for the text font size. LegendItemfontSize(Number size)Setter for the text font size. voidfontStyle()Getter for the text font style. LegendItemfontStyle(FontStyle style)Setter for the text font style. LegendItemfontStyle(String style)Setter for the text font style. voidfontVariant()Getter for the text font variant. LegendItemfontVariant(FontVariant value)Setter for the text font variant. LegendItemfontVariant(String value)Setter for the text font variant. voidfontWeight()Getter for the text font weight. LegendItemfontWeight(String weight)Setter for the text font weight. LegendItemfontWeight(Number weight)Setter for the text font weight. RectgetContentBounds()Return legend item content bounds. voidgetHeight()Calculating actual height of legend item independently of enabled state. TextgetTextElement()Legend item text element. voidgetWidth()Calculating actual width of legend item independently of enabled state. voidhAlign()Getter for the text horizontal align. LegendItemhAlign(HAlign align)Setter for the text horizontal align. LegendItemhAlign(String align)Setter for the text horizontal align. voidiconFill(Fill value)Getter/setter for icon fill setting. PatternFilliconHatchFill()Getter for icon hatch fill settings. LegendItemiconHatchFill(PatternFill patternFillOrType, String color, Number thickness, Number size)Setter for icon hatch fill settings. LegendItemiconHatchFill(HatchFill patternFillOrType, String color, Number thickness, Number size)Setter for icon hatch fill settings. LegendItemiconHatchFill(String patternFillOrType, String color, Number thickness, Number size)Setter for icon hatch fill settings. LegendItemiconHatchFill(HatchFillType patternFillOrType, String color, Number thickness, Number size)Setter for icon hatch fill settings. voidiconStroke(Stroke value)Getter/setter for icon stroke setting. LegendItemiconTextSpacing(Number value)Getter/setter for iconTextSpacing setting. voidiconType(String value)Getter/setter for icon type. voidletterSpacing()Getter for the text letter spacing. LegendItemletterSpacing(String spacing)Setter for the text letter spacing. LegendItemletterSpacing(Number spacing)Setter for the text letter spacing. voidlineHeight()Getter for the text line height. LegendItemlineHeight(String height)Setter for the text line height. LegendItemlineHeight(Number height)Setter for the text line height. voidmaxHeight()Getter for the maximal height of a legend item. LegendItemmaxHeight(Number value)Setter for the maximal height of a legend item. LegendItemmaxHeight(String value)Setter for the maximal height of a legend item. voidmaxWidth()Getter for the maximal width of a legend item. LegendItemmaxWidth(Number value)Setter for the maximal width of a legend item. LegendItemmaxWidth(String value)Setter for the maximal width of a legend item. voidprint(PaperSize paperSizeOrOptions, Boolean landscape)Prints all elements on related stage. voidprint(String paperSizeOrOptions, Boolean landscape)Prints all elements on related stage. voidremoveAllListeners(String type)Removes all listeners from an object. voidselectable()Getter for the text selectable option. LegendItemselectable(Boolean enabled)Setter for the text selectable. voidtext(String value)Getter/setter for legend item text. voidtextDirection()Getter for the text direction. LegendItemtextDirection(Direction direction)Setter for the text direction. LegendItemtextDirection(String direction)Setter for the text direction. voidtextIndent()Getter for the text indent. LegendItemtextIndent(Number indent)Setter for the text indent. voidtextOverflow()Getter for the text overflow settings. LegendItemtextOverflow(TextOverflow value)Setter for the text overflow settings. LegendItemtextOverflow(String value)Setter for the text overflow settings. voidtextSettings()Getter for the full text appearance settings. voidtextSettings(String name)Getter for all text appearance settings. LegendItemtextSettings(String name, String settings)Setter for the text appearance settings. LegendItemtextSettings(String name, Number settings)Setter for the text appearance settings. LegendItemtextSettings(String name, Boolean settings)Setter for the text appearance settings. voidsetOnClickListener(ListenersInterface.OnClickListener listener)voidsetOnClickListener(ListenersInterface.OnClickListener listener, String type, String ePath)voidunlistenByKey(String key)Removes an event listener which was added with listen() by the key returned by listen() or listenOnce(). voiduseHtml()Getter for the useHTML flag. LegendItemuseHtml(Boolean enabled)Setter for flag useHTML. voidvAlign()Getter for the text vertical align. LegendItemvAlign(VAlign align)Setter for the text vertical align. LegendItemvAlign(String align)Setter for the text vertical align. voidwordBreak()Getter for the word-break mode. LegendItemwordBreak(WordBreak mode)Setter for the word-break mode. LegendItemwordBreak(String mode)Setter for the word-break mode. voidwordWrap()Getter for the word-wrap mode. LegendItemwordWrap(WordWrap mode)Setter for the word-wrap mode. LegendItemwordWrap(String mode)Setter for the word-wrap mode. voidx(Number value)Getter/setter for X coordinate of legend item. voidx(String value)Getter/setter for X coordinate of legend item. voidy(Number value)Getter/setter for Y coordinate of legend item. voidy(String value)Getter/setter for Y coordinate of legend item. voidzIndex()Getter for the Z-index of the element. LegendItemzIndex(Number zIndex)Setter for the Z-index of the element. Layercontainer()Getter for the container. LegendItemcontainer(Layer element)Setter for the container. LegendItemcontainer(Stage element)Setter for the container. LegendItemcontainer(String element)Setter for the container. RectparentBounds()Getter for the parent bounds. LegendItemparentBounds(Rect bounds)Setter for the parent bounds using single value. LegendItemparentBounds(String bounds)Setter for the parent bounds using single value. LegendItemparentBounds(Number bounds)Setter for the parent bounds using single value. LegendItemparentBounds(Number left, Number top, Number width, Number height)Setter for the parent bounds using several values. -
Methods inherited from class com.anychart.core.Text
container, container, container, disablePointerEvents, enabled, fontColor, fontDecoration, fontDecoration, fontFamily, fontOpacity, fontSize, fontSize, fontStyle, fontStyle, fontVariant, fontVariant, fontWeight, fontWeight, hAlign, hAlign, instantiate, letterSpacing, letterSpacing, lineHeight, lineHeight, parentBounds, parentBounds, parentBounds, parentBounds, selectable, textDirection, textDirection, textIndent, textOverflow, textOverflow, textSettings, textSettings, textSettings, useHtml, vAlign, vAlign, wordBreak, wordBreak, wordWrap, wordWrap, zIndex -
Methods inherited from class com.anychart.core.VisualBase
container, container, container, enabled, instantiate, parentBounds, parentBounds, parentBounds, parentBounds, zIndex -
Methods inherited from class com.anychart.core.Base
instantiate -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
LegendItem
LegendItem(String jsChart)
-
-
Method Detail
-
instantiate
static LegendItem instantiate()
-
disablePointerEvents
void disablePointerEvents()
Getter for the pointer events.
-
disablePointerEvents
LegendItem disablePointerEvents(Boolean enabled)
Setter for the pointer events.
-
draw
LegendItem draw()
Draws legend item.
-
enabled
void enabled()
Getter for the element state (enabled or disabled).
-
enabled
LegendItem enabled(Boolean enabled)
Setter for the element enabled state.
-
fontColor
void fontColor()
Getter for the text font color.
-
fontColor
LegendItem fontColor(String color)
Setter for the text font color.://www.w3schools.com/html/html_colors.asp
-
fontDecoration
void fontDecoration()
Getter for the text font decoration.
-
fontDecoration
LegendItem fontDecoration(Decoration value)
Setter for the text font decoration.
-
fontDecoration
LegendItem fontDecoration(String value)
Setter for the text font decoration.
-
fontFamily
void fontFamily()
Getter for the font family.
-
fontFamily
LegendItem fontFamily(String family)
Setter for the font family.
-
fontOpacity
void fontOpacity()
Getter for the text font opacity.
-
fontOpacity
LegendItem fontOpacity(Number opacity)
Setter for the text font opacity. Double value from 0 to 1.
-
fontSize
void fontSize()
Getter for the text font size.
-
fontSize
LegendItem fontSize(String size)
Setter for the text font size.
-
fontSize
LegendItem fontSize(Number size)
Setter for the text font size.
-
fontStyle
void fontStyle()
Getter for the text font style.
-
fontStyle
LegendItem fontStyle(FontStyle style)
Setter for the text font style.
-
fontStyle
LegendItem fontStyle(String style)
Setter for the text font style.
-
fontVariant
void fontVariant()
Getter for the text font variant.
-
fontVariant
LegendItem fontVariant(FontVariant value)
Setter for the text font variant.
-
fontVariant
LegendItem fontVariant(String value)
Setter for the text font variant.
-
fontWeight
void fontWeight()
Getter for the text font weight.
-
fontWeight
LegendItem fontWeight(String weight)
Setter for the text font weight.://www.w3schools.com/cssref/pr_font_weight.asp
-
fontWeight
LegendItem fontWeight(Number weight)
Setter for the text font weight.://www.w3schools.com/cssref/pr_font_weight.asp
-
getContentBounds
Rect getContentBounds()
Return legend item content bounds.
-
getHeight
void getHeight()
Calculating actual height of legend item independently of enabled state.
-
getTextElement
Text getTextElement()
Legend item text element.
-
getWidth
void getWidth()
Calculating actual width of legend item independently of enabled state.
-
hAlign
void hAlign()
Getter for the text horizontal align.
-
hAlign
LegendItem hAlign(HAlign align)
Setter for the text horizontal align.
-
hAlign
LegendItem hAlign(String align)
Setter for the text horizontal align.
-
iconHatchFill
PatternFill iconHatchFill()
Getter for icon hatch fill settings.
-
iconHatchFill
LegendItem iconHatchFill(PatternFill patternFillOrType, String color, Number thickness, Number size)
Setter for icon hatch fill settings.
-
iconHatchFill
LegendItem iconHatchFill(HatchFill patternFillOrType, String color, Number thickness, Number size)
Setter for icon hatch fill settings.
-
iconHatchFill
LegendItem iconHatchFill(String patternFillOrType, String color, Number thickness, Number size)
Setter for icon hatch fill settings.
-
iconHatchFill
LegendItem iconHatchFill(HatchFillType patternFillOrType, String color, Number thickness, Number size)
Setter for icon hatch fill settings.
-
iconStroke
void iconStroke(Stroke value)
Getter/setter for icon stroke setting.
-
iconTextSpacing
LegendItem iconTextSpacing(Number value)
Getter/setter for iconTextSpacing setting.
-
letterSpacing
void letterSpacing()
Getter for the text letter spacing.
-
letterSpacing
LegendItem letterSpacing(String spacing)
Setter for the text letter spacing.://www.w3schools.com/cssref/pr_text_letter-spacing.asp
-
letterSpacing
LegendItem letterSpacing(Number spacing)
Setter for the text letter spacing.://www.w3schools.com/cssref/pr_text_letter-spacing.asp
-
lineHeight
void lineHeight()
Getter for the text line height.
-
lineHeight
LegendItem lineHeight(String height)
Setter for the text line height.://www.w3schools.com/cssref/pr_dim_line-height.asp
-
lineHeight
LegendItem lineHeight(Number height)
Setter for the text line height.://www.w3schools.com/cssref/pr_dim_line-height.asp
-
maxHeight
void maxHeight()
Getter for the maximal height of a legend item.
-
maxHeight
LegendItem maxHeight(Number value)
Setter for the maximal height of a legend item.
-
maxHeight
LegendItem maxHeight(String value)
Setter for the maximal height of a legend item.
-
maxWidth
void maxWidth()
Getter for the maximal width of a legend item.
-
maxWidth
LegendItem maxWidth(Number value)
Setter for the maximal width of a legend item.
-
maxWidth
LegendItem maxWidth(String value)
Setter for the maximal width of a legend item.
-
print
void print(PaperSize paperSizeOrOptions, Boolean landscape)
Prints all elements on related stage.
-
print
void print(String paperSizeOrOptions, Boolean landscape)
Prints all elements on related stage.
-
removeAllListeners
void removeAllListeners(String type)
Removes all listeners from an object. You can also optionally remove listeners of some particular type.
-
selectable
void selectable()
Getter for the text selectable option.
-
selectable
LegendItem selectable(Boolean enabled)
Setter for the text selectable.
-
textDirection
void textDirection()
Getter for the text direction.
-
textDirection
LegendItem textDirection(Direction direction)
Setter for the text direction.
-
textDirection
LegendItem textDirection(String direction)
Setter for the text direction.
-
textIndent
void textIndent()
Getter for the text indent.
-
textIndent
LegendItem textIndent(Number indent)
Setter for the text indent.
-
textOverflow
void textOverflow()
Getter for the text overflow settings.
-
textOverflow
LegendItem textOverflow(TextOverflow value)
Setter for the text overflow settings.
-
textOverflow
LegendItem textOverflow(String value)
Setter for the text overflow settings.
-
textSettings
void textSettings()
Getter for the full text appearance settings.
-
textSettings
void textSettings(String name)
Getter for all text appearance settings.
-
textSettings
LegendItem textSettings(String name, String settings)
Setter for the text appearance settings.
-
textSettings
LegendItem textSettings(String name, Number settings)
Setter for the text appearance settings.
-
textSettings
LegendItem textSettings(String name, Boolean settings)
Setter for the text appearance settings.
-
setOnClickListener
void setOnClickListener(ListenersInterface.OnClickListener listener)
-
setOnClickListener
void setOnClickListener(ListenersInterface.OnClickListener listener, String type, String ePath)
-
unlistenByKey
void unlistenByKey(String key)
Removes an event listener which was added with listen() by the key returned by listen() or listenOnce().
-
useHtml
void useHtml()
Getter for the useHTML flag.
-
useHtml
LegendItem useHtml(Boolean enabled)
Setter for flag useHTML.
-
vAlign
void vAlign()
Getter for the text vertical align.
-
vAlign
LegendItem vAlign(VAlign align)
Setter for the text vertical align.
-
vAlign
LegendItem vAlign(String align)
Setter for the text vertical align.
-
wordBreak
void wordBreak()
Getter for the word-break mode.
-
wordBreak
LegendItem wordBreak(WordBreak mode)
Setter for the word-break mode.
-
wordBreak
LegendItem wordBreak(String mode)
Setter for the word-break mode.
-
wordWrap
void wordWrap()
Getter for the word-wrap mode.
-
wordWrap
LegendItem wordWrap(WordWrap mode)
Setter for the word-wrap mode.
-
wordWrap
LegendItem wordWrap(String mode)
Setter for the word-wrap mode.
-
zIndex
void zIndex()
Getter for the Z-index of the element.
-
zIndex
LegendItem zIndex(Number zIndex)
Setter for the Z-index of the element.
-
container
LegendItem container(Layer element)
Setter for the container.
-
container
LegendItem container(Stage element)
Setter for the container.
-
container
LegendItem container(String element)
Setter for the container.
-
parentBounds
Rect parentBounds()
Getter for the parent bounds. Bounds that would be used in case of percent size calculations. Expects pixel values only.
-
parentBounds
LegendItem parentBounds(Rect bounds)
Setter for the parent bounds using single value. Bounds that would be used in case of percent size calculations. Expects pixel values only.
-
parentBounds
LegendItem parentBounds(String bounds)
Setter for the parent bounds using single value. Bounds that would be used in case of percent size calculations. Expects pixel values only.
-
parentBounds
LegendItem parentBounds(Number bounds)
Setter for the parent bounds using single value. Bounds that would be used in case of percent size calculations. Expects pixel values only.
-
parentBounds
LegendItem parentBounds(Number left, Number top, Number width, Number height)
Setter for the parent bounds using several values. Bounds that would be used in case of percent size calculations. Expects pixel values only.
-
-
-
-