APIdia Launch Partner
Top Description Methods
com.sun.javafx.scene.text

public Interface TextSpan

Known Direct Implementers
javafx.scene.text.TextFlow.EmbeddedSpan
Imports
javafx.scene.layout.Region, com.sun.javafx.geom.RectBounds

Represents a sequence of characters all using the same font, or an embedded object if no font is supplied.

A text span can contain line breaks if the text should span multiple lines.

Method Summary

Modifier and TypeMethod and Description
public RectBounds
getBounds()

The bounds for embedded object, only used when the font returns null.

public Object
getFont()

The font for the span, if null the span is handled as embedded object.

public Region

Returns:

the layout root, or null
getLayoutRootRegion
()

Returns the Region which contains the layout for this TextSpan.

public String
getText()

The text for the span, can be empty but not null.

Method Detail

getBoundsback to summary
public RectBounds getBounds()

The bounds for embedded object, only used when the font returns null. The text for a embedded object should be a single char ("" is recommended).

getFontback to summary
public Object getFont()

The font for the span, if null the span is handled as embedded object.

getLayoutRootRegionback to summary
public Region getLayoutRootRegion()

Returns the Region which contains the layout for this TextSpan.

Returns:Region

the layout root, or null

getTextback to summary
public String getText()

The text for the span, can be empty but not null.