|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.font.LineMetrics
The LineMetrics
class allows access to the
metrics needed to layout characters along a line
and to layout of a set of lines. A LineMetrics
object encapsulates the measurement information associated
with a run of text.
Fonts can have different metrics for different ranges of
characters. The getLineMetrics
methods of
Font
take some text as an argument
and return a LineMetrics
object describing the
metrics of the initial number of characters in that text, as
returned by getNumChars()
.
Constructor Summary | |
LineMetrics()
|
Method Summary | |
abstract float |
getAscent()
Returns the ascent of the text. |
abstract int |
getBaselineIndex()
Returns the baseline index of the text. |
abstract float[] |
getBaselineOffsets()
Returns the baseline offsets of the text, relative to the baseline of the text. |
abstract float |
getDescent()
Returns the descent of the text. |
abstract float |
getHeight()
Returns the height of the text. |
abstract float |
getLeading()
Returns the leading of the text. |
abstract int |
getNumChars()
Returns the number of characters in the text whose metrics are encapsulated by this LineMetrics
object. |
abstract float |
getStrikethroughOffset()
Returns the position of the strike-through line relative to the baseline. |
abstract float |
getStrikethroughThickness()
Returns the thickness of the strike-through line. |
abstract float |
getUnderlineOffset()
Returns the position of the underline relative to the baseline. |
abstract float |
getUnderlineThickness()
Returns the thickness of the underline. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LineMetrics()
Method Detail |
public abstract int getNumChars()
LineMetrics
object.LineMetrics
was created.public abstract float getAscent()
public abstract float getDescent()
public abstract float getLeading()
public abstract float getHeight()
public abstract int getBaselineIndex()
ROMAN_BASELINE
,
CENTER_BASELINE
,
HANGING_BASELINE
.public abstract float[] getBaselineOffsets()
CENTER_BASELINE
then
offsets[HANGING_BASELINE]
is usually
negative, offsets[CENTER_BASELINE]
is zero, and offsets[ROMAN_BASELINE]
is usually positive.public abstract float getStrikethroughOffset()
public abstract float getStrikethroughThickness()
public abstract float getUnderlineOffset()
public abstract float getUnderlineThickness()
|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Java, Java 2D, and JDBC are trademarks or registered trademarks of Oracle and/or its affiliates, in the US and other countries.
Copyright © 1995, 2010 Oracle and/or its affiliates. All rights reserved.