APIdia Launch Partner
Top Description Fields Constructors Methods
sun.font

public abstract Class TextSource

extends Object
Class Inheritance
Known Direct Subclasses
sun.font.StandardTextSource
Imports
java.awt.Font, java.awt.font.FontRenderContext, .LineMetrics

A text source represents text for rendering, plus context information. All text in the source uses the same font, metrics, and render context, and is at the same bidi level.

Field Summary

Modifier and TypeField and Description
public static final boolean
WITH_CONTEXT

Constant for toString(boolean).

public static final boolean
WITHOUT_CONTEXT

Constant for toString(boolean).

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract int
getBidiLevel()

Bidi level of all the characters in context.

public abstract char[]
getChars()

Source character data.

public abstract int
getContextLength()

Length of context data.

public abstract int
getContextStart()

Start of context data in char array returned from getChars.

public abstract CoreMetrics
getCoreMetrics()

Line metrics for source data.

public abstract Font
getFont()

Font for source data.

public abstract FontRenderContext
getFRC()

Font render context to use when measuring or rendering source data.

public abstract int
getLayoutFlags()

Return the layout flags

public abstract int
getLength()

Length of source data.

public abstract int
getStart()

Start of source data in char array returned from getChars.

public abstract TextSource
getSubSource(int start, int length, int dir)

Get subrange of this TextSource.

public abstract String
toString(boolean withContext)

Get debugging info about this TextSource instance.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

WITH_CONTEXTback to summary
public static final boolean WITH_CONTEXT

Constant for toString(boolean). Indicates that toString should return info outside of the context of this instance.

WITHOUT_CONTEXTback to summary
public static final boolean WITHOUT_CONTEXT

Constant for toString(boolean). Indicates that toString should not return info outside of the context of this instance.

Constructor Detail

TextSourceback to summary
public TextSource()

Method Detail

getBidiLevelback to summary
public abstract int getBidiLevel()

Bidi level of all the characters in context.

getCharsback to summary
public abstract char[] getChars()

Source character data.

getContextLengthback to summary
public abstract int getContextLength()

Length of context data.

getContextStartback to summary
public abstract int getContextStart()

Start of context data in char array returned from getChars.

getCoreMetricsback to summary
public abstract CoreMetrics getCoreMetrics()

Line metrics for source data.

getFontback to summary
public abstract Font getFont()

Font for source data.

getFRCback to summary
public abstract FontRenderContext getFRC()

Font render context to use when measuring or rendering source data.

getLayoutFlagsback to summary
public abstract int getLayoutFlags()

Return the layout flags

getLengthback to summary
public abstract int getLength()

Length of source data.

getStartback to summary
public abstract int getStart()

Start of source data in char array returned from getChars.

getSubSourceback to summary
public abstract TextSource getSubSource(int start, int length, int dir)

Get subrange of this TextSource. dir is one of the TextLineComponent constants

toStringback to summary
public abstract String toString(boolean withContext)

Get debugging info about this TextSource instance. Default implementation just returns toString. Subclasses should implement this to match the semantics of the toString constants.