ScrollOnFocusListener

private class ScrollOnFocusListener<S : Scheme>(val focusManager: KeyboardFocusManager, val editor: SchemeEditor<S>) : PropertyChangeListener, Disposable(source)

Scrolls to the focused element within the editor, registering this listener with the focusManager, and automatically disposing itself when the editor is disposed.

Constructors

Link copied to clipboard
constructor(focusManager: KeyboardFocusManager, editor: SchemeEditor<S>)

Properties

Link copied to clipboard
private val editor: SchemeEditor<S>
Link copied to clipboard
private val focusManager: KeyboardFocusManager

Functions

Link copied to clipboard
open override fun dispose()

Removes this listener from the focusManager.

Link copied to clipboard
fun install()

Installs this listener with the focusManager.

Link copied to clipboard
open override fun propertyChange(event: PropertyChangeEvent)

Scrolls to the newly focused element if that element is in the editor.