Top Fields Constructors Methods
org.jabref.gui

public Class ClipBoardManager

extends Object
Class Inheritance
Annotations
@AllowedToUseAwt:Requires ava.awt.datatransfer.Clipboard
Imports
java.awt.Toolkit, java.awt.datatransfer.DataFlavor, java.awt.datatransfer.StringSelection, java.awt.datatransfer.Transferable, java.awt.datatransfer.UnsupportedFlavorException, java.io.IOException, java.util.List, javafx.application.Platform, javafx.scene.control.TextInputControl, javafx.scene.input.Clipboard, .ClipboardContent, .DataFormat, .MouseButton, org.jabref.architecture.AllowedToUseAwt, org.jabref.logic.bibtex.BibEntryWriter, .FieldWriter, org.jabref.model.database.BibDatabaseMode, org.jabref.model.entry.BibEntry, .BibEntryTypesManager, .BibtexString, org.jabref.preferences.PreferencesService, com.airhacks.afterburner.injection.Injector, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private static Clipboard
private static final Logger
private static java.awt.datatransfer.Clipboard
public static final DataFormat

Constructor Summary

AccessConstructor and Description
public
public
ClipBoardManager(Clipboard clipboard, java.awt.datatransfer.Clipboard primary)

Method Summary

Modifier and TypeMethod and Description
public static void
addX11Support(TextInputControl
the TextInputControl (e.g., TextField, TextArea, and children) where adding this functionality.
input
)

Add X11 clipboard support to a text input control.

public static String

Returns:

any text found on the Clipboard; if none found, return an empty String.
getContents
()

Get the String residing on the system clipboard.

public static String

Returns:

any text found on the primary Clipboard; if none found, try with the system clipboard.
getContentsPrimary
()

Get the String residing on the primary clipboard (if it exists).

public static String
public static boolean
private String
serializeEntries(List<BibEntry> entries, BibEntryTypesManager entryTypesManager)

public void
setContent(ClipboardContent
the ClipboardContent to set as current value of the system clipboard.
content
)

Puts content onto the system clipboard.

public void
public void
setContent(List<BibEntry> entries, BibEntryTypesManager entryTypesManager)

public void
setContent(List<BibEntry> entries, BibEntryTypesManager entryTypesManager, List<BibtexString> stringConstants)

public void
setHtmlContent(String html, String fallbackPlain)

public void
setPrimaryClipboardContent(ClipboardContent
the ClipboardContent to set as current value of the primary clipboard.
content
)

Puts content onto the primary clipboard (if it exists).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

clipboardback to summary
private static Clipboard clipboard
LOGGERback to summary
private static final Logger LOGGER
primaryback to summary
private static java.awt.datatransfer.Clipboard primary
XMLback to summary
public static final DataFormat XML

Constructor Detail

ClipBoardManagerback to summary
public ClipBoardManager()
ClipBoardManagerback to summary
public ClipBoardManager(Clipboard clipboard, java.awt.datatransfer.Clipboard primary)

Method Detail

addX11Supportback to summary
public static void addX11Support(TextInputControl input)

Add X11 clipboard support to a text input control. It is necessary to call this method in every input where you want to use it: ClipBoardManager.addX11Support(TextInputControl input);.

Parameters
input:TextInputControl

the TextInputControl (e.g., TextField, TextArea, and children) where adding this functionality.

See Also
Short summary for X11 clipboards, Longer text over clipboards
getContentsback to summary
public static String getContents()

Get the String residing on the system clipboard.

Returns:String

any text found on the Clipboard; if none found, return an empty String.

getContentsPrimaryback to summary
public static String getContentsPrimary()

Get the String residing on the primary clipboard (if it exists).

Returns:String

any text found on the primary Clipboard; if none found, try with the system clipboard.

getHtmlContentsback to summary
public static String getHtmlContents()
hasHtmlback to summary
public static boolean hasHtml()
serializeEntriesback to summary
private String serializeEntries(List<BibEntry> entries, BibEntryTypesManager entryTypesManager) throws IOException
setContentback to summary
public void setContent(ClipboardContent content)

Puts content onto the system clipboard.

Parameters
content:ClipboardContent

the ClipboardContent to set as current value of the system clipboard.

setContentback to summary
public void setContent(String string)
setContentback to summary
public void setContent(List<BibEntry> entries, BibEntryTypesManager entryTypesManager) throws IOException
setContentback to summary
public void setContent(List<BibEntry> entries, BibEntryTypesManager entryTypesManager, List<BibtexString> stringConstants) throws IOException
setHtmlContentback to summary
public void setHtmlContent(String html, String fallbackPlain)
setPrimaryClipboardContentback to summary
public void setPrimaryClipboardContent(ClipboardContent content)

Puts content onto the primary clipboard (if it exists).

Parameters
content:ClipboardContent

the ClipboardContent to set as current value of the primary clipboard.