Top Description Fields Constructors Methods
com.sun.jfx.incubator.scene.control.richtext

public final Class CaretInfo

extends Object
Class Inheritance
Imports
java.util.Objects, javafx.scene.shape.LineTo, .MoveTo, .PathElement

Captures the caret position and bounds in the VFlow.content coordinates.

Field Summary

Modifier and TypeField and Description
private final double
private final PathElement[]
private final double
private final double
private final double
private final double

Constructor Summary

AccessConstructor and Description
private
CaretInfo(double xmin, double xmax, double ymin, double ymax, double lineSpacing, PathElement[] path)

Method Summary

Modifier and TypeMethod and Description
public final boolean

Returns:

true if the coordinate is within the caret bounding box
containsY
(double
the Y coordinate
y
)

Returns true if the specified y coordinate is between the smallest and largest y coordinate of the caret bounding box.

public static CaretInfo

Returns:

the CaretInfo instance
create
(double
the line spacing
lineSpacing
,
PathElement[]
the caret path
path
)

Creates an instance of CaretInfo given the path and translation offsets required to convert path coordinates (which come in the frame of reference of its TextFlow) to the view port coordinates.

public final double

Returns:

the line spacing
getLineSpacing
()

Returns the line spacing at the caret position.

public final double

Returns:

maximum x coordinate
getMaxX
()

Returns the largest x coordinate of the caret shape bounding box.

public final double

Returns:

maximum y coordinate
getMaxY
()

Returns the largest y coordinate of the caret shape bounding box.

public final double

Returns:

minimum x coordinate
getMinX
()

Returns the smallest x coordinate of the caret shape bounding box.

public final double

Returns:

minimum y coordinate
getMinY
()

Returns the smallest y coordinate of the caret shape bounding box.

private static double
halfPixel(double coord)

public final PathElement[]

Returns:

the non-null array of path elements
path
()

Returns the caret path.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

lineSpacingback to summary
private final double lineSpacing
pathback to summary
private final PathElement[] path
xmaxback to summary
private final double xmax
xminback to summary
private final double xmin
ymaxback to summary
private final double ymax
yminback to summary
private final double ymin

Constructor Detail

CaretInfoback to summary
private CaretInfo(double xmin, double xmax, double ymin, double ymax, double lineSpacing, PathElement[] path)

Method Detail

containsYback to summary
public final boolean containsY(double y)

Returns true if the specified y coordinate is between the smallest and largest y coordinate of the caret bounding box.

Parameters
y:double

the Y coordinate

Returns:boolean

true if the coordinate is within the caret bounding box

createback to summary
public static CaretInfo create(double lineSpacing, PathElement[] path)

Creates an instance of CaretInfo given the path and translation offsets required to convert path coordinates (which come in the frame of reference of its TextFlow) to the view port coordinates.

Parameters
lineSpacing:double

the line spacing

path:PathElement[]

the caret path

Returns:CaretInfo

the CaretInfo instance

getLineSpacingback to summary
public final double getLineSpacing()

Returns the line spacing at the caret position.

Returns:double

the line spacing

getMaxXback to summary
public final double getMaxX()

Returns the largest x coordinate of the caret shape bounding box.

Returns:double

maximum x coordinate

getMaxYback to summary
public final double getMaxY()

Returns the largest y coordinate of the caret shape bounding box.

Returns:double

maximum y coordinate

getMinXback to summary
public final double getMinX()

Returns the smallest x coordinate of the caret shape bounding box.

Returns:double

minimum x coordinate

getMinYback to summary
public final double getMinY()

Returns the smallest y coordinate of the caret shape bounding box.

Returns:double

minimum y coordinate

halfPixelback to summary
private static double halfPixel(double coord)
pathback to summary
public final PathElement[] path()

Returns the caret path.

Returns:PathElement[]

the non-null array of path elements

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override