APIdia Launch Partner
Top Fields Constructors Methods
sun.font

public final Class GraphicComponent

extends Object
implements TextLineComponent, Label
Class Inheritance
All Implemented Interfaces
sun.font.Decoration.Label, sun.font.TextLineComponent
Imports
java.awt.Font, .Graphics2D, .Rectangle, .Shape, java.awt.font.FontRenderContext, .LineMetrics, .GraphicAttribute, .GlyphJustificationInfo, java.awt.geom.AffineTransform, .GeneralPath, .Rectangle2D, java.text.Bidi, java.util.Map

Field Summary

Modifier and TypeField and Description
private AffineTransform
private int[]
private CoreMetrics
private Decoration
private GraphicAttribute
public static final float
private float
private int
private byte[]
private Rectangle2D

Constructor Summary

AccessConstructor and Description
public
GraphicComponent(GraphicAttribute graphic, Decoration decorator, int[] charsLtoV, byte[] levels, int start, int limit, AffineTransform baseTx)

Create a new GraphicComponent.

private
GraphicComponent(GraphicComponent parent, int start, int limit, int dir)

Method Summary

Modifier and TypeMethod and Description
public TextLineComponent
applyJustificationDeltas(float[] deltas, int deltaStart, boolean[] flags)

Implements sun.font.TextLineComponent.applyJustificationDeltas.

Apply deltas to the data in this component, starting at offset deltaStart, and return the new component.

public boolean
public static CoreMetrics
public void
draw(Graphics2D g2d, float x, float y)

Implements sun.font.TextLineComponent.draw.

public float
public float
public AffineTransform
public float
public Rectangle2D
public float
public float
public CoreMetrics
public float
public Rectangle2D
public void
getJustificationInfos(GlyphJustificationInfo[] infos, int infoStart, int charStart, int charLimit)

Implements sun.font.TextLineComponent.getJustificationInfos.

Return GlyphJustificationInfo objects for the characters between charStart and charLimit, starting at offset infoStart.

public int
public Rectangle2D
public int
public int
getNumJustificationInfos()

Implements sun.font.TextLineComponent.getNumJustificationInfos.

Return the number of justification records this uses.

public Shape
public Rectangle
public TextLineComponent
getSubset(int start, int limit, int dir)

Implements sun.font.TextLineComponent.getSubset.

Return a TextLineComponent for the characters in the range start, limit.

public Rectangle2D
public void
public Rectangle2D
public Shape
public Rectangle2D
private void
initLocalOrdering(int[] charsLtoV, byte[] levels, int start, int limit)

Initialize graphicCount, also charsLtoV and levels arrays.

public boolean
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

baseTxback to summary
private AffineTransform baseTx
charsLtoVback to summary
private int[] charsLtoV
cmback to summary
private CoreMetrics cm
decoratorback to summary
private Decoration decorator
graphicback to summary
private GraphicAttribute graphic
GRAPHIC_LEADINGback to summary
public static final float GRAPHIC_LEADING
graphicAdvanceback to summary
private float graphicAdvance
graphicCountback to summary
private int graphicCount
levelsback to summary
private byte[] levels
visualBoundsback to summary
private Rectangle2D visualBounds

Constructor Detail

GraphicComponentback to summary
public GraphicComponent(GraphicAttribute graphic, Decoration decorator, int[] charsLtoV, byte[] levels, int start, int limit, AffineTransform baseTx)

Create a new GraphicComponent. start and limit are indices into charLtoV and levels. charsLtoV and levels may be adopted.

GraphicComponentback to summary
private GraphicComponent(GraphicComponent parent, int start, int limit, int dir)

Method Detail

applyJustificationDeltasback to summary
public TextLineComponent applyJustificationDeltas(float[] deltas, int deltaStart, boolean[] flags)

Implements sun.font.TextLineComponent.applyJustificationDeltas.

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.

caretAtOffsetIsValidback to summary
public boolean caretAtOffsetIsValid(int index)

Implements sun.font.TextLineComponent.caretAtOffsetIsValid.

createCoreMetricsback to summary
public static CoreMetrics createCoreMetrics(GraphicAttribute graphic)
drawback to summary
public void draw(Graphics2D g2d, float x, float y)

Implements sun.font.TextLineComponent.draw.

getAdvanceback to summary
public float getAdvance()

Implements sun.font.TextLineComponent.getAdvance.

getAdvanceBetweenback to summary
public float getAdvanceBetween(int start, int limit)

Implements sun.font.TextLineComponent.getAdvanceBetween.

getBaselineTransformback to summary
public AffineTransform getBaselineTransform()

Implements sun.font.TextLineComponent.getBaselineTransform.

getCharAdvanceback to summary
public float getCharAdvance(int index)

Implements sun.font.TextLineComponent.getCharAdvance.

getCharVisualBoundsback to summary
public Rectangle2D getCharVisualBounds(int index)

Implements sun.font.TextLineComponent.getCharVisualBounds.

getCharXback to summary
public float getCharX(int index)

Implements sun.font.TextLineComponent.getCharX.

getCharYback to summary
public float getCharY(int index)

Implements sun.font.TextLineComponent.getCharY.

getCoreMetricsback to summary
public CoreMetrics getCoreMetrics()

Implements sun.font.TextLineComponent.getCoreMetrics, sun.font.Decoration.Label.getCoreMetrics.

getItalicAngleback to summary
public float getItalicAngle()
getItalicBoundsback to summary
public Rectangle2D getItalicBounds()

Implements sun.font.TextLineComponent.getItalicBounds.

getJustificationInfosback to summary
public void getJustificationInfos(GlyphJustificationInfo[] infos, int infoStart, int charStart, int charLimit)

Implements sun.font.TextLineComponent.getJustificationInfos.

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.

getLineBreakIndexback to summary
public int getLineBreakIndex(int start, float width)

Implements sun.font.TextLineComponent.getLineBreakIndex.

getLogicalBoundsback to summary
public Rectangle2D getLogicalBounds()

Implements sun.font.TextLineComponent.getLogicalBounds, sun.font.Decoration.Label.getLogicalBounds.

getNumCharactersback to summary
public int getNumCharacters()

Implements sun.font.TextLineComponent.getNumCharacters.

getNumJustificationInfosback to summary
public int getNumJustificationInfos()

Implements sun.font.TextLineComponent.getNumJustificationInfos.

Return the number of justification records this uses.

getOutlineback to summary
public Shape getOutline(float x, float y)

Implements sun.font.TextLineComponent.getOutline.

getPixelBoundsback to summary
public Rectangle getPixelBounds(FontRenderContext frc, float x, float y)

Implements sun.font.TextLineComponent.getPixelBounds.

getSubsetback to summary
public TextLineComponent getSubset(int start, int limit, int dir)

Implements sun.font.TextLineComponent.getSubset.

Doc from sun.font.TextLineComponent.getSubset.

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).

getVisualBoundsback to summary
public Rectangle2D getVisualBounds()

Implements sun.font.TextLineComponent.getVisualBounds.

handleDrawback to summary
public void handleDraw(Graphics2D g2d, float x, float y)

Implements sun.font.Decoration.Label.handleDraw.

handleGetCharVisualBoundsback to summary
public Rectangle2D handleGetCharVisualBounds(int index)

Implements sun.font.Decoration.Label.handleGetCharVisualBounds.

handleGetOutlineback to summary
public Shape handleGetOutline(float x, float y)

Implements sun.font.Decoration.Label.handleGetOutline.

handleGetVisualBoundsback to summary
public Rectangle2D handleGetVisualBounds()

Implements sun.font.Decoration.Label.handleGetVisualBounds.

initLocalOrderingback to summary
private void initLocalOrdering(int[] charsLtoV, byte[] levels, int start, int limit)

Initialize graphicCount, also charsLtoV and levels arrays.

isSimpleback to summary
public boolean isSimple()

Implements sun.font.TextLineComponent.isSimple.

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.