Class HighlighterManager
java.lang.Object
ai.attackframework.tools.burp.ui.text.HighlighterManager
Manages highlight tags on a
JTextComponent.
Contract
apply(List)adds highlights for the given half-open ranges and remembers the tags.clear()removes previously added tags; safe to call repeatedly.- Best-effort semantics: invalid offsets during rapid edits are ignored.
This class does not perform any EDT enforcement; callers should update from the EDT.
-
Constructor Summary
ConstructorsConstructorDescriptionHighlighterManager(JTextComponent component, Highlighter.HighlightPainter painter) -
Method Summary
-
Constructor Details
-
HighlighterManager
- Parameters:
component- the target text component (required)painter- the painter to use for new highlights (required)- Throws:
NullPointerException- if any required argument isnull
-
-
Method Details
-
apply
Apply highlights for the given ranges.- Parameters:
ranges- list of[start, end]pairs in component coordinates- Returns:
- list of created highlight tags (useful if the caller wants its own bookkeeping)
-
clear
public void clear()Remove previously created highlights. Safe to call multiple times.
-