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

public Class CustomImporterTabViewModel

extends Object
implements PreferenceTabViewModel
Class Inheritance
All Implemented Interfaces
org.jabref.gui.preferences.PreferenceTabViewModel
Imports
java.io.IOException, java.nio.file.Path, java.util.Collections, .Optional, .Set, java.util.stream.Collectors, javafx.beans.property.ListProperty, .SimpleListProperty, javafx.collections.FXCollections, org.jabref.gui.DialogService, org.jabref.gui.importer.ImporterViewModel, org.jabref.gui.preferences.PreferenceTabViewModel, org.jabref.gui.util.FileDialogConfiguration, org.jabref.logic.importer.ImportException, org.jabref.logic.importer.fileformat.CustomImporter, org.jabref.logic.l10n.Localization, org.jabref.logic.util.StandardFileType, org.jabref.logic.util.io.FileUtil, org.jabref.preferences.PreferencesService, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private final DialogService
private final ListProperty<ImporterViewModel>
private static final Logger
private final PreferencesService
private final ListProperty<ImporterViewModel>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public ListProperty<ImporterViewModel>
private static String

Returns:

class name
pathToClass
(String
base path
basePath
,
Path
path that includes base-path as a prefix
path
)

Converts a path relative to a base-path into a class name.

public void
public ListProperty<ImporterViewModel>
public void
setValues()

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

This method is called when the dialog is opened, or if it is made visible after being hidden.

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
importersback to summary
private final ListProperty<ImporterViewModel> importers
LOGGERback to summary
private static final Logger LOGGER
preferencesback to summary
private final PreferencesService preferences
selectedImportersback to summary
private final ListProperty<ImporterViewModel> selectedImporters

Constructor Detail

CustomImporterTabViewModelback to summary
public CustomImporterTabViewModel(PreferencesService preferences, DialogService dialogService)

Method Detail

addImporterback to summary
public void addImporter()
importersPropertyback to summary
public ListProperty<ImporterViewModel> importersProperty()
pathToClassback to summary
private static String pathToClass(String basePath, Path path)

Converts a path relative to a base-path into a class name.

Parameters
basePath:String

base path

path:Path

path that includes base-path as a prefix

Returns:String

class name

removeSelectedImporterback to summary
public void removeSelectedImporter()
selectedImportersPropertyback to summary
public ListProperty<ImporterViewModel> selectedImportersProperty()
setValuesback to summary
public void setValues()

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

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

This method is called when the dialog is opened, or if it is made visible after being hidden. The tab should update all its values. This is the ONLY PLACE to set values for the fields in the tab. It is ILLEGAL to set values only at construction time, because the dialog will be reused and updated.

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.

Annotations
@Override