public class SpanGradientFormatter extends GradientFormatter
GradientFormatterhighlightBackground, 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, hexToIntpublic String highlightTerm(String originalText, TokenGroup tokenGroup)
highlightTerm in interface FormatterhighlightTerm in class GradientFormatteroriginalText - The section of text being considered for markuptokenGroup - contains one or several overlapping Tokens along with
their scores and positions.