Java Platform 1.2

java.awt.font
Class LineMetrics

java.lang.Object
  |
  +--java.awt.font.LineMetrics

public abstract class LineMetrics
extends Object


Constructor Summary
LineMetrics()
           
 
Method Summary
abstract  float getAscent()
          Returns the ascent of the Font.
abstract  int getBaselineIndex()
          Returns the current baseline index used for laying out the text of the Font.
abstract  float[] getBaselineOffsets()
          Returns the baseline offsets as defined in the Font, relative to y=0.
abstract  float getDescent()
          Returns the descent of the Font.
abstract  float getHeight()
          Returns the height of the Font.
abstract  float getLeading()
          Returns the leading of the Font.
abstract  int getNumChars()
          Returns the number of characters in the Font.
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 descender.
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

LineMetrics

public LineMetrics()
Method Detail

getNumChars

public abstract int getNumChars()
Returns the number of characters in the Font.
Returns:
the number of characters in the Font.

getAscent

public abstract float getAscent()
Returns the ascent of the Font. The ascent of a Font is the distance from the baseline to the ascender line. The ascent usually represents the the height of the capital letters of the Font.
Returns:
the ascent of the Font.

getDescent

public abstract float getDescent()
Returns the descent of the Font. The descent of a Font is the distance from the baseline to the descender line. The characters of the Font usually do not extend below the descender line.
Returns:
the descent of the Font.

getLeading

public abstract float getLeading()
Returns the leading of the Font. The leading of a Font is the recommended distance from the bottom of the descender line to the top of next line.
Returns:
the leading of the Font.

getHeight

public abstract float getHeight()
Returns the height of the Font. The height is equal to the sum of the ascent, the descent and the leading.
Returns:
the height of the Font.

getBaselineIndex

public abstract int getBaselineIndex()
Returns the current baseline index used for laying out the text of the Font.
Returns:
the baseline index of the Font.

getBaselineOffsets

public abstract float[] getBaselineOffsets()
Returns the baseline offsets as defined in the Font, relative to y=0.
Returns:
the baseline offsets of the Font.

getStrikethroughOffset

public abstract float getStrikethroughOffset()
Returns the position of the strike through line relative to the baseline.
Returns:
the position of the strike through.

getStrikethroughThickness

public abstract float getStrikethroughThickness()
Returns the thickness of the strike through line.
Returns:
the thickness of the strike through line.

getUnderlineOffset

public abstract float getUnderlineOffset()
Returns the position of the underline relative to the descender.
Returns:
the position of the underline.

getUnderlineThickness

public abstract float getUnderlineThickness()
Returns the thickness of the underline.
Returns:
the thickness of the underline.

Java Platform 1.2

Submit a bug or feature Version 1.2 of Java Platform API Specification
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.