Top Fields Constructors Methods
org.jabref.gui.frame

public Class JabRefFrameViewModel

extends Object
implements UiMessageHandler
Class Inheritance
All Implemented Interfaces
org.jabref.gui.frame.UiMessageHandler
Imports
java.nio.file.Path, java.sql.SQLException, java.util.ArrayList, .Comparator, .List, .Objects, .Optional, java.util.concurrent.CompletableFuture, java.util.stream.Collectors, javax.swing.undo.UndoManager, javafx.beans.value.ChangeListener, .ObservableBooleanValue, javafx.scene.control.ButtonType, org.jabref.gui.ClipBoardManager, .DialogService, .LibraryTab, .LibraryTabContainer, .StateManager, org.jabref.gui.importer.ImportEntriesDialog, .ParserResultWarningDialog, org.jabref.gui.importer.actions.OpenDatabaseAction, org.jabref.gui.util.BackgroundTask, .TaskExecutor, org.jabref.logic.UiCommand, org.jabref.logic.importer.ImportCleanup, .ParserResult, org.jabref.logic.l10n.Localization, org.jabref.logic.shared.DatabaseNotSupportedException, org.jabref.logic.shared.exception.InvalidDBMSConnectionPropertiesException, .NotASharedDatabaseException, org.jabref.model.database.BibDatabaseContext, org.jabref.model.entry.BibEntry, .BibEntryTypesManager, org.jabref.model.util.FileUpdateMonitor, org.jabref.preferences.PreferencesService, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private final ClipBoardManager
private final DialogService
private final BibEntryTypesManager
private final FileUpdateMonitor
private static final Logger
private final PreferencesService
private final StateManager
private final LibraryTabContainer
private final TaskExecutor
private final UndoManager

Constructor Summary

AccessConstructor and Description
public
JabRefFrameViewModel(PreferencesService preferencesService, StateManager stateManager, DialogService dialogService, LibraryTabContainer tabContainer, BibEntryTypesManager entryTypesManager, FileUpdateMonitor fileUpdateMonitor, UndoManager undoManager, ClipBoardManager clipBoardManager, TaskExecutor taskExecutor)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
addImportedEntries(final LibraryTab
The LibraryTab to add to.
tab
,
final ParserResult
The entries to add.
parserResult
)

Opens the import inspection dialog to let the user decide which of the given entries to import.

private void
addParserResult(ParserResult parserResult, boolean raisePanel)

Should be called when a user asks JabRef at the command line i) to import a file or ii) to open a .bib file

public boolean

Returns:

true if the user chose to quit; false otherwise
close
()

Quit JabRef

public void
handleUiCommands(List<UiCommand>
to be handled
uiCommands
)

Implements org.jabref.gui.frame.UiMessageHandler.handleUiCommands.

Handles commands submitted by the command line or by the remote host to be executed in the ui Needs to run in a certain order.

private void
jumpToEntry(String entryKey)

private void
pack-priv void
storeLastOpenedFiles(List<Path> filenames, Path focusedDatabase)

private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

clipBoardManagerback to summary
private final ClipBoardManager clipBoardManager
dialogServiceback to summary
private final DialogService dialogService
entryTypesManagerback to summary
private final BibEntryTypesManager entryTypesManager
fileUpdateMonitorback to summary
private final FileUpdateMonitor fileUpdateMonitor
LOGGERback to summary
private static final Logger LOGGER
preferencesback to summary
private final PreferencesService preferences
stateManagerback to summary
private final StateManager stateManager
tabContainerback to summary
private final LibraryTabContainer tabContainer
taskExecutorback to summary
private final TaskExecutor taskExecutor
undoManagerback to summary
private final UndoManager undoManager

Constructor Detail

JabRefFrameViewModelback to summary
public JabRefFrameViewModel(PreferencesService preferencesService, StateManager stateManager, DialogService dialogService, LibraryTabContainer tabContainer, BibEntryTypesManager entryTypesManager, FileUpdateMonitor fileUpdateMonitor, UndoManager undoManager, ClipBoardManager clipBoardManager, TaskExecutor taskExecutor)

Method Detail

addImportedEntriesback to summary
pack-priv void addImportedEntries(final LibraryTab tab, final ParserResult parserResult)

Opens the import inspection dialog to let the user decide which of the given entries to import.

Parameters
tab:LibraryTab

The LibraryTab to add to.

parserResult:ParserResult

The entries to add.

addParserResultback to summary
private void addParserResult(ParserResult parserResult, boolean raisePanel)

Should be called when a user asks JabRef at the command line i) to import a file or ii) to open a .bib file

closeback to summary
public boolean close()

Quit JabRef

Returns:boolean

true if the user chose to quit; false otherwise

handleUiCommandsback to summary
public void handleUiCommands(List<UiCommand> uiCommands)

Implements org.jabref.gui.frame.UiMessageHandler.handleUiCommands.

Handles commands submitted by the command line or by the remote host to be executed in the ui Needs to run in a certain order. E.g. databases have to be loaded before selecting an entry.

Parameters
uiCommands:List<UiCommand>

to be handled

Annotations
@Override
jumpToEntryback to summary
private void jumpToEntry(String entryKey)
openDatabasesback to summary
private void openDatabases(List<ParserResult> parserResults)
storeLastOpenedFilesback to summary
pack-priv void storeLastOpenedFiles(List<Path> filenames, Path focusedDatabase)
waitForLoadingFinishedback to summary
private void waitForLoadingFinished(Runnable runnable)