|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.font.TextLine
Nested Class Summary | |
private static class |
TextLine.Function
|
(package private) static class |
TextLine.TextLineMetrics
|
Field Summary | |
private float[] |
fBaselineOffsets
|
private byte[] |
fCharLevels
|
private int[] |
fCharLogicalOrder
|
private char[] |
fChars
|
private int |
fCharsLimit
|
private int |
fCharsStart
|
private int[] |
fCharVisualOrder
|
private sun.awt.font.TextLineComponent[] |
fComponents
|
private int[] |
fComponentVisualOrder
|
private static TextLine.Function |
fgAdvanceF
|
private static TextLine.Function |
fgXPositionF
|
private static TextLine.Function |
fgYPositionF
|
private boolean |
fIsDirectionLTR
|
private TextLine.TextLineMetrics |
fMetrics
|
Constructor Summary | |
TextLine(sun.awt.font.TextLineComponent[] components,
float[] baselineOffsets,
char[] chars,
int charsStart,
int charsLimit,
int[] charLogicalOrder,
byte[] charLevels,
boolean isDirectionLTR)
|
Method Summary | |
(package private) static boolean |
advanceToFirstFont(AttributedCharacterIterator aci)
When this returns, the ACI's current position will be at the start of the first run which does NOT contain a GraphicAttribute. |
private float |
applyFunctionAtIndex(int logicalIndex,
TextLine.Function f)
|
boolean |
caretAtOffsetIsValid(int offset)
|
int |
characterCount()
|
private void |
checkCtorArgs()
|
private static int[] |
computeComponentOrder(sun.awt.font.TextLineComponent[] components,
int[] charsLtoV)
Compute the components order from the given components array and logical-to-visual character mapping. |
static sun.awt.font.TextLineComponent[] |
createComponentsOnRun(int runStart,
int runLimit,
char[] chars,
int[] charsLtoV,
byte[] levels,
sun.awt.font.TextLabelFactory factory,
Font font,
LineMetrics lm,
FontRenderContext frc,
sun.awt.font.Decoration decorator,
sun.awt.font.TextLineComponent[] components,
int numComponents)
Returns an array in logical order of the TextLineComponents on the text in the given range, with the given attributes. |
static TextLine |
createLineFromText(char[] chars,
StyledParagraph styledParagraph,
sun.awt.font.TextLabelFactory factory,
boolean isDirectionLTR,
float[] baselineOffsets)
Create a TextLine from the Font and character data over the range. |
void |
draw(Graphics2D g2,
float x,
float y)
|
private static sun.awt.font.TextLineComponent[] |
expandArray(sun.awt.font.TextLineComponent[] orig)
|
static TextLine |
fastCreateTextLine(FontRenderContext frc,
char[] chars,
Font font,
LineMetrics lm,
Map attributes)
Create a TextLine from the text. |
private static int |
firstVisualChunk(int[] order,
byte[] direction,
int start,
int limit)
|
static float |
getAdvanceBetween(sun.awt.font.TextLineComponent[] components,
int start,
int limit)
|
Rectangle2D |
getBounds()
|
float |
getCharAdvance(int logicalIndex)
|
float |
getCharAngle(int logicalIndex)
|
float |
getCharAscent(int logicalIndex)
|
Rectangle2D |
getCharBounds(int logicalIndex)
|
float |
getCharDescent(int logicalIndex)
|
byte |
getCharLevel(int logicalIndex)
|
float |
getCharLinePosition(int logicalIndex)
|
int |
getCharType(int logicalIndex)
|
float |
getCharXPosition(int logicalIndex)
|
float |
getCharYPosition(int logicalIndex)
|
static sun.awt.font.TextLineComponent[] |
getComponents(StyledParagraph styledParagraph,
char[] chars,
int textStart,
int textLimit,
int[] charsLtoV,
byte[] levels,
sun.awt.font.TextLabelFactory factory)
Returns an array (in logical order) of the TextLineComponents representing the text. |
private float |
getComponentShift(int index)
|
(package private) static Font |
getFontAtCurrentPos(AttributedCharacterIterator aci)
|
TextLine |
getJustifiedLine(float justificationWidth,
float justifyRatio,
int justStart,
int justLimit)
|
(package private) static float |
getJustifyRatio(Map attributes)
Utility method for getting justification ratio from attributes. |
private LineMetrics |
getLineMetricsAt(int logicalIndex)
|
TextLine.TextLineMetrics |
getMetrics()
|
(package private) static float[] |
getNormalizedOffsets(float[] baselineOffsets,
byte baseline)
|
Shape |
getOutline(AffineTransform tx)
|
int |
hashCode()
Returns a hash code value for the object. |
boolean |
isCharLTR(int logicalIndex)
|
boolean |
isCharSpace(int logicalIndex)
|
boolean |
isCharWhitespace(int logicalIndex)
|
boolean |
isDirectionLTR()
|
int |
logicalToVisual(int logicalIndex)
|
static TextLine |
standardCreateTextLine(FontRenderContext frc,
AttributedCharacterIterator text,
char[] chars,
float[] baselineOffsets)
Create a TextLine from the text. |
String |
toString()
Returns a string representation of the object. |
int |
visualToLogical(int visualIndex)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private sun.awt.font.TextLineComponent[] fComponents
private float[] fBaselineOffsets
private int[] fComponentVisualOrder
private char[] fChars
private int fCharsStart
private int fCharsLimit
private int[] fCharVisualOrder
private int[] fCharLogicalOrder
private byte[] fCharLevels
private boolean fIsDirectionLTR
private TextLine.TextLineMetrics fMetrics
private static TextLine.Function fgAdvanceF
private static TextLine.Function fgXPositionF
private static TextLine.Function fgYPositionF
Constructor Detail |
public TextLine(sun.awt.font.TextLineComponent[] components, float[] baselineOffsets, char[] chars, int charsStart, int charsLimit, int[] charLogicalOrder, byte[] charLevels, boolean isDirectionLTR)
Method Detail |
private void checkCtorArgs()
public int characterCount()
public boolean isDirectionLTR()
public TextLine.TextLineMetrics getMetrics()
public int visualToLogical(int visualIndex)
public int logicalToVisual(int logicalIndex)
public byte getCharLevel(int logicalIndex)
public boolean isCharLTR(int logicalIndex)
public int getCharType(int logicalIndex)
public boolean isCharSpace(int logicalIndex)
public boolean isCharWhitespace(int logicalIndex)
public float getCharAngle(int logicalIndex)
private LineMetrics getLineMetricsAt(int logicalIndex)
public float getCharAscent(int logicalIndex)
public float getCharDescent(int logicalIndex)
private float applyFunctionAtIndex(int logicalIndex, TextLine.Function f)
public float getCharAdvance(int logicalIndex)
public float getCharXPosition(int logicalIndex)
public float getCharYPosition(int logicalIndex)
public float getCharLinePosition(int logicalIndex)
public boolean caretAtOffsetIsValid(int offset)
public Rectangle2D getCharBounds(int logicalIndex)
private float getComponentShift(int index)
public void draw(Graphics2D g2, float x, float y)
public Rectangle2D getBounds()
public Shape getOutline(AffineTransform tx)
public int hashCode()
Object
java.util.Hashtable
.
The general contract of hashCode
is:
hashCode
method on each of
the two objects must produce the same integer result.
Object.equals(java.lang.Object)
method, then calling the hashCode method on each of the
two objects must produce distinct integer results. However, the
programmer should be aware that producing distinct integer results
for unequal objects may improve the performance of hashtables.
As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)
hashCode
in class Object
Object.equals(java.lang.Object)
,
Hashtable
public String toString()
Object
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())
toString
in class Object
public static TextLine fastCreateTextLine(FontRenderContext frc, char[] chars, Font font, LineMetrics lm, Map attributes)
private static sun.awt.font.TextLineComponent[] expandArray(sun.awt.font.TextLineComponent[] orig)
public static sun.awt.font.TextLineComponent[] createComponentsOnRun(int runStart, int runLimit, char[] chars, int[] charsLtoV, byte[] levels, sun.awt.font.TextLabelFactory factory, Font font, LineMetrics lm, FontRenderContext frc, sun.awt.font.Decoration decorator, sun.awt.font.TextLineComponent[] components, int numComponents)
public static sun.awt.font.TextLineComponent[] getComponents(StyledParagraph styledParagraph, char[] chars, int textStart, int textLimit, int[] charsLtoV, byte[] levels, sun.awt.font.TextLabelFactory factory)
public static TextLine createLineFromText(char[] chars, StyledParagraph styledParagraph, sun.awt.font.TextLabelFactory factory, boolean isDirectionLTR, float[] baselineOffsets)
private static int[] computeComponentOrder(sun.awt.font.TextLineComponent[] components, int[] charsLtoV)
public static TextLine standardCreateTextLine(FontRenderContext frc, AttributedCharacterIterator text, char[] chars, float[] baselineOffsets)
static boolean advanceToFirstFont(AttributedCharacterIterator aci)
static float[] getNormalizedOffsets(float[] baselineOffsets, byte baseline)
static Font getFontAtCurrentPos(AttributedCharacterIterator aci)
static float getJustifyRatio(Map attributes)
private static int firstVisualChunk(int[] order, byte[] direction, int start, int limit)
public TextLine getJustifiedLine(float justificationWidth, float justifyRatio, int justStart, int justLimit)
public static float getAdvanceBetween(sun.awt.font.TextLineComponent[] components, int start, int limit)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |