public interface HighlightAttributeValue<T>
HighlightAttributeValue
. All users of such an attribute
must check for both the direct value and the lazy evaluator and use them
accordingly.
If an attribute supports
lazy evaluation the result of getValue
call should have the same
type as if the attribute value were specified directly. For example, the
EditorStyleConstants.Tooltip
attribute supports lazy evaluation
and its value can either be String
or HighlightAttributeValue<String>
.
Modifier and Type | Method and Description |
---|---|
T |
getValue(JTextComponent component,
Document document,
Object attributeKey,
int startOffset,
int endOffset)
Gets value of an attribute.
|
T getValue(JTextComponent component, Document document, Object attributeKey, int startOffset, int endOffset)
component
- The text component, which highlighting layer supplied a highlight
with an attribute using this evaluator as its value.document
- The document, which highlighting layer supplied a highlight
with an attribute using this evaluator as its value.attributeKey
- The key of the attribute.startOffset
- The start offset of the original highlight or any other offset
inside the highlight. Always less than endOffset
.endOffset
- The end offset of the original highlight or any other offset
inside the highlight. Always greater than startOffset
.attributeKey
attribute.