KetraTerm
API · DevelopmentAll versions

SwingHyperlinkDetectionRequest

class SwingHyperlinkDetectionRequest(lineTexts: List<String>, firstAbsoluteRows: LongArray, lastAbsoluteRows: LongArray = firstAbsoluteRows, val context: SwingHyperlinkDetectionContext = SwingHyperlinkDetectionContext.INDEPENDENT_LINE, val bindingEpoch: Long = 0, val sourceEpoch: Long = 0, val providerEpoch: Long = 0, val analysisEpoch: Long = 0, val firstRetainedRow: Long = 0, firstLineIds: LongArray = firstAbsoluteRows)

Owned immutable logical text and absolute row anchors for one discovery batch.

Soft-wrapped physical rows form a logical line, with one appended newline. UTF-16 offsets are local to each logical line, while absolute row anchors survive append/eviction within a source epoch. The arrays/list are defensively copied. Empty requests are valid. Binding epochs separate resets/rebindings; source epochs separate replacement, reflow and buffer changes; provider epochs separate configuration/instance changes.

Constructors

Link copied to clipboard
constructor(lineTexts: List<String>, firstAbsoluteRows: LongArray, lastAbsoluteRows: LongArray = firstAbsoluteRows, context: SwingHyperlinkDetectionContext = SwingHyperlinkDetectionContext.INDEPENDENT_LINE, bindingEpoch: Long = 0, sourceEpoch: Long = 0, providerEpoch: Long = 0, analysisEpoch: Long = 0, firstRetainedRow: Long = 0, firstLineIds: LongArray = firstAbsoluteRows)

Properties

Link copied to clipboard

Changes when earlier content requires ordered state reconstruction.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Absolute retained boundary; eviction alone does not restart ordered provider state.

Link copied to clipboard

Number of logical lines in this batch.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun hyperlink(lineIndex: Int, startOffset: Int, endOffset: Int, action: SwingHyperlinkAction, validationStartOffset: Int = 0, validationEndOffset: Int = Int.MAX_VALUE, uri: String? = null, presentation: SwingHyperlinkPresentation = SwingHyperlinkPresentation.DEFAULT, activation: SwingHyperlinkActivation = SwingHyperlinkActivation.MODIFIER): SwingHyperlink

Builds a single-line occurrence with a conservative context dependency. Explicit validation bounds must contain the highlight and its delimiters. Ordered defaults depend on the whole supplied batch; specify a narrower dependency only when the action is genuinely independent of surrounding text. The retained owner validates source/validation offsets against its snapshots.

Link copied to clipboard

First physical row of the logical line, in this source epoch's absolute coordinates.

Link copied to clipboard
fun lineFirstId(index: Int): Long

Stable source line identity for host-owned historical output metadata.

Link copied to clipboard

Last physical row of that same logical line, inclusive.

Link copied to clipboard
fun lineText(index: Int): String

Logical text, including the trailing newline.

Link copied to clipboard
fun range(startLine: Int, startOffset: Int, endLine: Int, endOffset: Int): SwingHyperlinkTextRange

Builds an absolute range from line-local UTF-16 offsets.