|
org.netbeans.modules.editor.lib2/1 1.43.1 10 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HighlightAttributeValue<T>
Lazy evaluator for attribute values. It is up to each particular attribute
to declare if its values can be lazily evaluated. Attributes that declare
themselvs as supporting lazy evaluation can have their values specified either
directly or through 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>
.
Method Summary | |
---|---|
T |
getValue(JTextComponent component,
Document document,
Object attributeKey,
int startOffset,
int endOffset)
Gets value of an attribute. |
Method Detail |
---|
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.
|
org.netbeans.modules.editor.lib2/1 1.43.1 10 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |