Top Fields Constructors Methods
org.jabref.gui.preferences.keybindings

public Class KeyBindingsTabViewModel

extends Object
implements PreferenceTabViewModel
Class Inheritance
All Implemented Interfaces
org.jabref.gui.preferences.PreferenceTabViewModel
Imports
java.util.ArrayList, .List, .Objects, .Optional, javafx.beans.property.ListProperty, .ObjectProperty, .SimpleListProperty, .SimpleObjectProperty, javafx.collections.FXCollections, javafx.scene.control.Alert, .ButtonBar, .ButtonType, javafx.scene.input.KeyEvent, org.jabref.gui.DialogService, org.jabref.gui.keyboard.KeyBindingCategory, .KeyBindingRepository, org.jabref.gui.preferences.PreferenceTabViewModel, org.jabref.gui.preferences.keybindings.presets.BashKeyBindingPreset, .KeyBindingPreset, .NewEntryBindingPreset, org.jabref.gui.util.OptionalObjectProperty, org.jabref.logic.l10n.Localization, org.jabref.preferences.PreferencesService

Field Summary

Modifier and TypeField and Description
private final DialogService
private final ListProperty<KeyBindingPreset>
private final KeyBindingRepository
private final PreferencesService
private final List<String>
private final ObjectProperty<KeyBindingViewModel>
private final OptionalObjectProperty<KeyBindingViewModel>

Constructor Summary

AccessConstructor and Description
public
KeyBindingsTabViewModel(KeyBindingRepository keyBindingRepository, DialogService dialogService, PreferencesService preferences)

Method Summary

Modifier and TypeMethod and Description
public KeyBindingRepository
public List<String>
getRestartWarnings()

Overrides default org.jabref.gui.preferences.PreferenceTabViewModel.getRestartWarnings.

This method should be called after storing the preferences, to collect the properties, which require a restart of JabRef to load

public ListProperty<KeyBindingPreset>
public void
public void
public ObjectProperty<KeyBindingViewModel>
public OptionalObjectProperty<KeyBindingViewModel>
public void
public void
setValues()

Implements org.jabref.gui.preferences.PreferenceTabViewModel.setValues.

Read all keybindings from the keybinding repository and create table keybinding models for them

public void
storeSettings()

Implements org.jabref.gui.preferences.PreferenceTabViewModel.storeSettings.

This method is called when the user presses OK in the Preferences dialog.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dialogServiceback to summary
private final DialogService dialogService
keyBindingPresetsback to summary
private final ListProperty<KeyBindingPreset> keyBindingPresets
keyBindingRepositoryback to summary
private final KeyBindingRepository keyBindingRepository
preferencesback to summary
private final PreferencesService preferences
restartWarningback to summary
private final List<String> restartWarning
rootKeyBindingback to summary
private final ObjectProperty<KeyBindingViewModel> rootKeyBinding
selectedKeyBindingback to summary
private final OptionalObjectProperty<KeyBindingViewModel> selectedKeyBinding

Constructor Detail

KeyBindingsTabViewModelback to summary
public KeyBindingsTabViewModel(KeyBindingRepository keyBindingRepository, DialogService dialogService, PreferencesService preferences)

Method Detail

getKeyBindingRepositoryback to summary
public KeyBindingRepository getKeyBindingRepository()
getRestartWarningsback to summary
public List<String> getRestartWarnings()

Overrides default org.jabref.gui.preferences.PreferenceTabViewModel.getRestartWarnings.

Doc from org.jabref.gui.preferences.PreferenceTabViewModel.getRestartWarnings.

This method should be called after storing the preferences, to collect the properties, which require a restart of JabRef to load

Returns:List<String>

The messages for the changed properties (e. g. "Changed language: English")

Annotations
@Override
keyBindingPresetsback to summary
public ListProperty<KeyBindingPreset> keyBindingPresets()
loadPresetback to summary
public void loadPreset(KeyBindingPreset preset)
resetToDefaultback to summary
public void resetToDefault()
rootKeyBindingPropertyback to summary
public ObjectProperty<KeyBindingViewModel> rootKeyBindingProperty()
selectedKeyBindingPropertyback to summary
public OptionalObjectProperty<KeyBindingViewModel> selectedKeyBindingProperty()
setNewBindingForCurrentback to summary
public void setNewBindingForCurrent(KeyEvent event)
setValuesback to summary
public void setValues()

Implements org.jabref.gui.preferences.PreferenceTabViewModel.setValues.

Read all keybindings from the keybinding repository and create table keybinding models for them

Annotations
@Override
storeSettingsback to summary
public void storeSettings()

Implements org.jabref.gui.preferences.PreferenceTabViewModel.storeSettings.

Doc from org.jabref.gui.preferences.PreferenceTabViewModel.storeSettings.

This method is called when the user presses OK in the Preferences dialog. Implementing classes must make sure all settings presented get stored in PreferencesService.