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

public Class ExternalFileTypesTabViewModel

extends Object
implements PreferenceTabViewModel
Class Inheritance
All Implemented Interfaces
org.jabref.gui.preferences.PreferenceTabViewModel
Imports
java.util.Comparator, .HashSet, .Set, javafx.collections.FXCollections, .ObservableList, org.jabref.gui.DialogService, org.jabref.gui.externalfiletype.ExternalFileType, .ExternalFileTypes, org.jabref.gui.frame.ExternalApplicationsPreferences, org.jabref.gui.preferences.PreferenceTabViewModel, org.jabref.logic.l10n.Localization, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private final DialogService
private final ExternalApplicationsPreferences
private final ObservableList<ExternalFileTypeItemViewModel>
private static final Logger

Constructor Summary

AccessConstructor and Description
public
ExternalFileTypesTabViewModel(ExternalApplicationsPreferences externalApplicationsPreferences, DialogService dialogService)

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
public ObservableList<ExternalFileTypeItemViewModel>
private boolean
private boolean
public boolean
public void
public void
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.

protected void
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
externalApplicationsPreferencesback to summary
private final ExternalApplicationsPreferences externalApplicationsPreferences
fileTypesback to summary
private final ObservableList<ExternalFileTypeItemViewModel> fileTypes
LOGGERback to summary
private static final Logger LOGGER

Constructor Detail

ExternalFileTypesTabViewModelback to summary
public ExternalFileTypesTabViewModel(ExternalApplicationsPreferences externalApplicationsPreferences, DialogService dialogService)

Method Detail

addNewTypeback to summary
public boolean addNewType()
editback to summary
public boolean edit(ExternalFileTypeItemViewModel type)
getFileTypesback to summary
public ObservableList<ExternalFileTypeItemViewModel> getFileTypes()
hasEmptyValueback to summary
private boolean hasEmptyValue(ExternalFileTypeItemViewModel item)
isUniqueExtensionback to summary
private boolean isUniqueExtension(ExternalFileTypeItemViewModel item)
isValidExternalFileTypeback to summary
public boolean isValidExternalFileType(ExternalFileTypeItemViewModel item)
removeback to summary
public void remove(ExternalFileTypeItemViewModel type)
resetToDefaultsback to summary
public void resetToDefaults()
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
showEditDialogback to summary
protected void showEditDialog(ExternalFileTypeItemViewModel item, String dialogTitle)
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.