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

public Class FileHistoryMenu

extends Menu
Class Inheritance
Imports
java.nio.file.Files, .Path, javafx.beans.InvalidationListener, javafx.scene.control.Menu, .MenuItem, .SeparatorMenuItem, javafx.scene.input.KeyEvent, org.jabref.gui.DialogService, org.jabref.gui.importer.actions.OpenDatabaseAction, org.jabref.logic.l10n.Localization, org.jabref.logic.util.JabRefBaseDirectoryLocator, org.jabref.logic.util.io.FileHistory

Field Summary

Modifier and TypeField and Description
protected final MenuItem
private final DialogService
private final FileHistory
private final OpenDatabaseAction
Inherited from javafx.scene.control.Menu:
ON_HIDDENON_HIDINGON_SHOWINGON_SHOWN

Constructor Summary

AccessConstructor and Description
public
FileHistoryMenu(FileHistory fileHistory, DialogService dialogService, OpenDatabaseAction openDatabaseAction)

Method Summary

Modifier and TypeMethod and Description
private void
addItem(Path file, int num)

public void
public void
newFile(Path file)

Adds the filename to the top of the menu.

public void
openFile(Path file)

public boolean

Returns:

false if typed char is invalid or not a number.
openFileByKey
(KeyEvent
a KeyEvent.
keyEvent
)

This method is to use typed letters to access recent libraries in menu.

private void
Inherited from javafx.scene.control.Menu:
buildEventDispatchChaingetItemsgetOnHiddengetOnHidinggetOnShowinggetOnShownhideisShowingonHiddenPropertyonHidingPropertyonShowingPropertyonShownPropertysetOnHiddensetOnHidingsetOnShowingsetOnShownshowshowingProperty

Field Detail

clearRecentLibrariesback to summary
protected final MenuItem clearRecentLibraries
dialogServiceback to summary
private final DialogService dialogService
historyback to summary
private final FileHistory history
openDatabaseActionback to summary
private final OpenDatabaseAction openDatabaseAction

Constructor Detail

FileHistoryMenuback to summary
public FileHistoryMenu(FileHistory fileHistory, DialogService dialogService, OpenDatabaseAction openDatabaseAction)

Method Detail

addItemback to summary
private void addItem(Path file, int num)
clearLibrariesHistoryback to summary
public void clearLibrariesHistory()
newFileback to summary
public void newFile(Path file)

Adds the filename to the top of the menu. If it already is in the menu, it is merely moved to the top.

openFileback to summary
public void openFile(Path file)
openFileByKeyback to summary
public boolean openFileByKey(KeyEvent keyEvent)

This method is to use typed letters to access recent libraries in menu.

Parameters
keyEvent:KeyEvent

a KeyEvent.

Returns:boolean

false if typed char is invalid or not a number.

setItemsback to summary
private void setItems()