private void calculateLineHeight(){
  lineHeight=maxAscent=0;
  for (int i=0; i < syntaxScheme.styles.length; i++) {
    Style ss=syntaxScheme.styles[i];
    if (ss != null && ss.font != null) {
      FontMetrics fm=getFontMetrics(ss.font);
      int height=fm.getHeight();
      if (height > lineHeight)       lineHeight=height;
      int ascent=fm.getMaxAscent();
      if (ascent > maxAscent)       maxAscent=ascent;
    }
  }
  Font temp=getFont();
  FontMetrics fm=getFontMetrics(temp);
  int height=fm.getHeight();
  if (height > lineHeight) {
    lineHeight=height;
  }
  int ascent=fm.getMaxAscent();
  if (ascent > maxAscent) {
    maxAscent=ascent;
  }
}

private void calculateLineHeight ( ) { lineHeight = maxAscent = 0 ; for ( int i = 0 ; i < syntaxScheme . styles . length ; i ++ ) { Style ss = syntaxScheme . styles [ i ] ; if ( ss != null && ss . font != null ) { FontMetrics fm = getFontMetrics ( ss . font ) ; int height = fm . getHeight ( ) ; if ( height > lineHeight ) lineHeight = height ; int ascent = fm . getMaxAscent ( ) ; if ( ascent > maxAscent ) maxAscent = ascent ; } } Font temp = getFont ( ) ; FontMetrics fm = getFontMetrics ( temp ) ; int height = fm . getHeight ( ) ; if ( height > lineHeight ) { lineHeight = height ; } int ascent = fm . getMaxAscent ( ) ; if ( ascent > maxAscent ) { maxAscent = ascent ; } }
recalculates the height of a line in this text area and the maximum ascent of all fonts displayed .
