Top Description Methods
com.sun.javafx.scene.text

public Interface TextLine

Known Direct Implementers
com.sun.javafx.text.TextLine
Imports
com.sun.javafx.geom.RectBounds

Represents a full line of text that is all rendered on a single line.

Method Summary

Modifier and TypeMethod and Description
public RectBounds
getBounds()

Returns metrics information about the line as follow: bounds().getWidth() - the width of the line.

public float
getLeftSideBearing()

Returns the left side bearing of the line (negative).

public int
getLength()

Returns the line length in character.

public float
getRightSideBearing()

Returns the right side bearing of the line (positive).

public GlyphList[]
getRuns()

Returns the list of GlyphList in the line.

public int
getStart()

Returns the line start offset.

Method Detail

getBoundsback to summary
public RectBounds getBounds()

Returns metrics information about the line as follow: bounds().getWidth() - the width of the line. The width for the line is sum of all run's width in the line, it is not affect by any wrapping width but it will include any changes caused by justification. bounds().getHeight() - the height of the line. The height of the line is sum of the max ascent, max descent, and max line gap of all the fonts in the line. bounds.().getMinY() - the ascent of the line (negative). The ascent of the line is the max ascent of all fonts in the line. bounds().getMinX() - the x origin of the line (relative to the layout). The x origin is defined by TextAlignment of the text layout, always zero for left-aligned text.

getLeftSideBearingback to summary
public float getLeftSideBearing()

Returns the left side bearing of the line (negative).

getLengthback to summary
public int getLength()

Returns the line length in character.

getRightSideBearingback to summary
public float getRightSideBearing()

Returns the right side bearing of the line (positive).

getRunsback to summary
public GlyphList[] getRuns()

Returns the list of GlyphList in the line. The list is visually ordered.

getStartback to summary
public int getStart()

Returns the line start offset.