public class SpanGradientFormatter extends GradientFormatter
GradientFormatter
highlightBackground, highlightForeground
Constructor and Description |
---|
SpanGradientFormatter(float maxScore,
String minForegroundColor,
String maxForegroundColor,
String minBackgroundColor,
String maxBackgroundColor) |
Modifier and Type | Method and Description |
---|---|
String |
highlightTerm(String originalText,
TokenGroup tokenGroup) |
getBackgroundColorString, getForegroundColorString, hexToInt
public String highlightTerm(String originalText, TokenGroup tokenGroup)
highlightTerm
in interface Formatter
highlightTerm
in class GradientFormatter
originalText
- The section of text being considered for markuptokenGroup
- contains one or several overlapping Tokens along with
their scores and positions.Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.