-
public class Text extends VisualBase
This class is responsible of the text formatting, it processes the plain text and the text in HTML format.
-
-
Method Summary
Modifier and Type Method Description static Textinstantiate()StringgetJsBase()voiddisablePointerEvents()Getter for the pointer events. TextdisablePointerEvents(Boolean enabled)Setter for the pointer events. voidenabled()Getter for the element state (enabled or disabled). Textenabled(Boolean enabled)Setter for the element enabled state. voidfontColor()Getter for the text font color. TextfontColor(String color)Setter for the text font color. voidfontDecoration()Getter for the text font decoration. TextfontDecoration(Decoration value)Setter for the text font decoration. TextfontDecoration(String value)Setter for the text font decoration. voidfontFamily()Getter for the font family. TextfontFamily(String family)Setter for the font family. voidfontOpacity()Getter for the text font opacity. TextfontOpacity(Number opacity)Setter for the text font opacity. voidfontSize()Getter for the text font size. TextfontSize(String size)Setter for the text font size. TextfontSize(Number size)Setter for the text font size. voidfontStyle()Getter for the text font style. TextfontStyle(FontStyle style)Setter for the text font style. TextfontStyle(String style)Setter for the text font style. voidfontVariant()Getter for the text font variant. TextfontVariant(FontVariant value)Setter for the text font variant. TextfontVariant(String value)Setter for the text font variant. voidfontWeight()Getter for the text font weight. TextfontWeight(String weight)Setter for the text font weight. TextfontWeight(Number weight)Setter for the text font weight. voidhAlign()Getter for the text horizontal align. TexthAlign(HAlign align)Setter for the text horizontal align. TexthAlign(String align)Setter for the text horizontal align. voidletterSpacing()Getter for the text letter spacing. TextletterSpacing(String spacing)Setter for the text letter spacing. TextletterSpacing(Number spacing)Setter for the text letter spacing. voidlineHeight()Getter for the text line height. TextlineHeight(String height)Setter for the text line height. TextlineHeight(Number height)Setter for the text line height. 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. Textselectable(Boolean enabled)Setter for the text selectable. voidtextDirection()Getter for the text direction. TexttextDirection(Direction direction)Setter for the text direction. TexttextDirection(String direction)Setter for the text direction. voidtextIndent()Getter for the text indent. TexttextIndent(Number indent)Setter for the text indent. voidtextOverflow()Getter for the text overflow settings. TexttextOverflow(TextOverflow value)Setter for the text overflow settings. TexttextOverflow(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. TexttextSettings(String name, String settings)Setter for the text appearance settings. TexttextSettings(String name, Number settings)Setter for the text appearance settings. TexttextSettings(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. TextuseHtml(Boolean enabled)Setter for flag useHTML. voidvAlign()Getter for the text vertical align. TextvAlign(VAlign align)Setter for the text vertical align. TextvAlign(String align)Setter for the text vertical align. voidwordBreak()Getter for the word-break mode. TextwordBreak(WordBreak mode)Setter for the word-break mode. TextwordBreak(String mode)Setter for the word-break mode. voidwordWrap()Getter for the word-wrap mode. TextwordWrap(WordWrap mode)Setter for the word-wrap mode. TextwordWrap(String mode)Setter for the word-wrap mode. voidzIndex()Getter for the Z-index of the element. TextzIndex(Number zIndex)Setter for the Z-index of the element. Layercontainer()Getter for the container. Textcontainer(Layer element)Setter for the container. Textcontainer(Stage element)Setter for the container. Textcontainer(String element)Setter for the container. RectparentBounds()Getter for the parent bounds. TextparentBounds(Rect bounds)Setter for the parent bounds using single value. TextparentBounds(String bounds)Setter for the parent bounds using single value. TextparentBounds(Number bounds)Setter for the parent bounds using single value. TextparentBounds(Number left, Number top, Number width, Number height)Setter for the parent bounds using several values. -
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
-
Text
Text(String jsChart)
-
-
Method Detail
-
instantiate
static Text instantiate()
-
disablePointerEvents
void disablePointerEvents()
Getter for the pointer events.
-
disablePointerEvents
Text disablePointerEvents(Boolean enabled)
Setter for the pointer events.
-
enabled
void enabled()
Getter for the element state (enabled or disabled).
-
fontColor
void fontColor()
Getter for the text font color.
-
fontColor
Text 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
Text fontDecoration(Decoration value)
Setter for the text font decoration.
-
fontDecoration
Text fontDecoration(String value)
Setter for the text font decoration.
-
fontFamily
void fontFamily()
Getter for the font family.
-
fontFamily
Text fontFamily(String family)
Setter for the font family.
-
fontOpacity
void fontOpacity()
Getter for the text font opacity.
-
fontOpacity
Text fontOpacity(Number opacity)
Setter for the text font opacity. Double value from 0 to 1.
-
fontSize
void fontSize()
Getter for the text font size.
-
fontStyle
void fontStyle()
Getter for the text font style.
-
fontVariant
void fontVariant()
Getter for the text font variant.
-
fontVariant
Text fontVariant(FontVariant value)
Setter for the text font variant.
-
fontVariant
Text fontVariant(String value)
Setter for the text font variant.
-
fontWeight
void fontWeight()
Getter for the text font weight.
-
fontWeight
Text fontWeight(String weight)
Setter for the text font weight.://www.w3schools.com/cssref/pr_font_weight.asp
-
fontWeight
Text fontWeight(Number weight)
Setter for the text font weight.://www.w3schools.com/cssref/pr_font_weight.asp
-
hAlign
void hAlign()
Getter for the text horizontal align.
-
letterSpacing
void letterSpacing()
Getter for the text letter spacing.
-
letterSpacing
Text letterSpacing(String spacing)
Setter for the text letter spacing.://www.w3schools.com/cssref/pr_text_letter-spacing.asp
-
letterSpacing
Text 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
Text lineHeight(String height)
Setter for the text line height.://www.w3schools.com/cssref/pr_dim_line-height.asp
-
lineHeight
Text lineHeight(Number height)
Setter for the text line height.://www.w3schools.com/cssref/pr_dim_line-height.asp
-
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
Text selectable(Boolean enabled)
Setter for the text selectable.
-
textDirection
void textDirection()
Getter for the text direction.
-
textDirection
Text textDirection(Direction direction)
Setter for the text direction.
-
textDirection
Text textDirection(String direction)
Setter for the text direction.
-
textIndent
void textIndent()
Getter for the text indent.
-
textIndent
Text textIndent(Number indent)
Setter for the text indent.
-
textOverflow
void textOverflow()
Getter for the text overflow settings.
-
textOverflow
Text textOverflow(TextOverflow value)
Setter for the text overflow settings.
-
textOverflow
Text 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
Text textSettings(String name, String settings)
Setter for the text appearance settings.
-
textSettings
Text textSettings(String name, Number settings)
Setter for the text appearance settings.
-
textSettings
Text 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.
-
vAlign
void vAlign()
Getter for the text vertical align.
-
wordBreak
void wordBreak()
Getter for the word-break mode.
-
wordWrap
void wordWrap()
Getter for the word-wrap mode.
-
zIndex
void zIndex()
Getter for the Z-index of the element.
-
parentBounds
Rect parentBounds()
Getter for the parent bounds. Bounds that would be used in case of percent size calculations. Expects pixel values only.
-
parentBounds
Text 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
Text 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
Text 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.
-
-
-
-