Verified Owner
Top Constructors Methods
org.jabref.gui.keyboard

public Class CodeAreaKeyBindings

extends Object
Class Inheritance
Imports
javafx.scene.input.KeyCode, .KeyEvent, org.jabref.logic.os.OS, org.jabref.logic.util.strings.StringManipulator, org.jabref.model.util.ResultingStringState, jfx.incubator.scene.control.richtext.CodeArea, .TextPos

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
call(CodeArea codeArea, KeyEvent event, KeyBindingRepository keyBindingRepository)

private static void
pack-priv static void
handleMacCursorMovementShortcuts(CodeArea codeArea, KeyEvent event, boolean isMacOs)

private static TextPos
offsetToTextPos(CodeArea codeArea, int offset)

Converts a flat document offset (as used by StringManipulator) into a paragraph/column based TextPos, by walking the paragraphs of the model.

private static int
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

CodeAreaKeyBindingsback to summary
public CodeAreaKeyBindings()

Method Detail

callback to summary
public static void call(CodeArea codeArea, KeyEvent event, KeyBindingRepository keyBindingRepository)
handleMacCursorMovementShortcutsback to summary
private static void handleMacCursorMovementShortcuts(CodeArea codeArea, KeyEvent event)
handleMacCursorMovementShortcutsback to summary
pack-priv static void handleMacCursorMovementShortcuts(CodeArea codeArea, KeyEvent event, boolean isMacOs)
offsetToTextPosback to summary
private static TextPos offsetToTextPos(CodeArea codeArea, int offset)

Converts a flat document offset (as used by StringManipulator) into a paragraph/column based TextPos, by walking the paragraphs of the model. Assumes a single-character line separator (matches JabRef's BibTeX source usage).

textPosToOffsetback to summary
private static int textPosToOffset(CodeArea codeArea, TextPos pos)

Inverse of offsetToTextPos(CodeArea, int).