Verified Owner
Top Fields Constructors Methods
org.jabref.gui.openoffice

public Class StyleSelectDialogViewModel

extends Object
Class Inheritance
Imports
java.io.IOException, java.nio.file.Files, .Path, java.util.List, .Locale, .Optional, java.util.regex.Pattern, javafx.beans.property.ListProperty, .ObjectProperty, .SimpleListProperty, .SimpleObjectProperty, javafx.collections.FXCollections, .ObservableList, javafx.collections.transformation.FilteredList, javafx.scene.control.Tab, org.jabref.gui.DialogService, org.jabref.gui.desktop.os.NativeDesktop, org.jabref.gui.externalfiletype.ExternalFileType, .ExternalFileTypes, org.jabref.gui.frame.ExternalApplicationsPreferences, org.jabref.gui.preferences.GuiPreferences, org.jabref.gui.util.FileDialogConfiguration, org.jabref.logic.FilePreferences, org.jabref.logic.citationstyle.CSLStyleLoader, .CSLStyleUtils, .CitationStyle, org.jabref.logic.journals.JournalAbbreviationRepository, org.jabref.logic.l10n.Localization, org.jabref.logic.openoffice.OpenOfficePreferences, org.jabref.logic.openoffice.style.BstCitationFormat, .BstStyle, .BstStyleLoader, .JStyle, .JStyleLoader, .OOStyle, org.jabref.logic.preview.CitationStylePreviewLayout, org.jabref.logic.util.BackgroundTask, .StandardFileType, .TaskExecutor, org.jabref.model.database.BibDatabaseContext, org.jabref.model.entry.BibEntryTypesManager

Field Summary

Modifier and TypeField and Description
private final ObservableList<CitationStylePreviewLayout>
private final BibEntryTypesManager
private final ObjectProperty<BstCitationFormat>
private final BstStyleLoader
private final ListProperty<BstStyleSelectViewModel>
private final CSLStyleLoader
private final DialogService
private final ExternalApplicationsPreferences
private final FilePreferences
private final FilteredList<CitationStylePreviewLayout>
private final JStyleLoader
private final ListProperty<JStyleSelectViewModel>
private final OpenOfficePreferences
private final ObjectProperty<BstStyleSelectViewModel>
private final ObjectProperty<CitationStylePreviewLayout>
private final ObjectProperty<JStyleSelectViewModel>
private final ObjectProperty<Tab>
private static final Pattern

Constructor Summary

AccessConstructor and Description
public
StyleSelectDialogViewModel(DialogService dialogService, CSLStyleLoader cslStyleLoader, JStyleLoader jStyleLoader, BstStyleLoader bstStyleLoader, GuiPreferences preferences, JournalAbbreviationRepository journalAbbreviationRepository, TaskExecutor taskExecutor, BibEntryTypesManager bibEntryTypesManager)

Method Summary

Modifier and TypeMethod and Description
public void
public void
addCslStyleFile()

Handles importing a custom CSL style file

public void
public ObjectProperty<BstCitationFormat>
public ListProperty<BstStyleSelectViewModel>
public void
public void
public void
public void
public JStyleSelectViewModel
public ObservableList<CitationStylePreviewLayout>
private JStyleSelectViewModel
public OOStyle
public Tab
public OOStyle
private boolean
hasSameStyleName(CitationStyle existingStyle, CitationStyle styleToAdd)

private boolean
hasSameStyleName(BstStyle existingStyle, BstStyle styleToAdd)

private boolean
private boolean
isDuplicate(BstStyle fileToAdd)

public ListProperty<JStyleSelectViewModel>
public List<BstStyleSelectViewModel>
public List<JStyleSelectViewModel>
public static boolean
matchStyleSearch(String styleName, String searchTerm)

public ObjectProperty<BstStyleSelectViewModel>
public ObjectProperty<CitationStylePreviewLayout>
public ObjectProperty<JStyleSelectViewModel>
public void
public void
public void
public JStyle
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

availableCslLayoutsback to summary
private final ObservableList<CitationStylePreviewLayout> availableCslLayouts
bibEntryTypesManagerback to summary
private final BibEntryTypesManager bibEntryTypesManager
bstCitationFormatback to summary
private final ObjectProperty<BstCitationFormat> bstCitationFormat
bstStyleLoaderback to summary
private final BstStyleLoader bstStyleLoader
bstStylesback to summary
private final ListProperty<BstStyleSelectViewModel> bstStyles
cslStyleLoaderback to summary
private final CSLStyleLoader cslStyleLoader
dialogServiceback to summary
private final DialogService dialogService
externalApplicationsPreferencesback to summary
private final ExternalApplicationsPreferences externalApplicationsPreferences
filePreferencesback to summary
private final FilePreferences filePreferences
filteredAvailableCslLayoutsback to summary
private final FilteredList<CitationStylePreviewLayout> filteredAvailableCslLayouts
jStyleLoaderback to summary
private final JStyleLoader jStyleLoader
jStylesback to summary
private final ListProperty<JStyleSelectViewModel> jStyles
openOfficePreferencesback to summary
private final OpenOfficePreferences openOfficePreferences
selectedBstStyleback to summary
private final ObjectProperty<BstStyleSelectViewModel> selectedBstStyle
selectedCslLayoutPropertyback to summary
private final ObjectProperty<CitationStylePreviewLayout> selectedCslLayoutProperty
selectedJStyleback to summary
private final ObjectProperty<JStyleSelectViewModel> selectedJStyle
selectedTabback to summary
private final ObjectProperty<Tab> selectedTab
STYLE_SEARCH_SEPARATORSback to summary
private static final Pattern STYLE_SEARCH_SEPARATORS

Constructor Detail

StyleSelectDialogViewModelback to summary
public StyleSelectDialogViewModel(DialogService dialogService, CSLStyleLoader cslStyleLoader, JStyleLoader jStyleLoader, BstStyleLoader bstStyleLoader, GuiPreferences preferences, JournalAbbreviationRepository journalAbbreviationRepository, TaskExecutor taskExecutor, BibEntryTypesManager bibEntryTypesManager)

Method Detail

addBstStyleFileback to summary
public void addBstStyleFile()
addCslStyleFileback to summary
public void addCslStyleFile()

Handles importing a custom CSL style file

addJStyleFileback to summary
public void addJStyleFile()
bstCitationFormatPropertyback to summary
public ObjectProperty<BstCitationFormat> bstCitationFormatProperty()
bstStylesPropertyback to summary
public ListProperty<BstStyleSelectViewModel> bstStylesProperty()
deleteBstStyleback to summary
public void deleteBstStyle(BstStyle style)
deleteCslStyleback to summary
public void deleteCslStyle(CitationStyle style)
deleteJStyleback to summary
public void deleteJStyle()
editJStyleback to summary
public void editJStyle()
fromJStyleback to summary
public JStyleSelectViewModel fromJStyle(JStyle style)
getAvailableCslLayoutsback to summary
public ObservableList<CitationStylePreviewLayout> getAvailableCslLayouts()
getJStyleOrDefaultback to summary
private JStyleSelectViewModel getJStyleOrDefault(String stylePath)
getSelectedStyleback to summary
public OOStyle getSelectedStyle()
getSelectedTabback to summary
public Tab getSelectedTab()
getSetStyleback to summary
public OOStyle getSetStyle()
hasSameStyleNameback to summary
private boolean hasSameStyleName(CitationStyle existingStyle, CitationStyle styleToAdd)
hasSameStyleNameback to summary
private boolean hasSameStyleName(BstStyle existingStyle, BstStyle styleToAdd)
isDuplicateback to summary
private boolean isDuplicate(CitationStyle styleToAdd)
isDuplicateback to summary
private boolean isDuplicate(BstStyle fileToAdd)
jStylesPropertyback to summary
public ListProperty<JStyleSelectViewModel> jStylesProperty()
loadBstStylesback to summary
public List<BstStyleSelectViewModel> loadBstStyles()
loadJStylesback to summary
public List<JStyleSelectViewModel> loadJStyles()
matchStyleSearchback to summary
public static boolean matchStyleSearch(String styleName, String searchTerm)
selectedBstStylePropertyback to summary
public ObjectProperty<BstStyleSelectViewModel> selectedBstStyleProperty()
selectedCslLayoutPropertyback to summary
public ObjectProperty<CitationStylePreviewLayout> selectedCslLayoutProperty()
selectedJStylePropertyback to summary
public ObjectProperty<JStyleSelectViewModel> selectedJStyleProperty()
setAvailableCslLayoutsFilterback to summary
public void setAvailableCslLayoutsFilter(String searchTerm)
setSelectedTabback to summary
public void setSelectedTab(Tab tab)
storeStylePreferencesback to summary
public void storeStylePreferences()
toJStyleback to summary
public JStyle toJStyle(JStyleSelectViewModel item)