APIdia Launch Partner
Top Fields Constructors Methods
sun.font

pack-priv final Class StandardTextSource

extends TextSource
Class Inheritance
Imports
java.awt.Font, java.awt.font.FontRenderContext, .LineMetrics

Field Summary

Modifier and TypeField and Description
private final char[]
private final int
private final CoreMetrics
private final int
private final int
private final Font
private final FontRenderContext
private final int
private final int
private final int
Inherited from sun.font.TextSource:
WITH_CONTEXTWITHOUT_CONTEXT

Constructor Summary

AccessConstructor and Description
pack-priv
StandardTextSource(char[] chars, int start, int len, int cstart, int clen, int level, int flags, Font font, FontRenderContext frc, CoreMetrics cm)

Create a simple implementation of a TextSource.

Method Summary

Modifier and TypeMethod and Description
public int
getBidiLevel()

Implements abstract sun.font.TextSource.getBidiLevel.

Bidi level of all the characters in context.

public char[]
getChars()

Implements abstract sun.font.TextSource.getChars.

Source character data.

public int
getContextLength()

Implements abstract sun.font.TextSource.getContextLength.

Length of context data.

public int
getContextStart()

Implements abstract sun.font.TextSource.getContextStart.

Start of context data in char array returned from getChars.

public CoreMetrics
getCoreMetrics()

Implements abstract sun.font.TextSource.getCoreMetrics.

Line metrics for source data.

public Font
getFont()

Implements abstract sun.font.TextSource.getFont.

Font for source data.

public FontRenderContext
getFRC()

Implements abstract sun.font.TextSource.getFRC.

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

public int
getLayoutFlags()

Implements abstract sun.font.TextSource.getLayoutFlags.

Return the layout flags

public int
getLength()

Implements abstract sun.font.TextSource.getLength.

Length of source data.

public int
getStart()

Implements abstract sun.font.TextSource.getStart.

Start of source data in char array returned from getChars.

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

Implements abstract sun.font.TextSource.getSubSource.

Get subrange of this TextSource.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public String
toString(boolean withContext)

Implements abstract sun.font.TextSource.toString.

Get debugging info about this TextSource instance.

Field Detail

charsback to summary
private final char[] chars
clenback to summary
private final int clen
cmback to summary
private final CoreMetrics cm
cstartback to summary
private final int cstart
flagsback to summary
private final int flags
fontback to summary
private final Font font
frcback to summary
private final FontRenderContext frc
lenback to summary
private final int len
levelback to summary
private final int level
startback to summary
private final int start

Constructor Detail

StandardTextSourceback to summary
pack-priv StandardTextSource(char[] chars, int start, int len, int cstart, int clen, int level, int flags, Font font, FontRenderContext frc, CoreMetrics cm)

Create a simple implementation of a TextSource. Chars is an array containing clen chars in the context, in logical order, contiguously starting at cstart. Start and len represent that portion of the context representing the true source; start, like cstart, is relative to the start of the character array. Level is the bidi level (0-63 for the entire context. Flags is the layout flags. Font is the font, frc is the render context, and lm is the line metrics for the entire source text, but not necessarily the context.

Method Detail

getBidiLevelback to summary
public int getBidiLevel()

Implements abstract sun.font.TextSource.getBidiLevel.

Doc from sun.font.TextSource.getBidiLevel.

Bidi level of all the characters in context.

getCharsback to summary
public char[] getChars()

Implements abstract sun.font.TextSource.getChars.

Doc from sun.font.TextSource.getChars.

Source character data.

getContextLengthback to summary
public int getContextLength()

Implements abstract sun.font.TextSource.getContextLength.

Doc from sun.font.TextSource.getContextLength.

Length of context data.

getContextStartback to summary
public int getContextStart()

Implements abstract sun.font.TextSource.getContextStart.

Doc from sun.font.TextSource.getContextStart.

Start of context data in char array returned from getChars.

getCoreMetricsback to summary
public CoreMetrics getCoreMetrics()

Implements abstract sun.font.TextSource.getCoreMetrics.

Doc from sun.font.TextSource.getCoreMetrics.

Line metrics for source data.

getFontback to summary
public Font getFont()

Implements abstract sun.font.TextSource.getFont.

Doc from sun.font.TextSource.getFont.

Font for source data.

getFRCback to summary
public FontRenderContext getFRC()

Implements abstract sun.font.TextSource.getFRC.

Doc from sun.font.TextSource.getFRC.

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

getLayoutFlagsback to summary
public int getLayoutFlags()

Implements abstract sun.font.TextSource.getLayoutFlags.

Doc from sun.font.TextSource.getLayoutFlags.

Return the layout flags

getLengthback to summary
public int getLength()

Implements abstract sun.font.TextSource.getLength.

Doc from sun.font.TextSource.getLength.

Length of source data.

getStartback to summary
public int getStart()

Implements abstract sun.font.TextSource.getStart.

Doc from sun.font.TextSource.getStart.

Start of source data in char array returned from getChars.

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

Implements abstract sun.font.TextSource.getSubSource.

Doc from sun.font.TextSource.getSubSource.

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

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.

toStringback to summary
public String toString(boolean withContext)

Implements abstract sun.font.TextSource.toString.

Doc from sun.font.TextSource.toString.

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