-
-
Method Summary
Modifier and Type Method Description static Textinstantiate()StringgetJsBase()TextappendTransformationMatrix(Number m00, Number m10, Number m01, Number m11, Number m02, Number m12)Combines the current transformation with the given transformation matrix. voidattr(String key)Getter for the attribute. Textattr(String key, String value)Setter for the attribute. Rectclip()Gets the current clipping rectangle. Textclip(Rect value)Sets the clipping rectangle. Textclip(String value)Sets the clipping rectangle. voidcolor()Getter for the text color. Textcolor(String color)Setter for the text color. voidcursor()Getter for the current cursor type. Textcursor(Cursor value)Setter for the cursor type. voiddecoration()Getter for the text decoration. Textdecoration(Decoration value)Setter for text decoration. Textdecoration(String value)Setter for text decoration. voiddesc()Getter for the element description value. Textdesc(String value)Setter for the element description value. voiddirection()Getter for the text direction. Textdirection(Direction direction)Setter for text direction. Textdirection(String direction)Setter for text direction. voiddisablePointerEvents()Gets the current value of the pointer events. TextdisablePointerEvents(Boolean value)Disables the pointer events. voiddisableStrokeScaling()Getter for the current element's vector effect property. TextdisableStrokeScaling(Boolean value)Setter for the element's vector effect property. voiddispose()Disposes element completely. voiddomElement()Returns DOM element if element is rendered. voiddrag()Returns the current state flag. Textdrag(Boolean value)Turns off/on dragging (moving) of an element. Textdrag(Rect value)Turns off/on dragging (moving) of an element. voidfontFamily()Getter for the font family of text. TextfontFamily(String family)Setter for font family of text. voidfontSize()Getter for the font size of text. TextfontSize(String size)Setter for font size of text. TextfontSize(Number size)Setter for font size of text. voidfontStyle()Getter for the font style of text. TextfontStyle(FontStyle style)Setter for font style of text. TextfontStyle(String style)Setter for font style of text. voidfontVariant()Getter for the font variant of text. TextfontVariant(FontVariant value)Setter for font variant of text. TextfontVariant(String value)Setter for font variant of text. voidfontWeight()Getter for the font weight of text. TextfontWeight(String weight)Setter for font weight of text. TextfontWeight(Number weight)Setter for font weight of text. RectgetAbsoluteBounds()Gets element bounds in absolute coordinates (root element coordinate system). voidgetAbsoluteHeight()Returns height within root bounds. voidgetAbsoluteWidth()Returns width within root bounds. voidgetAbsoluteX()Returns an absolute X (root element coordinate system). voidgetAbsoluteY()Returns an absolute Y (root element coordinate system). RectgetBounds()Returns the bounds. voidgetHeight()Returns the height. voidgetRotationAngle()Returns the current rotation angle in degrees. StagegetStage()Stage object (to which the given element is bound). voidgetTransformationMatrix()Returns the current transformation matrix. voidgetWidth()Returns the width. voidgetX()Returns X in the coordinate system of the parent. voidgetY()Returns Y in the coordinate system of the parent. voidhAlign()Getter for the horizontal align of text. TexthAlign(HAlign align)Setter for horizontal align of text. TexthAlign(String align)Setter for horizontal align of text. voidhasParent()Whether parent element is set. voidheight()Gets the current height. Textheight(Number height)Sets a height. Textheight(String height)Sets a height. voidhtmlText()Getter for the HTML format. TexthtmlText(String value)Setter for the HTML format. voidid()Gets the current element identifier. Textid(String id)Sets the element identifier. voidletterSpacing()Getter for the letter spacing of text. TextletterSpacing(String spacing)Setter for letter spacing of text. TextletterSpacing(Number spacing)Setter for letter spacing of text. voidlineHeight()Getter for the line height of text. TextlineHeight(String height)Sets line height, either as ratio or in pixels. TextlineHeight(Number height)Sets line height, either as ratio or in pixels. voidopacity()Getter for the text opacity. Textopacity(Number opacity)Setter for text opacity. Layerparent()Returns the parent layer. Textparent(Layer parent)Adds element to the given layer. Textparent(Stage parent)Adds element to the given layer. Pathpath()Getter for the path element. Textpath(Path path)Setter for the path element. Textremove()Current element removes itself from the parent layer. voidremoveAllListeners(String type)Removes all listeners from this listenable. Textrotate(Number degrees, Number cx, Number cy)Rotates a shape around the given rotation point. TextrotateByAnchor(Number degrees, Anchor anchor)Rotates a shape around the given anchor. TextrotateByAnchor(Number degrees, String anchor)Rotates a shape around the given anchor. Textscale(Number sx, Number sy, Number cx, Number cy)Scales a shape. TextscaleByAnchor(Number sx, Number sy, Anchor anchor)Scales a shape by anchor. TextscaleByAnchor(Number sx, Number sy, String anchor)Scales a shape by anchor. voidselectable()Getter for the text selectable property. Textselectable(Boolean enabled)Setter for the text selectable property. TextsetPosition(Number x, Number y)Sets top left corner of a shape (transformation taken into account) in the coordinate system of the parent. TextsetRotation(Number degrees, Number cx, Number cy)Rotates a shape around the given point. TextsetRotationByAnchor(Number degrees, Anchor anchor)Rotates a shape around the given anchor. TextsetRotationByAnchor(Number degrees, String anchor)Rotates a shape around the given anchor. TextsetTransformationMatrix(Number m00, Number m10, Number m01, Number m11, Number m02, Number m12)Sets the transformation matrix. voidstyle()Getter for the current text style. voidtext()Getter for the text. Texttext(String text)Setter for the text. voidtextIndent()Getter for the text indent. TexttextIndent(Number indent)Setter for text indent. voidtextOverflow()Getter for the text overflow mode. TexttextOverflow(TextOverflow value)Setter for the text overflow mode. TexttextOverflow(String value)Setter for the text overflow mode. voidtitle()Getter for the element title value. Texttitle(String value)Setter for the element title value. Texttranslate(Number tx, Number ty)Moves a shape taking an account the current transformation. voidsetOnClickListener(ListenersInterface.OnClickListener listener)voidsetOnClickListener(ListenersInterface.OnClickListener listener, String type, String ePath)voidvAlign()Getter for the vertical align of text. TextvAlign(VAlign align)Setter for vertical align of text. TextvAlign(String align)Setter for vertical align of text. voidvisible()Gets the current visibility flag. Textvisible(Boolean isVisible)Hides or shows an element. voidwidth()Gets the current width. Textwidth(Number width)Sets a width. Textwidth(String width)Sets a width. voidwordBreak()Getter for word break of text. TextwordBreak(String value)Setter for word break of text. TextwordBreak(WordBreak value)Setter for word break of text. voidwordWrap()Getter for word-wrap of text. voidwordWrap(String value)Setter for word-wrap of text. voidwordWrap(WordWrap value)Setter for word-wrap of text. voidx()Getter for the X coordinate of text. Textx(Number xCoord)Setter for X coordinate of text. voidy()Getter for the current Y coordinate of text. Texty(Number yCoord)Setter for Y coordinate of text. voidzIndex()Gets the current element's zIndex. TextzIndex(Number value)Sets the element's zIndex. voidunlistenByKey(String key)Removes an event listener which was added with listen() by the key returned by listen(). -
Methods inherited from class com.anychart.graphics.vector.Element
appendTransformationMatrix, attr, clip, clip, cursor, desc, disablePointerEvents, disableStrokeScaling, drag, drag, getAbsoluteBounds, getAbsoluteWidth, id, instantiate, parent, parent, remove, rotate, rotateByAnchor, rotateByAnchor, scale, scaleByAnchor, scaleByAnchor, setPosition, setRotation, setRotationByAnchor, setRotationByAnchor, setTransformationMatrix, title, translate, visible, zIndex -
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()
-
appendTransformationMatrix
Text appendTransformationMatrix(Number m00, Number m10, Number m01, Number m11, Number m02, Number m12)
Combines the current transformation with the given transformation matrix.
-
color
void color()
Getter for the text color.
-
cursor
void cursor()
Getter for the current cursor type.
-
decoration
void decoration()
Getter for the text decoration.
-
decoration
Text decoration(Decoration value)
Setter for text decoration.
-
decoration
Text decoration(String value)
Setter for text decoration.
-
desc
void desc()
Getter for the element description value.
-
direction
void direction()
Getter for the text direction.
-
disablePointerEvents
void disablePointerEvents()
Gets the current value of the pointer events.
-
disablePointerEvents
Text disablePointerEvents(Boolean value)
Disables the pointer events.
-
disableStrokeScaling
void disableStrokeScaling()
Getter for the current element's vector effect property.
-
disableStrokeScaling
Text disableStrokeScaling(Boolean value)
Setter for the element's vector effect property. Learn more by link.
-
dispose
void dispose()
Disposes element completely. Removes it from the parent layer, sets links to null, removes it from DOM.
-
domElement
void domElement()
Returns DOM element if element is rendered. In case of Stage in Suspended state or unbound element - null is returned.
-
drag
void drag()
Returns the current state flag.
-
fontFamily
void fontFamily()
Getter for the font family of text.
-
fontFamily
Text fontFamily(String family)
Setter for font family of text.
-
fontSize
void fontSize()
Getter for the font size of text.
-
fontStyle
void fontStyle()
Getter for the font style of text.
-
fontVariant
void fontVariant()
Getter for the font variant of text.
-
fontVariant
Text fontVariant(FontVariant value)
Setter for font variant of text.
-
fontVariant
Text fontVariant(String value)
Setter for font variant of text.
-
fontWeight
void fontWeight()
Getter for the font weight of text.
-
fontWeight
Text fontWeight(String weight)
Setter for font weight of text.
-
fontWeight
Text fontWeight(Number weight)
Setter for font weight of text.
-
getAbsoluteBounds
Rect getAbsoluteBounds()
Gets element bounds in absolute coordinates (root element coordinate system).
-
getAbsoluteHeight
void getAbsoluteHeight()
Returns height within root bounds. See illustrations at getAbsoluteWidth
-
getAbsoluteWidth
void getAbsoluteWidth()
Returns width within root bounds.
-
getAbsoluteX
void getAbsoluteX()
Returns an absolute X (root element coordinate system).
-
getAbsoluteY
void getAbsoluteY()
Returns an absolute Y (root element coordinate system).
-
getHeight
void getHeight()
Returns the height.
-
getRotationAngle
void getRotationAngle()
Returns the current rotation angle in degrees.
-
getTransformationMatrix
void getTransformationMatrix()
Returns the current transformation matrix.
-
getWidth
void getWidth()
Returns the width.
-
getX
void getX()
Returns X in the coordinate system of the parent.
-
getY
void getY()
Returns Y in the coordinate system of the parent.
-
hAlign
void hAlign()
Getter for the horizontal align of text.
-
hasParent
void hasParent()
Whether parent element is set.
-
height
void height()
Gets the current height.Note: it is not calculated automatically and has no default, and if it was not set using setter - NaN is returned.
-
htmlText
void htmlText()
Getter for the HTML format.
-
id
void id()
Gets the current element identifier.
-
letterSpacing
void letterSpacing()
Getter for the letter spacing of text.
-
letterSpacing
Text letterSpacing(String spacing)
Setter for letter spacing of text.
-
letterSpacing
Text letterSpacing(Number spacing)
Setter for letter spacing of text.
-
lineHeight
void lineHeight()
Getter for the line height of text.
-
lineHeight
Text lineHeight(String height)
Sets line height, either as ratio or in pixels.
-
lineHeight
Text lineHeight(Number height)
Sets line height, either as ratio or in pixels.
-
opacity
void opacity()
Getter for the text opacity.
-
removeAllListeners
void removeAllListeners(String type)
Removes all listeners from this listenable.
-
rotate
Text rotate(Number degrees, Number cx, Number cy)
Rotates a shape around the given rotation point.
-
rotateByAnchor
Text rotateByAnchor(Number degrees, Anchor anchor)
Rotates a shape around the given anchor.
-
rotateByAnchor
Text rotateByAnchor(Number degrees, String anchor)
Rotates a shape around the given anchor.
-
scale
Text scale(Number sx, Number sy, Number cx, Number cy)
Scales a shape. Scaling center is set in the coordinate system of the parent.
-
scaleByAnchor
Text scaleByAnchor(Number sx, Number sy, Anchor anchor)
Scales a shape by anchor. Scaling center is set as an anchor.
-
scaleByAnchor
Text scaleByAnchor(Number sx, Number sy, String anchor)
Scales a shape by anchor. Scaling center is set as an anchor.
-
selectable
void selectable()
Getter for the text selectable property.
-
selectable
Text selectable(Boolean enabled)
Setter for the text selectable property. Defines whether text can be selected. If false - no selection.
-
setPosition
Text setPosition(Number x, Number y)
Sets top left corner of a shape (transformation taken into account) in the coordinate system of the parent.
-
setRotation
Text setRotation(Number degrees, Number cx, Number cy)
Rotates a shape around the given point.
-
setRotationByAnchor
Text setRotationByAnchor(Number degrees, Anchor anchor)
Rotates a shape around the given anchor.
-
setRotationByAnchor
Text setRotationByAnchor(Number degrees, String anchor)
Rotates a shape around the given anchor.
-
setTransformationMatrix
Text setTransformationMatrix(Number m00, Number m10, Number m01, Number m11, Number m02, Number m12)
Sets the transformation matrix.
-
style
void style()
Getter for the current text style.
-
text
void text()
Getter for the text.
-
textIndent
void textIndent()
Getter for the text indent.
-
textIndent
Text textIndent(Number indent)
Setter for text indent. The text-indent property specifies the indentation of the first line in a text-block.
-
textOverflow
void textOverflow()
Getter for the text overflow mode.
-
textOverflow
Text textOverflow(TextOverflow value)
Setter for the text overflow mode.
-
textOverflow
Text textOverflow(String value)
Setter for the text overflow mode.
-
title
void title()
Getter for the element title value.
-
translate
Text translate(Number tx, Number ty)
Moves a shape taking an account the current transformation.
-
setOnClickListener
void setOnClickListener(ListenersInterface.OnClickListener listener)
-
setOnClickListener
void setOnClickListener(ListenersInterface.OnClickListener listener, String type, String ePath)
-
vAlign
void vAlign()
Getter for the vertical align of text.
-
visible
void visible()
Gets the current visibility flag.
-
width
void width()
Gets the current width.Note: it is not calculated automatically and has no default, and if it was not set using setter - NaN is returned.
-
wordBreak
void wordBreak()
Getter for word break of text. More at: Word-break Property
-
wordWrap
void wordWrap()
Getter for word-wrap of text.
-
wordWrap
void wordWrap(String value)
Setter for word-wrap of text. More at: Word-wrap Property
-
wordWrap
void wordWrap(WordWrap value)
Setter for word-wrap of text. More at: Word-wrap Property
-
x
void x()
Getter for the X coordinate of text.
-
y
void y()
Getter for the current Y coordinate of text.
-
zIndex
void zIndex()
Gets the current element's zIndex.
-
unlistenByKey
void unlistenByKey(String key)
Removes an event listener which was added with listen() by the key returned by listen().
-
-
-
-