public final class

GraphicComponent

extends Object
implements Decoration.Label TextLineComponent
java.lang.Object
   ↳ sun.font.GraphicComponent

Summary

Constants
float GRAPHIC_LEADING
[Expand]
Inherited Constants
From interface sun.font.TextLineComponent
Public Constructors
GraphicComponent(GraphicAttribute graphic, Decoration decorator, int[] charsLtoV, byte[] levels, int start, int limit, AffineTransform baseTx)
Create a new GraphicComponent.
Public Methods
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.
boolean caretAtOffsetIsValid(int index)
static CoreMetrics createCoreMetrics(GraphicAttribute graphic)
void draw(Graphics2D g2d, float x, float y)
float getAdvance()
float getAdvanceBetween(int start, int limit)
AffineTransform getBaselineTransform()
float getCharAdvance(int index)
Rectangle2D getCharVisualBounds(int index)
float getCharX(int index)
float getCharY(int index)
CoreMetrics getCoreMetrics()
float getItalicAngle()
Rectangle2D getItalicBounds()
void getJustificationInfos(GlyphJustificationInfo[] infos, int infoStart, int charStart, int charLimit)
Return GlyphJustificationInfo objects for the characters between charStart and charLimit, starting at offset infoStart.
int getLineBreakIndex(int start, float width)
Rectangle2D getLogicalBounds()
int getNumCharacters()
int getNumJustificationInfos()
Return the number of justification records this uses.
Shape getOutline(float x, float y)
Rectangle getPixelBounds(FontRenderContext frc, float x, float y)
TextLineComponent getSubset(int start, int limit, int dir)
Return a TextLineComponent for the characters in the range start, limit.
Rectangle2D getVisualBounds()
void handleDraw(Graphics2D g2d, float x, float y)
Rectangle2D handleGetCharVisualBounds(int index)
Shape handleGetOutline(float x, float y)
Rectangle2D handleGetVisualBounds()
boolean isSimple()
String toString()
Returns a string representation of the object.
[Expand]
Inherited Methods
From class java.lang.Object
From interface sun.font.Decoration.Label
From interface sun.font.TextLineComponent

Constants

public static final float GRAPHIC_LEADING

Constant Value: 2.0

Public Constructors

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.

Public Methods

public 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 boolean caretAtOffsetIsValid (int index)

public static CoreMetrics createCoreMetrics (GraphicAttribute graphic)

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

public float getAdvance ()

public float getAdvanceBetween (int start, int limit)

public AffineTransform getBaselineTransform ()

public float getCharAdvance (int index)

public Rectangle2D getCharVisualBounds (int index)

public float getCharX (int index)

public float getCharY (int index)

public CoreMetrics getCoreMetrics ()

public float getItalicAngle ()

public Rectangle2D getItalicBounds ()

public 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 int getLineBreakIndex (int start, float width)

public Rectangle2D getLogicalBounds ()

public int getNumCharacters ()

public int getNumJustificationInfos ()

Return the number of justification records this uses.

public Shape getOutline (float x, float y)

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

public 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 Rectangle2D getVisualBounds ()

public void handleDraw (Graphics2D g2d, float x, float y)

public Rectangle2D handleGetCharVisualBounds (int index)

public Shape handleGetOutline (float x, float y)

public Rectangle2D handleGetVisualBounds ()

public boolean isSimple ()

public String toString ()

Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Returns
  • a string representation of the object.