Top Description Constructors Methods
com.sun.javafx.text

public final Class TextUtils

extends Object
Class Inheritance
Imports
java.util.ArrayList, javafx.geometry.Rectangle2D, javafx.scene.shape.LineTo, .MoveTo, .PathElement, javafx.scene.text.TextLineInfo, com.sun.javafx.geom.BaseBounds, .Point2D, com.sun.javafx.scene.text.GlyphList, .TextLayout, .TextLine

Text-related Utilities.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static PathElement[]
public static Rectangle2D[]
getCaretRectangles(TextLayout.CaretGeometry g, double dx, double dy)

public static PathElement[]

Returns:

the array of PathElements
getRange
(TextLayout
the text layout
layout
,
int
the start offset
start
,
int
the end offset
end
,
int
the type of geometry to query
type
,
double
the x offset to add to each path element
dx
,
double
the y offset to add to each path element
dy
,
double
the line spacing (applies only to TYPE_TEXT)
lineSpacing
)

Queries the range geometry of the range of text within the text layout as an array of PathElements, for one of the three possible types:

public static TextLineInfo
toLineInfo(TextLine line, double dx, double dy, double lineSpacing)

public static Rectangle2D
toRectangle2D(BaseBounds b, double dx, double dy, double lineSpacing)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

TextUtilsback to summary
public TextUtils()

Method Detail

getCaretPathElementsback to summary
public static PathElement[] getCaretPathElements(TextLayout.CaretGeometry g, double dx, double dy)
getCaretRectanglesback to summary
public static Rectangle2D[] getCaretRectangles(TextLayout.CaretGeometry g, double dx, double dy)
getRangeback to summary
public static PathElement[] getRange(TextLayout layout, int start, int end, int type, double dx, double dy, double lineSpacing)

Queries the range geometry of the range of text within the text layout as an array of PathElements, for one of the three possible types:

Parameters
layout:TextLayout

the text layout

start:int

the start offset

end:int

the end offset

type:int

the type of geometry to query

dx:double

the x offset to add to each path element

dy:double

the y offset to add to each path element

lineSpacing:double

the line spacing (applies only to TYPE_TEXT)

Returns:PathElement[]

the array of PathElements

toLineInfoback to summary
public static TextLineInfo toLineInfo(TextLine line, double dx, double dy, double lineSpacing)
toRectangle2Dback to summary
public static Rectangle2D toRectangle2D(BaseBounds b, double dx, double dy, double lineSpacing)