APIdia Launch Partner
Top Fields Constructors Methods
com.sun.javafx.text

public Class TextRun

extends Object
implements GlyphList
Class Inheritance
All Implemented Interfaces
com.sun.javafx.scene.text.GlyphList
Imports
java.util.concurrent.atomic.AtomicBoolean, com.sun.javafx.font.CharToGlyphMapper, com.sun.javafx.geom.Point2D, .RectBounds, com.sun.javafx.scene.text.GlyphList, .TextSpan

Field Summary

Modifier and TypeField and Description
private float
pack-priv int
pack-priv float
pack-priv int[]
private float
pack-priv int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv int[]
pack-priv int
private float
pack-priv int
pack-priv byte
pack-priv TextLine
pack-priv Point2D
pack-priv float[]
pack-priv int
pack-priv int
pack-priv TextSpan
pack-priv int
pack-priv float

Constructor Summary

AccessConstructor and Description
public
TextRun(int start, int length, byte level, boolean complex, int script, TextSpan span, int slot, boolean canonical)

Method Summary

Modifier and TypeMethod and Description
public float
getAdvance(int glyphIndex)

public float
public int
getCharOffset(int glyphIndex)

Implements com.sun.javafx.scene.text.GlyphList.getCharOffset.

Maps the given glyph index to the char offset.

public float
public int
public int
getGlyphAtX(float x, AtomicBoolean trailing)

public int
getGlyphCode(int glyphIndex)

Implements com.sun.javafx.scene.text.GlyphList.getGlyphCode.

Returns the glyph code for the given glyphIndex.

public int
getGlyphCount()

Implements com.sun.javafx.scene.text.GlyphList.getGlyphCount.

Returns the number of glyphs in GlyphList.

public int
getGlyphIndex(int charOffset)

public float
getHeight()

Implements com.sun.javafx.scene.text.GlyphList.getHeight.

Returns the height of the GlyphList

public float
public int
public byte
public RectBounds
getLineBounds()

Implements com.sun.javafx.scene.text.GlyphList.getLineBounds.

See TextLine#getBounds() (used outside text layout in rendering and span bounds)

public Point2D
getLocation()

Implements com.sun.javafx.scene.text.GlyphList.getLocation.

The top-left location of the GlyphList relative to the origin of the Text Layout.

public int
getOffsetAtX(float x, AtomicBoolean trailing)

Implements com.sun.javafx.scene.text.GlyphList.getOffsetAtX.

Gets the glyph offset at the specified x coordinate.

public float
getPosX(int glyphIndex)

Implements com.sun.javafx.scene.text.GlyphList.getPosX.

The x position for the given glyphIndex relative the GlyphList.

public float
getPosY(int glyphIndex)

Implements com.sun.javafx.scene.text.GlyphList.getPosY.

The y position for the given glyphIndex relative the GlyphList.

public int
public int
public int
getStart()

Implements com.sun.javafx.scene.text.GlyphList.getStart.

Returns the start offset.

public TextSpan
getTextSpan()

Implements com.sun.javafx.scene.text.GlyphList.getTextSpan.

Used during layout children (for rich text) can be null (for non-rich text) but never null for rich text.

public float
getWidth()

Implements com.sun.javafx.scene.text.GlyphList.getWidth.

Returns the width of the GlyphList

public int
getWrapIndex(float width)

public float
getXAtOffset(int offset, boolean leading)

public boolean
public boolean
public boolean
isComplex()

Implements com.sun.javafx.scene.text.GlyphList.isComplex.

Means that this GlyphList was shaped using complex processing (ICU), either because it is complex script or because font features were requested.

public boolean
public boolean
public boolean
public boolean
isLinebreak()

Implements com.sun.javafx.scene.text.GlyphList.isLinebreak.

Returns true if this GlyphList is a line break.

public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public void
justify(int offset, float width)

public void
private void
public void
setComplex(boolean complex)

public void
setEmbedded(RectBounds bounds, int length)

public void
public void
public void
public void
setLocation(float x, float y)

public void
setMetrics(float ascent, float descent, float leading)

public void
public void
public void
public void
setWidth(float width)

public void
shape(int count, int[] glyphs, float[] pos, int[] indices)

public void
shape(int count, int[] glyphs, float[] pos)

public TextRun
split(int offset)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public TextRun
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

ascentback to summary
private float ascent
cacheIndexback to summary
pack-priv int cacheIndex
cacheWidthback to summary
pack-priv float cacheWidth
charIndicesback to summary
pack-priv int[] charIndices
descentback to summary
private float descent
flagsback to summary
pack-priv int flags
FLAGS_CANONICALback to summary
pack-priv static final int FLAGS_CANONICAL
FLAGS_COMPACTback to summary
pack-priv static final int FLAGS_COMPACT
FLAGS_COMPLEXback to summary
pack-priv static final int FLAGS_COMPLEX
FLAGS_EMBEDDEDback to summary
pack-priv static final int FLAGS_EMBEDDED
FLAGS_LEFT_BEARINGback to summary
pack-priv static final int FLAGS_LEFT_BEARING
FLAGS_LINEBREAKback to summary
pack-priv static final int FLAGS_LINEBREAK
FLAGS_RIGHT_BEARINGback to summary
pack-priv static final int FLAGS_RIGHT_BEARING
FLAGS_SOFTBREAKback to summary
pack-priv static final int FLAGS_SOFTBREAK
FLAGS_SPLITback to summary
pack-priv static final int FLAGS_SPLIT
FLAGS_SPLIT_LASTback to summary
pack-priv static final int FLAGS_SPLIT_LAST
FLAGS_TABback to summary
pack-priv static final int FLAGS_TAB
gidsback to summary
pack-priv int[] gids
glyphCountback to summary
pack-priv int glyphCount
leadingback to summary
private float leading
lengthback to summary
pack-priv int length
levelback to summary
pack-priv byte level
lineback to summary
pack-priv TextLine line
locationback to summary
pack-priv Point2D location
positionsback to summary
pack-priv float[] positions
scriptback to summary
pack-priv int script
slotback to summary
pack-priv int slot
spanback to summary
pack-priv TextSpan span
startback to summary
pack-priv int start
widthback to summary
pack-priv float width

Constructor Detail

TextRunback to summary
public TextRun(int start, int length, byte level, boolean complex, int script, TextSpan span, int slot, boolean canonical)

Method Detail

getAdvanceback to summary
public float getAdvance(int glyphIndex)
getAscentback to summary
public float getAscent()
getCharOffsetback to summary
public int getCharOffset(int glyphIndex)

Implements com.sun.javafx.scene.text.GlyphList.getCharOffset.

Doc from com.sun.javafx.scene.text.GlyphList.getCharOffset.

Maps the given glyph index to the char offset. (used during rendering (selection))

Annotations
@Override
getDescentback to summary
public float getDescent()
getEndback to summary
public int getEnd()
getGlyphAtXback to summary
public int getGlyphAtX(float x, AtomicBoolean trailing)
getGlyphCodeback to summary
public int getGlyphCode(int glyphIndex)

Implements com.sun.javafx.scene.text.GlyphList.getGlyphCode.

Doc from com.sun.javafx.scene.text.GlyphList.getGlyphCode.

Returns the glyph code for the given glyphIndex.

Annotations
@Override
getGlyphCountback to summary
public int getGlyphCount()

Implements com.sun.javafx.scene.text.GlyphList.getGlyphCount.

Doc from com.sun.javafx.scene.text.GlyphList.getGlyphCount.

Returns the number of glyphs in GlyphList.

Annotations
@Override
getGlyphIndexback to summary
public int getGlyphIndex(int charOffset)
getHeightback to summary
public float getHeight()

Implements com.sun.javafx.scene.text.GlyphList.getHeight.

Doc from com.sun.javafx.scene.text.GlyphList.getHeight.

Returns the height of the GlyphList

Annotations
@Override
getLeadingback to summary
public float getLeading()
getLengthback to summary
public int getLength()
getLevelback to summary
public byte getLevel()
getLineBoundsback to summary
public RectBounds getLineBounds()

Implements com.sun.javafx.scene.text.GlyphList.getLineBounds.

Doc from com.sun.javafx.scene.text.GlyphList.getLineBounds.

See TextLine#getBounds() (used outside text layout in rendering and span bounds)

Annotations
@Override
getLocationback to summary
public Point2D getLocation()

Implements com.sun.javafx.scene.text.GlyphList.getLocation.

Doc from com.sun.javafx.scene.text.GlyphList.getLocation.

The top-left location of the GlyphList relative to the origin of the Text Layout.

Annotations
@Override
getOffsetAtXback to summary
public int getOffsetAtX(float x, AtomicBoolean trailing)

Implements com.sun.javafx.scene.text.GlyphList.getOffsetAtX.

Doc from com.sun.javafx.scene.text.GlyphList.getOffsetAtX.

Gets the glyph offset at the specified x coordinate.

Annotations
@Override
getPosXback to summary
public float getPosX(int glyphIndex)

Implements com.sun.javafx.scene.text.GlyphList.getPosX.

Doc from com.sun.javafx.scene.text.GlyphList.getPosX.

The x position for the given glyphIndex relative the GlyphList.

Annotations
@Override
getPosYback to summary
public float getPosY(int glyphIndex)

Implements com.sun.javafx.scene.text.GlyphList.getPosY.

Doc from com.sun.javafx.scene.text.GlyphList.getPosY.

The y position for the given glyphIndex relative the GlyphList.

Annotations
@Override
getScriptback to summary
public int getScript()
getSlotback to summary
public int getSlot()
getStartback to summary
public int getStart()

Implements com.sun.javafx.scene.text.GlyphList.getStart.

Doc from com.sun.javafx.scene.text.GlyphList.getStart.

Returns the start offset.

Annotations
@Override
getTextSpanback to summary
public TextSpan getTextSpan()

Implements com.sun.javafx.scene.text.GlyphList.getTextSpan.

Doc from com.sun.javafx.scene.text.GlyphList.getTextSpan.

Used during layout children (for rich text) can be null (for non-rich text) but never null for rich text.

Annotations
@Override
getWidthback to summary
public float getWidth()

Implements com.sun.javafx.scene.text.GlyphList.getWidth.

Doc from com.sun.javafx.scene.text.GlyphList.getWidth.

Returns the width of the GlyphList

Annotations
@Override
getWrapIndexback to summary
public int getWrapIndex(float width)
getXAtOffsetback to summary
public float getXAtOffset(int offset, boolean leading)
isBreakback to summary
public boolean isBreak()
isCanonicalback to summary
public boolean isCanonical()
isComplexback to summary
public boolean isComplex()

Implements com.sun.javafx.scene.text.GlyphList.isComplex.

Doc from com.sun.javafx.scene.text.GlyphList.isComplex.

Means that this GlyphList was shaped using complex processing (ICU), either because it is complex script or because font features were requested. (used outside text layout in rendering)

Annotations
@Override
isEmbeddedback to summary
public boolean isEmbedded()
isLeftBearingback to summary
public boolean isLeftBearing()
isLeftToRightback to summary
public boolean isLeftToRight()
isLinebreakback to summary
public boolean isLinebreak()

Implements com.sun.javafx.scene.text.GlyphList.isLinebreak.

Doc from com.sun.javafx.scene.text.GlyphList.isLinebreak.

Returns true if this GlyphList is a line break.

Annotations
@Override
isNoLinkAfterback to summary
public boolean isNoLinkAfter()
isNoLinkBeforeback to summary
public boolean isNoLinkBefore()
isRightBearingback to summary
public boolean isRightBearing()
isSoftbreakback to summary
public boolean isSoftbreak()
isSplitback to summary
public boolean isSplit()
isSplitLastback to summary
public boolean isSplitLast()
isTabback to summary
public boolean isTab()
justifyback to summary
public void justify(int offset, float width)
mergeback to summary
public void merge(TextRun run)
resetback to summary
private void reset()
setComplexback to summary
public void setComplex(boolean complex)
setEmbeddedback to summary
public void setEmbedded(RectBounds bounds, int length)
setLeftBearingback to summary
public void setLeftBearing()
setLineback to summary
public void setLine(TextLine line)
setLinebreakback to summary
public void setLinebreak()
setLocationback to summary
public void setLocation(float x, float y)
setMetricsback to summary
public void setMetrics(float ascent, float descent, float leading)
setRightBearingback to summary
public void setRightBearing()
setSoftbreakback to summary
public void setSoftbreak()
setTabback to summary
public void setTab()
setWidthback to summary
public void setWidth(float width)
shapeback to summary
public void shape(int count, int[] glyphs, float[] pos, int[] indices)
shapeback to summary
public void shape(int count, int[] glyphs, float[] pos)
splitback to summary
public TextRun split(int offset)
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.

Annotations
@Override
unwrapback to summary
public TextRun unwrap()