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

public Class NewEntryAction

extends SimpleCommand
Class Inheritance
Imports
java.util.Optional, java.util.function.Supplier, org.jabref.gui.DialogService, .LibraryTab, .StateManager, org.jabref.gui.actions.ActionHelper, .SimpleCommand, org.jabref.gui.newentry.NewEntryDialogTab, .NewEntryView, org.jabref.gui.preferences.GuiPreferences, org.jabref.model.entry.BibEntry, org.jabref.model.entry.types.EntryType, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private final DialogService
private Optional<EntryType>
private NewEntryDialogTab
private boolean
private static final Logger
private final GuiPreferences
private final Supplier<LibraryTab>
Inherited from org.jabref.gui.actions.SimpleCommand:
statusMessage

Constructor Summary

AccessConstructor and Description
public
NewEntryAction(boolean createImmediately, Supplier<LibraryTab> tabSupplier, DialogService dialogService, GuiPreferences preferences, StateManager stateManager)

Launches a tool for creating new entries.

public
NewEntryAction(NewEntryDialogTab approach, Supplier<LibraryTab> tabSupplier, DialogService dialogService, GuiPreferences preferences, StateManager stateManager)

Launches a dialog asking the user for inputs for the new entry to create.

public
NewEntryAction(EntryType immediateType, Supplier<LibraryTab> tabSupplier, DialogService dialogService, GuiPreferences preferences, StateManager stateManager)

Directly creates a new empty entry of the type immediateType, without opening a dialog for the user to provide inputs.

Method Summary

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

Field Detail

dialogServiceback to summary
private final DialogService dialogService
immediateTypeback to summary
private Optional<EntryType> immediateType
initialApproachback to summary
private NewEntryDialogTab initialApproach
isImmediateback to summary
private boolean isImmediate
LOGGERback to summary
private static final Logger LOGGER
preferencesback to summary
private final GuiPreferences preferences
tabSupplierback to summary
private final Supplier<LibraryTab> tabSupplier

Constructor Detail

NewEntryActionback to summary
public NewEntryAction(boolean createImmediately, Supplier<LibraryTab> tabSupplier, DialogService dialogService, GuiPreferences preferences, StateManager stateManager)

Launches a tool for creating new entries. If createImmediately is true, a new entry will be immediately be created (using the last-selected entry type from the tool dialog was last run with). If createImmediately is false, a dialog will appear asking the user to specify inputs for the new entry.

NewEntryActionback to summary
public NewEntryAction(NewEntryDialogTab approach, Supplier<LibraryTab> tabSupplier, DialogService dialogService, GuiPreferences preferences, StateManager stateManager)

Launches a dialog asking the user for inputs for the new entry to create. This dialog initially opens to the tab specified by approach. If approach is null, then the last-used tab from previous use of the tool is restored.

NewEntryActionback to summary
public NewEntryAction(EntryType immediateType, Supplier<LibraryTab> tabSupplier, DialogService dialogService, GuiPreferences preferences, StateManager stateManager)

Directly creates a new empty entry of the type immediateType, without opening a dialog for the user to provide inputs. If immediateType is null, the last-selected immediate type from the previous use of the tool to create an empty instance of a particular type is used (the Article standard entry type by default).

Method Detail

executeback to summary
public void execute()
Annotations
@Override