SwingScrollbarAdapter

Bridges a top-origin Swing scrollbar to the shared terminal viewport.

The scrollbar retains pixel-scale coordinates, allowing its thumb to move continuously during direct manipulation. Each thumb position maps to an integer top row, which is applied immediately with no easing lag. Terminal publications do not overwrite the host-owned thumb coordinate during a drag, and release is already row-aligned.

Parameters

scrollbar

host-owned vertical scrollbar.

Constructors

Link copied to clipboard
constructor(scrollbar: JScrollBar)

Functions

Link copied to clipboard
fun attach(viewportScroller: SwingScrollbarScroller)

Attaches the terminal controlled by this adapter.

Link copied to clipboard
open override fun viewportChanged(historySize: Int, scrollbackOffset: Double, renderOffset: Int, visibleRows: Int, requestedRows: Int)

Reports the latest terminal-native viewport coordinates.

Link copied to clipboard

Reports the full viewport snapshot, including pixel scroll range.