Verified Owner
Top Description Constructors Methods
org.jabref.gui.fieldeditors.contextmenu

public Class EditorMenus

extends Object
Class Inheritance
Imports
java.util.ArrayList, .List, java.util.function.Supplier, javafx.scene.control.MenuItem, .SeparatorMenuItem, .TextField, .TextInputControl, org.jabref.gui.DialogService, org.jabref.gui.actions.ActionFactory, .StandardActions, org.jabref.gui.clipboard.ClipBoardManager, org.jabref.gui.edit.CopyDoiUrlAction, org.jabref.logic.formatter.bibtexfields.CleanupUrlFormatter, .NormalizeNamesFormatter, org.jabref.logic.l10n.Localization, org.jabref.logic.util.strings.StringUtil, com.airhacks.afterburner.injection.Injector, com.tobiasdiez.easybind.EasyBind

Provides context menus for the text fields of the entry editor. Note that we use Supplier to prevent an early instantiation of the menus. Therefore, they are attached to each text field but instantiation happens on the first right-click of the user in that field. The late instantiation is done by EditorTextArea#initContextMenu.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static Supplier<List<MenuItem>>

Returns:

menu containing items of the default menu and an item to cleanup a URL
getCleanupUrlMenu
(TextField
text field that this menu will be connected to
textField
)

The default context menu with a specific menu item to cleanup URL.

public static Supplier<List<MenuItem>>

Returns:

menu containing items of the default menu and an item for copying a DOI/DOI URL
getDOIMenu
(TextField
text-field that this menu will be connected to
textField
,
DialogService dialogService)

The default context menu with a specific menu copying a DOI/ DOI URL.

public static Supplier<List<MenuItem>>

Returns:

menu containing items of the default menu and an item for normalizing person names
getNameMenu
(final TextInputControl
text-input-control that this menu will be connected to
textInput
)

The default context menu with a specific menu for normalizing person names regarding to BibTex rules.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

EditorMenusback to summary
public EditorMenus()

Method Detail

getCleanupUrlMenuback to summary
public static Supplier<List<MenuItem>> getCleanupUrlMenu(TextField textField)

The default context menu with a specific menu item to cleanup URL.

Parameters
textField:TextField

text field that this menu will be connected to

Returns:Supplier<List<MenuItem>>

menu containing items of the default menu and an item to cleanup a URL

getDOIMenuback to summary
public static Supplier<List<MenuItem>> getDOIMenu(TextField textField, DialogService dialogService)

The default context menu with a specific menu copying a DOI/ DOI URL.

Parameters
textField:TextField

text-field that this menu will be connected to

Returns:Supplier<List<MenuItem>>

menu containing items of the default menu and an item for copying a DOI/DOI URL

getNameMenuback to summary
public static Supplier<List<MenuItem>> getNameMenu(final TextInputControl textInput)

The default context menu with a specific menu for normalizing person names regarding to BibTex rules.

Parameters
textInput:TextInputControl

text-input-control that this menu will be connected to

Returns:Supplier<List<MenuItem>>

menu containing items of the default menu and an item for normalizing person names