public class

TextLabelFactory

extends Object
java.lang.Object
   ↳ sun.font.TextLabelFactory

Class Overview

A factory for text labels. Basically this just holds onto the stuff that doesn't change-- the render context, context, and bidi info for the context-- and gets called for each subrange you want to create.

Summary

Public Constructors
TextLabelFactory(FontRenderContext frc, char[] text, Bidi bidi, int flags)
Initialize a factory to produce glyph arrays.
Public Methods
ExtendedTextLabel createExtended(Font font, CoreMetrics lm, Decoration decorator, int start, int limit)
Create an extended glyph array for the text between start and limit.
TextLabel createSimple(Font font, CoreMetrics lm, int start, int limit)
Create a simple glyph array for the text between start and limit.
FontRenderContext getFontRenderContext()
int getLayoutFlags()
Bidi getLineBidi()
int getLineLimit()
int getLineStart()
Bidi getParagraphBidi()
char[] getText()
void setLineContext(int lineStart, int lineLimit)
Set a line context for the factory.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public TextLabelFactory (FontRenderContext frc, char[] text, Bidi bidi, int flags)

Initialize a factory to produce glyph arrays.

Parameters
frc the FontRenderContext to use for the arrays to be produced.
text the text of the paragraph.
bidi the bidi information for the paragraph text, or null if the entire text is left-to-right text.

Public Methods

public ExtendedTextLabel createExtended (Font font, CoreMetrics lm, Decoration decorator, int start, int limit)

Create an extended glyph array for the text between start and limit.

Parameters
font the font to use to generate glyphs and character positions.
start the start of the subrange for which to create the glyph array
limit the limit of the subrange for which to create glyph array Start and limit must be within the bounds of the current line. If no line context has been set, the entire text is used as the current line. The text between start and limit will be treated as though it all has the same bidi level (and thus the same directionality) as the character at start. Clients should ensure that all text between start and limit has the same bidi level for the current line.

public TextLabel createSimple (Font font, CoreMetrics lm, int start, int limit)

Create a simple glyph array for the text between start and limit.

Parameters
font the font to use to generate glyphs and character positions.
start the start of the subrange for which to create the glyph array
limit the limit of the subrange for which to create glyph array

public FontRenderContext getFontRenderContext ()

public int getLayoutFlags ()

public Bidi getLineBidi ()

public int getLineLimit ()

public int getLineStart ()

public Bidi getParagraphBidi ()

public char[] getText ()

public void setLineContext (int lineStart, int lineLimit)

Set a line context for the factory. Shaping only occurs on this line. Characters are ordered as they would appear on this line.

Parameters
lineStart the index within the text of the start of the line.
lineLimit the index within the text of the limit of the line.