Top Description Fields Constructors Methods
org.jabref.gui.preview

public Class CopyCitationAction

extends SimpleCommand
Class Inheritance
Imports
java.io.IOException, .StringReader, java.util.ArrayList, .Collections, .List, javafx.scene.input.ClipboardContent, org.jabref.gui.ClipBoardManager, .DialogService, .StateManager, org.jabref.gui.actions.ActionHelper, .SimpleCommand, org.jabref.gui.util.BackgroundTask, .TaskExecutor, org.jabref.logic.citationstyle.CitationStyleGenerator, .CitationStyleOutputFormat, .CitationStylePreviewLayout, org.jabref.logic.journals.JournalAbbreviationRepository, org.jabref.logic.l10n.Localization, org.jabref.logic.layout.Layout, .LayoutHelper, .TextBasedPreviewLayout, org.jabref.logic.preview.PreviewLayout, org.jabref.logic.util.OS, org.jabref.model.entry.BibEntry, .BibEntryTypesManager, org.jabref.preferences.PreferencesService, com.airhacks.afterburner.injection.Injector, org.slf4j.Logger, .LoggerFactory

Copies the selected entries and formats them with the selected citation style (or preview), then it is copied to the clipboard. This worker cannot be reused.

Field Summary

Modifier and TypeField and Description
private final JournalAbbreviationRepository
private final ClipBoardManager
private final DialogService
private static final Logger
private final CitationStyleOutputFormat
private final PreferencesService
private final List<BibEntry>
private final StateManager
private final TaskExecutor
Inherited from org.jabref.gui.actions.SimpleCommand:
statusMessage

Constructor Summary

AccessConstructor and Description
public
CopyCitationAction(CitationStyleOutputFormat outputFormat, DialogService dialogService, StateManager stateManager, ClipBoardManager clipBoardManager, TaskExecutor taskExecutor, PreferencesService preferencesService, JournalAbbreviationRepository abbreviationRepository)

Method Summary

Modifier and TypeMethod and Description
public void
private List<String>
private List<String>
protected static ClipboardContent
processHtml(List<String> citations)

Inserts each citation into a HTML body and copies it to the clipboard

protected static ClipboardContent
processPreview(List<String> citations)

Generates a plain text string out of the preview and copies it additionally to the html to the clipboard (WYSIWYG Editors use the HTML, plain text editors the text)

protected static ClipboardContent
processText(List<String> citations)

Joins every citation with a newline and returns it.

private void
Inherited from org.jabref.gui.actions.SimpleCommand:
getProgressprogressPropertysetExecutablestatusMessageProperty

Field Detail

abbreviationRepositoryback to summary
private final JournalAbbreviationRepository abbreviationRepository
clipBoardManagerback to summary
private final ClipBoardManager clipBoardManager
dialogServiceback to summary
private final DialogService dialogService
LOGGERback to summary
private static final Logger LOGGER
outputFormatback to summary
private final CitationStyleOutputFormat outputFormat
preferencesServiceback to summary
private final PreferencesService preferencesService
selectedEntriesback to summary
private final List<BibEntry> selectedEntries
stateManagerback to summary
private final StateManager stateManager
taskExecutorback to summary
private final TaskExecutor taskExecutor

Constructor Detail

CopyCitationActionback to summary
public CopyCitationAction(CitationStyleOutputFormat outputFormat, DialogService dialogService, StateManager stateManager, ClipBoardManager clipBoardManager, TaskExecutor taskExecutor, PreferencesService preferencesService, JournalAbbreviationRepository abbreviationRepository)

Method Detail

executeback to summary
public void execute()
Annotations
@Override
generateCitationsback to summary
private List<String> generateCitations() throws IOException
generateTextBasedPreviewLayoutCitationsback to summary
private List<String> generateTextBasedPreviewLayoutCitations() throws IOException
processHtmlback to summary
protected static ClipboardContent processHtml(List<String> citations)

Inserts each citation into a HTML body and copies it to the clipboard

processPreviewback to summary
protected static ClipboardContent processPreview(List<String> citations)

Generates a plain text string out of the preview and copies it additionally to the html to the clipboard (WYSIWYG Editors use the HTML, plain text editors the text)

processTextback to summary
protected static ClipboardContent processText(List<String> citations)

Joins every citation with a newline and returns it.

setClipBoardContentback to summary
private void setClipBoardContent(List<String> citations)