|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.font.LineMetrics
java.awt.Font.FontLineMetrics
Metrics from a font for layout of characters along a line and layout of set of lines.
| Field Summary | |
(package private) float |
ascent
|
(package private) int |
baselineIndex
|
(package private) float[] |
baselineOffsets
|
(package private) float |
descent
|
(package private) float |
height
|
(package private) float |
leading
|
(package private) int |
numchars
|
(package private) float |
strikethroughOffset
|
(package private) float |
strikethroughThickness
|
(package private) float |
underlineOffset
|
(package private) float |
underlineThickness
|
| Constructor Summary | |
private |
Font.FontLineMetrics()
|
| Method Summary | |
boolean |
equals(Object rhs)
Indicates whether some other object is "equal to" this one. |
float |
getAscent()
Returns the ascent of the text. |
int |
getBaselineIndex()
Returns the baseline index of the text. |
float[] |
getBaselineOffsets()
Returns the baseline offsets of the text, relative to the baseline of the text. |
float |
getDescent()
Returns the descent of the text. |
float |
getHeight()
Returns the height of the text. |
float |
getLeading()
Returns the leading of the text. |
int |
getNumChars()
Returns the number of characters in the text whose metrics are encapsulated by this LineMetrics
object. |
float |
getStrikethroughOffset()
Returns the position of the strike-through line relative to the baseline. |
float |
getStrikethroughThickness()
Returns the thickness of the strike-through line. |
float |
getUnderlineOffset()
Returns the position of the underline relative to the baseline. |
float |
getUnderlineThickness()
Returns the thickness of the underline. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
int numchars
float ascent
float descent
float leading
float height
int baselineIndex
float[] baselineOffsets
float strikethroughOffset
float strikethroughThickness
float underlineOffset
float underlineThickness
| Constructor Detail |
private Font.FontLineMetrics()
| Method Detail |
public final int getNumChars()
LineMetricsLineMetrics
object.
getNumChars in class LineMetricsLineMetrics was created.public final float getAscent()
LineMetrics
getAscent in class LineMetricspublic final float getDescent()
LineMetrics
getDescent in class LineMetricspublic final float getLeading()
LineMetrics
getLeading in class LineMetricspublic final float getHeight()
LineMetrics
getHeight in class LineMetricspublic final int getBaselineIndex()
LineMetricsROMAN_BASELINE,
CENTER_BASELINE,
HANGING_BASELINE.
getBaselineIndex in class LineMetricspublic final float[] getBaselineOffsets()
LineMetricsCENTER_BASELINE then
offsets[HANGING_BASELINE] is usually
negative, offsets[CENTER_BASELINE]
is zero, and offsets[ROMAN_BASELINE]
is usually positive.
getBaselineOffsets in class LineMetricspublic final float getStrikethroughOffset()
LineMetrics
getStrikethroughOffset in class LineMetricspublic final float getStrikethroughThickness()
LineMetrics
getStrikethroughThickness in class LineMetricspublic final float getUnderlineOffset()
LineMetrics
getUnderlineOffset in class LineMetricspublic final float getUnderlineThickness()
LineMetrics
getUnderlineThickness in class LineMetricspublic final boolean equals(Object rhs)
Object
The equals method implements an equivalence relation
on non-null object references:
x, x.equals(x) should return
true.
x and y, x.equals(y)
should return true if and only if
y.equals(x) returns true.
x, y, and z, if
x.equals(y) returns true and
y.equals(z) returns true, then
x.equals(z) should return true.
x and y, multiple invocations of
x.equals(y) consistently return true
or consistently return false, provided no
information used in equals comparisons on the
objects is modified.
x,
x.equals(null) should return false.
The equals method for class Object implements
the most discriminating possible equivalence relation on objects;
that is, for any non-null reference values x and
y, this method returns true if and only
if x and y refer to the same object
(x == y has the value true).
Note that it is generally necessary to override the hashCode method whenever this method is overridden, so as to maintain the general contract for the hashCode method, which states that equal objects must have equal hash codes.
equals in class Objectrhs - the reference object with which to compare.
true if this object is the same as the obj
argument; false otherwise.Object.hashCode(),
Hashtable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||