KetraTerm
API · DevelopmentAll versions

TerminalSelectionRange

Immutable selection range in one component binding and terminal layout.

Create ranges through SwingTerminal.createSelectionRange. Retain a range to restore it through SwingTerminal.setSelection. A range does not retain the component or session. It describes a region, not a frozen text snapshot.

Rows are absolute physical rows, including scrollback. A frame's first row is discardedCount + historySize - scrollbackOffset. Columns are half-open cell edges in 0..columns. Direction follows the anchor and caret. Linear columns follow stored text order; block columns follow visual order. Painting and copying include complete wide cells and grapheme clusters. Stored edges remain unchanged when they intersect a wide cell.

Scrolling preserves coordinates. Reflow, history replacement, binding changes, and observed buffer switches invalidate ranges. Evicted endpoints prevent restoration. Ordinary cell edits change the text within the selected region.

Properties

Link copied to clipboard

fixed absolute row.

Link copied to clipboard

fixed cell edge.

Link copied to clipboard

terminal buffer that contains the range.

Link copied to clipboard

moving absolute row.

Link copied to clipboard

moving cell edge.

Link copied to clipboard

whether each row uses the same visual column interval.

Link copied to clipboard

Whether the range selects no cells or row boundaries.