JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.page
Class LineMetricsBase

java.lang.Object
  |
  +--java.awt.font.LineMetrics
        |
        +--com.klg.jclass.page.LineMetricsBase

public class LineMetricsBase
extends LineMetrics

Base implementation of LineMetrics to be extended.


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

Field Detail

fontMetrics

protected FontMetrics fontMetrics

string

protected String string
Constructor Detail

LineMetricsBase

public LineMetricsBase(FontMetrics fontMetrics,
                       String string)
Constructor

Method Detail

getNumChars

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

Specified by:
getNumChars in class LineMetrics
Returns:
the number of characters in the Font.

getAscent

public 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.

Specified by:
getAscent in class LineMetrics
Returns:
the ascent of the Font.

getDescent

public 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.

Specified by:
getDescent in class LineMetrics
Returns:
the descent of the Font.

getLeading

public 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.

Specified by:
getLeading in class LineMetrics
Returns:
the leading of the Font.

getHeight

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

Specified by:
getHeight in class LineMetrics
Returns:
the height of the Font.

getBaselineIndex

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

Specified by:
getBaselineIndex in class LineMetrics
Returns:
the baseline index of the Font.

getBaselineOffsets

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

Specified by:
getBaselineOffsets in class LineMetrics
Returns:
the baseline offsets of the Font.

getStrikethroughOffset

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

Specified by:
getStrikethroughOffset in class LineMetrics
Returns:
the position of the strike through.

getStrikethroughThickness

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

Specified by:
getStrikethroughThickness in class LineMetrics
Returns:
the thickness of the strike through line.

getUnderlineOffset

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

Specified by:
getUnderlineOffset in class LineMetrics
Returns:
the position of the underline.

getUnderlineThickness

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

Specified by:
getUnderlineThickness in class LineMetrics
Returns:
the thickness of the underline.

Copyright © 2004 Quest Software Inc..
All rights reserved.