< prev index next >
src/java.desktop/share/classes/java/awt/font/LineMetrics.java
Print this page
*** 24,57 ****
*/
package java.awt.font;
/**
! * The <code>LineMetrics</code> class allows access to the
* metrics needed to layout characters along a line
! * and to layout of a set of lines. A <code>LineMetrics</code>
* object encapsulates the measurement information associated
* with a run of text.
* <p>
* Fonts can have different metrics for different ranges of
! * characters. The <code>getLineMetrics</code> methods of
* {@link java.awt.Font Font} take some text as an argument
! * and return a <code>LineMetrics</code> object describing the
* metrics of the initial number of characters in that text, as
* returned by {@link #getNumChars}.
*/
public abstract class LineMetrics {
/**
! * Returns the number of characters (<code>char</code> values) in the text whose
! * metrics are encapsulated by this <code>LineMetrics</code>
* object.
! * @return the number of characters (<code>char</code> values) in the text with which
! * this <code>LineMetrics</code> was created.
*/
public abstract int getNumChars();
/**
* Returns the ascent of the text. The ascent
--- 24,57 ----
*/
package java.awt.font;
/**
! * The {@code LineMetrics} class allows access to the
* metrics needed to layout characters along a line
! * and to layout of a set of lines. A {@code LineMetrics}
* object encapsulates the measurement information associated
* with a run of text.
* <p>
* Fonts can have different metrics for different ranges of
! * characters. The {@code getLineMetrics} methods of
* {@link java.awt.Font Font} take some text as an argument
! * and return a {@code LineMetrics} object describing the
* metrics of the initial number of characters in that text, as
* returned by {@link #getNumChars}.
*/
public abstract class LineMetrics {
/**
! * Returns the number of characters ({@code char} values) in the text whose
! * metrics are encapsulated by this {@code LineMetrics}
* object.
! * @return the number of characters ({@code char} values) in the text with which
! * this {@code LineMetrics} was created.
*/
public abstract int getNumChars();
/**
* Returns the ascent of the text. The ascent
*** 104,117 ****
/**
* Returns the baseline offsets of the text,
* relative to the baseline of the text. The
* offsets are indexed by baseline index. For
* example, if the baseline index is
! * <code>CENTER_BASELINE</code> then
! * <code>offsets[HANGING_BASELINE]</code> is usually
! * negative, <code>offsets[CENTER_BASELINE]</code>
! * is zero, and <code>offsets[ROMAN_BASELINE]</code>
* is usually positive.
* @return the baseline offsets of the text.
*/
public abstract float[] getBaselineOffsets();
--- 104,117 ----
/**
* Returns the baseline offsets of the text,
* relative to the baseline of the text. The
* offsets are indexed by baseline index. For
* example, if the baseline index is
! * {@code CENTER_BASELINE} then
! * {@code offsets[HANGING_BASELINE]} is usually
! * negative, {@code offsets[CENTER_BASELINE]}
! * is zero, and {@code offsets[ROMAN_BASELINE]}
* is usually positive.
* @return the baseline offsets of the text.
*/
public abstract float[] getBaselineOffsets();
< prev index next >