public interface

TextLineComponent

sun.font.TextLineComponent
Known Indirect Subclasses

Summary

Constants
int LEFT_TO_RIGHT Force subset characters to run left-to-right.
int RIGHT_TO_LEFT Force subset characters to run right-to-left.
int UNCHANGED Leave subset character direction and ordering unchanged.
Public Methods
abstract TextLineComponent applyJustificationDeltas(float[] deltas, int deltaStart, boolean[] flags)
Apply deltas to the data in this component, starting at offset deltaStart, and return the new component.
abstract boolean caretAtOffsetIsValid(int index)
abstract void draw(Graphics2D g2d, float x, float y)
abstract float getAdvance()
abstract float getAdvanceBetween(int start, int limit)
abstract AffineTransform getBaselineTransform()
abstract float getCharAdvance(int index)
abstract Rectangle2D getCharVisualBounds(int index)
abstract float getCharX(int index)
abstract float getCharY(int index)
abstract CoreMetrics getCoreMetrics()
abstract Rectangle2D getItalicBounds()
abstract void getJustificationInfos(GlyphJustificationInfo[] infos, int infoStart, int charStart, int charLimit)
Return GlyphJustificationInfo objects for the characters between charStart and charLimit, starting at offset infoStart.
abstract int getLineBreakIndex(int start, float width)
abstract Rectangle2D getLogicalBounds()
abstract int getNumCharacters()
abstract int getNumJustificationInfos()
Return the number of justification records this uses.
abstract Shape getOutline(float x, float y)
abstract Rectangle getPixelBounds(FontRenderContext frc, float x, float y)
abstract TextLineComponent getSubset(int start, int limit, int dir)
Return a TextLineComponent for the characters in the range start, limit.
abstract Rectangle2D getVisualBounds()
abstract boolean isSimple()

Constants

public static final int LEFT_TO_RIGHT

Force subset characters to run left-to-right.

Constant Value: 0 (0x00000000)

public static final int RIGHT_TO_LEFT

Force subset characters to run right-to-left.

Constant Value: 1 (0x00000001)

public static final int UNCHANGED

Leave subset character direction and ordering unchanged.

Constant Value: 2 (0x00000002)

Public Methods

public abstract TextLineComponent applyJustificationDeltas (float[] deltas, int deltaStart, boolean[] flags)

Apply deltas to the data in this component, starting at offset deltaStart, and return the new component. There are two floats for each justification info, for a total of 2 * getNumJustificationInfos. The first delta is the left adjustment, the second is the right adjustment.

If flags[0] is true on entry, rejustification is allowed. If the new component requires rejustification (ligatures were formed or split), flags[0] will be set on exit.

public abstract boolean caretAtOffsetIsValid (int index)

public abstract void draw (Graphics2D g2d, float x, float y)

public abstract float getAdvance ()

public abstract float getAdvanceBetween (int start, int limit)

public abstract AffineTransform getBaselineTransform ()

public abstract float getCharAdvance (int index)

public abstract Rectangle2D getCharVisualBounds (int index)

public abstract float getCharX (int index)

public abstract float getCharY (int index)

public abstract CoreMetrics getCoreMetrics ()

public abstract Rectangle2D getItalicBounds ()

public abstract void getJustificationInfos (GlyphJustificationInfo[] infos, int infoStart, int charStart, int charLimit)

Return GlyphJustificationInfo objects for the characters between charStart and charLimit, starting at offset infoStart. Infos will be in visual order. All positions between infoStart and getNumJustificationInfos will be set. If a position corresponds to a character outside the provided range, it is set to null.

public abstract int getLineBreakIndex (int start, float width)

public abstract Rectangle2D getLogicalBounds ()

public abstract int getNumCharacters ()

public abstract int getNumJustificationInfos ()

Return the number of justification records this uses.

public abstract Shape getOutline (float x, float y)

public abstract Rectangle getPixelBounds (FontRenderContext frc, float x, float y)

public abstract TextLineComponent getSubset (int start, int limit, int dir)

Return a TextLineComponent for the characters in the range start, limit. The range is relative to this TextLineComponent (ie, the first character is at 0).

Parameters
dir one of the constants LEFT_TO_RIGHT, RIGHT_TO_LEFT, or UNCHANGED

public abstract Rectangle2D getVisualBounds ()

public abstract boolean isSimple ()