Verified Owner
Top Fields Constructors Methods
org.jabref.gui.preferences.ocr

public Class OcrTabViewModel

extends Object
implements PreferenceTabViewModel
Class Inheritance
All Implemented Interfaces
org.jabref.gui.preferences.PreferenceTabViewModel
Imports
java.io.IOException, java.nio.file.Path, java.util.ArrayList, .List, .Optional, java.util.concurrent.TimeUnit, javafx.beans.property.ListProperty, .ObjectProperty, .ReadOnlyListProperty, .SimpleListProperty, .SimpleObjectProperty, .SimpleStringProperty, .StringProperty, javafx.collections.FXCollections, .ObservableList, org.jabref.gui.DialogService, org.jabref.gui.preferences.PreferenceTabViewModel, org.jabref.gui.util.FileDialogConfiguration, org.jabref.logic.FilePreferences, org.jabref.logic.l10n.Localization, org.jabref.logic.ocr.EngineSelection, .OcrLanguage, .OcrPreferences, .PagesWithTextHandling, org.jabref.logic.util.BackgroundTask, .HeadlessExecutorService, .StreamGobbler, .TaskExecutor, org.jabref.logic.util.strings.StringUtil, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private static final int
private static final List<String>
private static final List<String>
private final DialogService
private final ListProperty<EngineSelection>
private final FilePreferences
private boolean
private static final Logger
private final StringProperty
private final ListProperty<OcrLanguage>
private final OcrPreferences
private final ListProperty<PagesWithTextHandling>
private final ObjectProperty<EngineSelection>
private final ObservableList<OcrLanguage>
private final ObjectProperty<PagesWithTextHandling>
private final TaskExecutor

Constructor Summary

AccessConstructor and Description
public
OcrTabViewModel(DialogService dialogService, FilePreferences filePreferences, OcrPreferences ocrPreferences, TaskExecutor taskExecutor)

Method Summary

Modifier and TypeMethod and Description
public Optional<String>
public void
public void
public ReadOnlyListProperty<EngineSelection>
private boolean
public StringProperty
public ReadOnlyListProperty<OcrLanguage>
public ReadOnlyListProperty<PagesWithTextHandling>
public ObjectProperty<EngineSelection>
public ObservableList<OcrLanguage>
public ObjectProperty<PagesWithTextHandling>
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

CHECKING_TIMEOUTback to summary
private static final int CHECKING_TIMEOUT
DEFAULT_DOCLING_PATHSback to summary
private static final List<String> DEFAULT_DOCLING_PATHS
DEFAULT_OCRMYPDF_PATHSback to summary
private static final List<String> DEFAULT_OCRMYPDF_PATHS
dialogServiceback to summary
private final DialogService dialogService
engineOptionsback to summary
private final ListProperty<EngineSelection> engineOptions
filePreferencesback to summary
private final FilePreferences filePreferences
isInitializingback to summary
private boolean isInitializing
LOGGERback to summary
private static final Logger LOGGER
ocrEnginePathback to summary
private final StringProperty ocrEnginePath
ocrLanguageOptionsback to summary
private final ListProperty<OcrLanguage> ocrLanguageOptions
ocrPreferencesback to summary
private final OcrPreferences ocrPreferences
pagesHaveTextOptionsback to summary
private final ListProperty<PagesWithTextHandling> pagesHaveTextOptions
selectedEngineback to summary
private final ObjectProperty<EngineSelection> selectedEngine
selectedOcrLanguagesback to summary
private final ObservableList<OcrLanguage> selectedOcrLanguages
selectedPagesHaveTextback to summary
private final ObjectProperty<PagesWithTextHandling> selectedPagesHaveText
taskExecutorback to summary
private final TaskExecutor taskExecutor

Constructor Detail

OcrTabViewModelback to summary
public OcrTabViewModel(DialogService dialogService, FilePreferences filePreferences, OcrPreferences ocrPreferences, TaskExecutor taskExecutor)

Method Detail

autoDetectDefaultEnginePathback to summary
public Optional<String> autoDetectDefaultEnginePath(EngineSelection engineToDetect)
autoDetectEnginePathback to summary
public void autoDetectEnginePath()
browseEnginePathback to summary
public void browseEnginePath()
engineOptionsback to summary
public ReadOnlyListProperty<EngineSelection> engineOptions()
enginePathExistsback to summary
private boolean enginePathExists(String path)
ocrEnginePathPropertyback to summary
public StringProperty ocrEnginePathProperty()
ocrLanguageOptionsPropertyback to summary
public ReadOnlyListProperty<OcrLanguage> ocrLanguageOptionsProperty()
pagesHaveTextOptionsback to summary
public ReadOnlyListProperty<PagesWithTextHandling> pagesHaveTextOptions()
selectedEnginePropertyback to summary
public ObjectProperty<EngineSelection> selectedEngineProperty()
selectedOcrLanguagesPropertyback to summary
public ObservableList<OcrLanguage> selectedOcrLanguagesProperty()
selectedPagesHaveTextPropertyback to summary
public ObjectProperty<PagesWithTextHandling> selectedPagesHaveTextProperty()
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