Verified Owner
Top Description Inners Fields Constructors Methods
org.jabref.gui.frame

public Class JabRefFrame

extends BorderPane
implements LibraryTabContainer, UiMessageHandler
Class Inheritance
All Implemented Interfaces
org.jabref.gui.LibraryTabContainer
Imports
java.io.IOException, java.nio.file.Path, java.util.List, .Optional, java.util.function.Supplier, javafx.application.Platform, javafx.beans.InvalidationListener, javafx.beans.binding.Bindings, javafx.beans.property.ObjectProperty, .SimpleBooleanProperty, .SimpleObjectProperty, javafx.beans.value.ObservableValue, javafx.collections.ListChangeListener, .ObservableList, javafx.event.Event, javafx.geometry.Orientation, javafx.scene.control.ContextMenu, .SeparatorMenuItem, .SplitPane, .Tab, .TabPane, .TextInputControl, javafx.scene.input.KeyEvent, javafx.scene.layout.BorderPane, .VBox, javafx.stage.Stage, org.jabref.gui.DialogService, .LibraryTab, .LibraryTabContainer, .StateManager, org.jabref.gui.actions.ActionFactory, .ActionHelper, .SimpleCommand, .StandardActions, org.jabref.gui.clipboard.ClipBoardManager, org.jabref.gui.desktop.os.NativeDesktop, org.jabref.gui.entryeditor.EntryEditor, org.jabref.gui.importer.NewEntryAction, org.jabref.gui.importer.actions.OpenDatabaseAction, org.jabref.gui.keyboard.KeyBinding, org.jabref.gui.libraryproperties.LibraryPropertiesAction, org.jabref.gui.preferences.GuiPreferences, org.jabref.gui.push.GuiPushToApplicationCommand, org.jabref.gui.search.GlobalSearchBar, .SearchType, org.jabref.gui.shared.SharedDatabaseUIManager, org.jabref.gui.sidepane.SidePane, .SidePaneType, org.jabref.gui.undo.RedoAction, .UndoAction, org.jabref.gui.util.BindingsHelper, org.jabref.gui.welcome.WelcomeTab, org.jabref.logic.UiCommand, .UiMessageHandler, org.jabref.logic.ai.AiService, org.jabref.logic.git.util.GitHandlerRegistry, org.jabref.logic.journals.JournalAbbreviationRepository, org.jabref.logic.l10n.Localization, org.jabref.logic.shared.SharedDatabaseSessionService, org.jabref.logic.util.BuildInfo, .TaskExecutor, org.jabref.model.database.BibDatabaseContext, org.jabref.model.entry.BibEntryTypesManager, org.jabref.model.entry.types.StandardEntryType, org.jabref.model.util.FileUpdateMonitor, com.airhacks.afterburner.injection.Injector, com.tobiasdiez.easybind.EasyBind, com.tobiasdiez.easybind.EasyObservableList, com.tobiasdiez.easybind.Subscription, org.fxmisc.richtext.CodeArea, org.jspecify.annotations.NonNull, org.slf4j.Logger, .LoggerFactory

Represents the inner frame of the JabRef window

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class
JabRefFrame.CloseAction

The action concerned with closing the window.

protected static class
protected class
public static class
private static enum
JabRefFrame.PanelMode

Defines the different modes that the tab can operate in

Field Summary

Modifier and TypeField and Description
private final AiService
private final ClipBoardManager
private final DialogService
private final EntryEditor
private final BibEntryTypesManager
private final FileHistoryMenu
private final FileUpdateMonitor
public static final String
private final GitHandlerRegistry
private final GlobalSearchBar
private com.tobiasdiez.easybind.Subscription
private final SplitPane
private final JournalAbbreviationRepository
private static final Logger
private final Stage
private com.tobiasdiez.easybind.EasyObservableList<BibDatabaseContext>
private final ObjectProperty<JabRefFrame.PanelMode>
private final GuiPreferences
private final GuiPushToApplicationCommand
private final SidePane
private final StateManager
private final TabPane
private final TaskExecutor
private com.tobiasdiez.easybind.Subscription
private final SplitPane
private final JabRefFrameViewModel

Constructor Summary

AccessConstructor and Description
public
JabRefFrame(Stage mainStage, DialogService dialogService, FileUpdateMonitor fileUpdateMonitor, GuiPreferences preferences, AiService aiService, StateManager stateManager, BibEntryTypesManager entryTypesManager, ClipBoardManager clipBoardManager, TaskExecutor taskExecutor, GitHandlerRegistry gitHandlerRegistry, JournalAbbreviationRepository journalAbbreviationRepository)

Method Summary

Modifier and TypeMethod and Description
public void
addTab(@NonNull BibDatabaseContext databaseContext, boolean raisePanel)

Implements org.jabref.gui.LibraryTabContainer.addTab.

Opens a new tab with existing data.

public void
addTab(@NonNull LibraryTab libraryTab, boolean raisePanel)

Implements org.jabref.gui.LibraryTabContainer.addTab.

public boolean
pack-priv static void
closeSelectedNonLibraryTab(TabPane tabbedPane)

Closes the selected tab if it is no LibraryTab (the welcome tab): CloseDatabaseAction only knows library tabs, so the close shortcut would do nothing there.

public boolean
public boolean
closeTabs(@NonNull List<LibraryTab> tabs, boolean showWelcomeTab)

Implements org.jabref.gui.LibraryTabContainer.closeTabs.

Closes the designated libraryTabs

private ContextMenu
public LibraryTab
getCurrentLibraryTab()

Implements org.jabref.gui.LibraryTabContainer.getCurrentLibraryTab.

Returns the currently viewed LibraryTab.

public @NonNull ObservableList<LibraryTab>
getLibraryTabs()

Implements org.jabref.gui.LibraryTabContainer.getLibraryTabs.

Returns a list of all LibraryTabs in this frame.

private OpenDatabaseAction
private void
private void
public void
private void
private void
private void
public void
public void
refresh()

Implements org.jabref.gui.LibraryTabContainer.refresh.

Refreshes the ui after preferences changes

public void
public void
private void
private void
public void
private void
private void
public void
Inherited from javafx.scene.layout.BorderPane:
bottomPropertycenterPropertyclearConstraintscomputeMinHeightcomputeMinWidthcomputePrefHeightcomputePrefWidthgetAlignmentgetBottomgetCentergetContentBiasgetLeftgetMargingetRightgetToplayoutChildrenleftPropertyrightPropertysetAlignmentsetBottomsetCentersetLeftsetMarginsetRightsetToptopProperty

Field Detail

aiServiceback to summary
private final AiService aiService
clipBoardManagerback to summary
private final ClipBoardManager clipBoardManager
dialogServiceback to summary
private final DialogService dialogService
entryEditorback to summary
private final EntryEditor entryEditor
entryTypesManagerback to summary
private final BibEntryTypesManager entryTypesManager
fileHistoryback to summary
private final FileHistoryMenu fileHistory
fileUpdateMonitorback to summary
private final FileUpdateMonitor fileUpdateMonitor
FRAME_TITLEback to summary
public static final String FRAME_TITLE
gitHandlerRegistryback to summary
private final GitHandlerRegistry gitHandlerRegistry
globalSearchBarback to summary
private final GlobalSearchBar globalSearchBar
horizontalDividerSubscriptionback to summary
private com.tobiasdiez.easybind.Subscription horizontalDividerSubscription
horizontalSplitback to summary
private final SplitPane horizontalSplit
journalAbbreviationRepositoryback to summary
private final JournalAbbreviationRepository journalAbbreviationRepository
LOGGERback to summary
private static final Logger LOGGER
mainStageback to summary
private final Stage mainStage
openDatabaseListback to summary
private com.tobiasdiez.easybind.EasyObservableList<BibDatabaseContext> openDatabaseList
Annotations
@SuppressWarnings:FieldCanBeLocal
panelModeback to summary
private final ObjectProperty<JabRefFrame.PanelMode> panelMode
preferencesback to summary
private final GuiPreferences preferences
pushToApplicationCommandback to summary
private final GuiPushToApplicationCommand pushToApplicationCommand
sidePaneback to summary
private final SidePane sidePane
stateManagerback to summary
private final StateManager stateManager
tabbedPaneback to summary
private final TabPane tabbedPane
taskExecutorback to summary
private final TaskExecutor taskExecutor
verticalDividerSubscriptionback to summary
private com.tobiasdiez.easybind.Subscription verticalDividerSubscription
verticalSplitback to summary
private final SplitPane verticalSplit
viewModelback to summary
private final JabRefFrameViewModel viewModel

Constructor Detail

JabRefFrameback to summary
public JabRefFrame(Stage mainStage, DialogService dialogService, FileUpdateMonitor fileUpdateMonitor, GuiPreferences preferences, AiService aiService, StateManager stateManager, BibEntryTypesManager entryTypesManager, ClipBoardManager clipBoardManager, TaskExecutor taskExecutor, GitHandlerRegistry gitHandlerRegistry, JournalAbbreviationRepository journalAbbreviationRepository)

Method Detail

addTabback to summary
public void addTab(@NonNull BibDatabaseContext databaseContext, boolean raisePanel)

Implements org.jabref.gui.LibraryTabContainer.addTab.

Opens a new tab with existing data. Asynchronous loading is done at LibraryTab#createLibraryTab. Similar method: OpenDatabaseAction#openTheFile(Path)

addTabback to summary
public void addTab(@NonNull LibraryTab libraryTab, boolean raisePanel)

Implements org.jabref.gui.LibraryTabContainer.addTab.

closeback to summary
public boolean close()
closeSelectedNonLibraryTabback to summary
pack-priv static void closeSelectedNonLibraryTab(TabPane tabbedPane)

Closes the selected tab if it is no LibraryTab (the welcome tab): CloseDatabaseAction only knows library tabs, so the close shortcut would do nothing there.

Mirrors what the tab's close button does in TabPaneBehavior: the tab close events are notifications, a TabPane never removes a tab in response to one, so the removal has to happen here.

closeTabback to summary
public boolean closeTab(LibraryTab tab)
closeTabsback to summary
public boolean closeTabs(@NonNull List<LibraryTab> tabs, boolean showWelcomeTab)

Implements org.jabref.gui.LibraryTabContainer.closeTabs.

Doc from org.jabref.gui.LibraryTabContainer.closeTabs.

Closes the designated libraryTabs

createTabContextMenuForback to summary
private ContextMenu createTabContextMenuFor(LibraryTab tab)
getCurrentLibraryTabback to summary
public LibraryTab getCurrentLibraryTab()

Implements org.jabref.gui.LibraryTabContainer.getCurrentLibraryTab.

Returns the currently viewed LibraryTab.

getLibraryTabsback to summary
public @NonNull ObservableList<LibraryTab> getLibraryTabs()

Implements org.jabref.gui.LibraryTabContainer.getLibraryTabs.

Returns a list of all LibraryTabs in this frame.

getOpenDatabaseActionback to summary
private OpenDatabaseAction getOpenDatabaseAction()
handleSharedDatabaseReconnectionFailureback to summary
private void handleSharedDatabaseReconnectionFailure(Reconnection reconnection, Exception exception)
handleSharedDatabaseReconnectionSuccessback to summary
private void handleSharedDatabaseReconnectionSuccess(SharedDatabaseSessionService sessionService, Reconnection reconnection, LibraryTab tab, BibDatabaseContext bibDatabaseContext)
handleUiCommandsback to summary
public void handleUiCommands(List<UiCommand> uiCommands)
Annotations
@Override
initBindingsback to summary
private void initBindings()
initKeyBindingsback to summary
private void initKeyBindings()
initLayoutback to summary
private void initLayout()
openLastEditedDatabasesback to summary
public void openLastEditedDatabases()
refreshback to summary
public void refresh()

Implements org.jabref.gui.LibraryTabContainer.refresh.

Refreshes the ui after preferences changes

showLibraryTabback to summary
public void showLibraryTab(@NonNull LibraryTab libraryTab)

Implements org.jabref.gui.LibraryTabContainer.showLibraryTab.

showWelcomeTabback to summary
public void showWelcomeTab()
unsubscribeHorizontalDividerback to summary
private void unsubscribeHorizontalDivider()
updateEditorPaneback to summary
private void updateEditorPane()
updateHorizontalDividerPositionback to summary
public void updateHorizontalDividerPosition()
updateSidePaneback to summary
private void updateSidePane()
updateTabBarVisibleback to summary
private void updateTabBarVisible()
updateVerticalDividerPositionback to summary
public void updateVerticalDividerPosition()
org.jabref.gui.frame back to summary

protected Class JabRefFrame.CloseAction

extends SimpleCommand
Class Inheritance

The action concerned with closing the window.

Field Summary

Modifier and TypeField and Description
private final JabRefFrame
Inherited from org.jabref.gui.actions.SimpleCommand:
statusMessage

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from org.jabref.gui.actions.SimpleCommand:
getProgressprogressPropertysetExecutablestatusMessageProperty

Field Detail

frameback to summary
private final JabRefFrame frame

Constructor Detail

CloseActionback to summary
public CloseAction(JabRefFrame frame)

Method Detail

executeback to summary
public void execute()
Annotations
@Override
org.jabref.gui.frame back to summary

protected Class JabRefFrame.CloseDatabaseAction

extends SimpleCommand
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final LibraryTab
private final LibraryTabContainer
Inherited from org.jabref.gui.actions.SimpleCommand:
statusMessage

Constructor Summary

AccessConstructor and Description
public
CloseDatabaseAction(LibraryTabContainer tabContainer, LibraryTab libraryTab, StateManager stateManager)

public
CloseDatabaseAction(LibraryTabContainer tabContainer, StateManager stateManager)

Using this constructor will result in executing the command on the currently open library tab

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from org.jabref.gui.actions.SimpleCommand:
getProgressprogressPropertysetExecutablestatusMessageProperty

Field Detail

libraryTabback to summary
private final LibraryTab libraryTab
tabContainerback to summary
private final LibraryTabContainer tabContainer

Constructor Detail

CloseDatabaseActionback to summary
public CloseDatabaseAction(LibraryTabContainer tabContainer, LibraryTab libraryTab, StateManager stateManager)
CloseDatabaseActionback to summary
public CloseDatabaseAction(LibraryTabContainer tabContainer, StateManager stateManager)

Using this constructor will result in executing the command on the currently open library tab

Method Detail

executeback to summary
public void execute()
Annotations
@Override
org.jabref.gui.frame back to summary

protected Class JabRefFrame.CloseOthersDatabaseAction

extends SimpleCommand
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final LibraryTab
Inherited from org.jabref.gui.actions.SimpleCommand:
statusMessage

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from org.jabref.gui.actions.SimpleCommand:
getProgressprogressPropertysetExecutablestatusMessageProperty

Field Detail

libraryTabback to summary
private final LibraryTab libraryTab

Constructor Detail

CloseOthersDatabaseActionback to summary
public CloseOthersDatabaseAction(LibraryTab libraryTab)

Method Detail

executeback to summary
public void execute()
Annotations
@Override
org.jabref.gui.frame back to summary

public Class JabRefFrame.OpenDatabaseFolder

extends SimpleCommand
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final Supplier<BibDatabaseContext>
private final DialogService
private final GuiPreferences
Inherited from org.jabref.gui.actions.SimpleCommand:
statusMessage

Constructor Summary

AccessConstructor and Description
public
OpenDatabaseFolder(DialogService dialogService, StateManager stateManager, GuiPreferences preferences, Supplier<BibDatabaseContext> databaseContext)

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from org.jabref.gui.actions.SimpleCommand:
getProgressprogressPropertysetExecutablestatusMessageProperty

Field Detail

databaseContextback to summary
private final Supplier<BibDatabaseContext> databaseContext
dialogServiceback to summary
private final DialogService dialogService
preferencesback to summary
private final GuiPreferences preferences

Constructor Detail

OpenDatabaseFolderback to summary
public OpenDatabaseFolder(DialogService dialogService, StateManager stateManager, GuiPreferences preferences, Supplier<BibDatabaseContext> databaseContext)

Method Detail

executeback to summary
public void execute()
Annotations
@Override
org.jabref.gui.frame back to summary

private final Enum JabRefFrame.PanelMode

extends Enum<JabRefFrame.PanelMode>
Class Inheritance

Defines the different modes that the tab can operate in

Field Summary

Modifier and TypeField and Description
public static final JabRefFrame.PanelMode
public static final JabRefFrame.PanelMode

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static JabRefFrame.PanelMode
public static JabRefFrame.PanelMode[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

MAIN_TABLEback to summary
public static final JabRefFrame.PanelMode MAIN_TABLE
MAIN_TABLE_AND_ENTRY_EDITORback to summary
public static final JabRefFrame.PanelMode MAIN_TABLE_AND_ENTRY_EDITOR

Constructor Detail

PanelModeback to summary
private PanelMode()

Method Detail

valueOfback to summary
public static JabRefFrame.PanelMode valueOf(String name)
valuesback to summary
public static JabRefFrame.PanelMode[] values()