org.apache.lucene.search.highlight

Class SpanGradientFormatter

public class SpanGradientFormatter extends GradientFormatter

Formats text with different color intensity depending on the score of the term using the span tag. GradientFormatter uses a bgcolor argument to the font tag which doesn't work in Mozilla, thus this class.

Author: David Spencer dave@searchmorph.com

See Also: GradientFormatter

Constructor Summary
SpanGradientFormatter(float maxScore, String minForegroundColor, String maxForegroundColor, String minBackgroundColor, String maxBackgroundColor)
Method Summary
StringhighlightTerm(String originalText, TokenGroup tokenGroup)

Constructor Detail

SpanGradientFormatter

public SpanGradientFormatter(float maxScore, String minForegroundColor, String maxForegroundColor, String minBackgroundColor, String maxBackgroundColor)

Method Detail

highlightTerm

public String highlightTerm(String originalText, TokenGroup tokenGroup)
Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.