Verified Owner
Top Description Fields Constructors Methods
org.jabref.gui.util

public Class CustomLocalDragboard

extends Object
Class Inheritance
Imports
java.util.HashMap, .List, .Map, org.jabref.gui.DragAndDropDataFormats, org.jabref.logic.preview.PreviewLayout, org.jabref.model.entry.BibEntry

Placeholder class for a custom generic type safe dragboard to be used in drag and drop, does not depend on serialization Don't use this class directly. Use the instance provided in org.jabref.gui.StateManager#getLocalDragboard()

Field Summary

Modifier and TypeField and Description
private static final Class<List<BibEntry>>
private final Map<Class<?>, Object>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
clear(Class<?> type)

public void
public List<BibEntry>

Returns:

List of BibEntry or empty list if no entries are avaiable
getBibEntries
()

Get a List of BibEntry from the dragboard

public List<PreviewLayout>

Returns:

List of PreviewLayout or empty list if no entries are avaiable
getPreviewLayouts
()

Get a List of PreviewLayout from the dragboard

public <T> T
getValue(Class<T> type)

public boolean
public boolean
hasType(Class<?> type)

public void
putBibEntries(List<BibEntry>
The list to put
entries
)

Puts A List of BibEntry in the map All previous content is cleared

public void
putPreviewLayouts(List<PreviewLayout>
The list to put
previewLayouts
)

Puts A List of PreviewLayout in the map All previous content is cleared

public <T> void
putValue(Class<T>
The Type of the class
type
,
T
The value to store
value
)

Puts the value of the concrete class in a map.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

BIB_ENTRIESback to summary
private static final Class<List<BibEntry>> BIB_ENTRIES
Annotations
@SuppressWarnings:unchecked
contentsback to summary
private final Map<Class<?>, Object> contents

Constructor Detail

CustomLocalDragboardback to summary
public CustomLocalDragboard()

Method Detail

clearback to summary
public void clear(Class<?> type)
clearAllback to summary
public void clearAll()
getBibEntriesback to summary
public List<BibEntry> getBibEntries()

Get a List of BibEntry from the dragboard

Returns:List<BibEntry>

List of BibEntry or empty list if no entries are avaiable

getPreviewLayoutsback to summary
public List<PreviewLayout> getPreviewLayouts()

Get a List of PreviewLayout from the dragboard

Returns:List<PreviewLayout>

List of PreviewLayout or empty list if no entries are avaiable

getValueback to summary
public <T> T getValue(Class<T> type)
hasBibEntriesback to summary
public boolean hasBibEntries()
hasTypeback to summary
public boolean hasType(Class<?> type)
putBibEntriesback to summary
public void putBibEntries(List<BibEntry> entries)

Puts A List of BibEntry in the map All previous content is cleared

Parameters
entries:List<BibEntry>

The list to put

putPreviewLayoutsback to summary
public void putPreviewLayouts(List<PreviewLayout> previewLayouts)

Puts A List of PreviewLayout in the map All previous content is cleared

Parameters
previewLayouts:List<PreviewLayout>

The list to put

putValueback to summary
public <T> void putValue(Class<T> type, T value)

Puts the value of the concrete class in a map. All previous content stored in the map is removed

Parameters
type:Class<T>

The Type of the class

value:T

The value to store