Uses of Class
java.awt.datatransfer.DataFlavor
Package
Description
Provides interfaces and classes for transferring data between and within
applications.
Drag and Drop is a direct manipulation gesture found in many Graphical User
Interface systems that provides a mechanism to transfer information between
two entities logically associated with presentation elements in the GUI.
Defines a contract between user-interface components and an assistive
technology that provides access to those components.
Provides a set of "lightweight" (all-Java language) components
that, to the maximum degree possible, work the same on all platforms.
-
Uses of DataFlavor in java.awt.datatransfer
Modifier and TypeFieldDescriptionstatic DataFlavor
DataFlavor.allHtmlFlavor
Represents a piece of an HTML markup.static DataFlavor
DataFlavor.fragmentHtmlFlavor
Represents a piece of an HTML markup.static DataFlavor
DataFlavor.imageFlavor
TheDataFlavor
representing a Java Image class, where:static DataFlavor
DataFlavor.javaFileListFlavor
To transfer a list of files to/from Java (and the underlying platform) aDataFlavor
of this type/subtype and representation class ofjava.util.List
is used.static DataFlavor
DataFlavor.plainTextFlavor
Deprecated.as of 1.3.static DataFlavor
DataFlavor.selectionHtmlFlavor
Represents a piece of an HTML markup.static DataFlavor
DataFlavor.stringFlavor
TheDataFlavor
representing a Java Unicode String class, where:Modifier and TypeMethodDescriptionstatic DataFlavor
SystemFlavorMap.decodeDataFlavor(String nat)
Decodes aString
native for use as aDataFlavor
.Clipboard.getAvailableDataFlavors()
Returns an array ofDataFlavor
s in which the current contents of this clipboard can be provided.static DataFlavor
DataFlavor.getTextPlainUnicodeFlavor()
Returns aDataFlavor
representing plain text with Unicode encoding, where:StringSelection.getTransferDataFlavors()
Returns an array of flavors in which thisTransferable
can provide the data.Transferable.getTransferDataFlavors()
Returns an array of DataFlavor objects indicating the flavors the data can be provided in.static DataFlavor
DataFlavor.selectBestTextFlavor(DataFlavor[] availableFlavors)
Selects the best textDataFlavor
from an array ofDataFlavor
s.Modifier and TypeMethodDescriptionFlavorTable.getFlavorsForNative(String nat)
Returns aList
ofDataFlavor
s to which the specifiedString
corresponds.SystemFlavorMap.getFlavorsForNative(String nat)
Returns aList
ofDataFlavor
s to which the specifiedString
native can be translated by the data transfer subsystem.FlavorMap.getFlavorsForNatives(String[] natives)
Returns aMap
of the specifiedString
natives to their correspondingDataFlavor
.SystemFlavorMap.getFlavorsForNatives(String[] natives)
Returns aMap
of the specifiedString
natives to their most preferredDataFlavor
.FlavorMap.getNativesForFlavors(DataFlavor[] flavors)
Returns aMap
of the specifiedDataFlavor
s to their correspondingString
native.SystemFlavorMap.getNativesForFlavors(DataFlavor[] flavors)
Returns aMap
of the specifiedDataFlavor
s to their most preferredString
native.Modifier and TypeMethodDescriptionvoid
SystemFlavorMap.addFlavorForUnencodedNative(String nat, DataFlavor flav)
Adds a mapping from a singleString
native to a singleDataFlavor
.void
SystemFlavorMap.addUnencodedNativeForFlavor(DataFlavor flav, String nat)
Adds a mapping from the specifiedDataFlavor
(and allDataFlavor
s equal to the specifiedDataFlavor
) to the specifiedString
native.static String
SystemFlavorMap.encodeDataFlavor(DataFlavor flav)
Encodes aDataFlavor
for use as aString
native.boolean
DataFlavor.equals(DataFlavor that)
This method has the same behavior asequals(Object)
.Clipboard.getData(DataFlavor flavor)
Returns an object representing the current contents of this clipboard in the specifiedDataFlavor
.FlavorTable.getNativesForFlavor(DataFlavor flav)
Returns aList
ofString
natives to which the specifiedDataFlavor
corresponds.SystemFlavorMap.getNativesForFlavor(DataFlavor flav)
Returns aList
ofString
natives to which the specifiedDataFlavor
can be translated by the data transfer subsystem.FlavorMap.getNativesForFlavors(DataFlavor[] flavors)
Returns aMap
of the specifiedDataFlavor
s to their correspondingString
native.SystemFlavorMap.getNativesForFlavors(DataFlavor[] flavors)
Returns aMap
of the specifiedDataFlavor
s to their most preferredString
native.StringSelection.getTransferData(DataFlavor flavor)
Returns theTransferable
's data in the requestedDataFlavor
if possible.Transferable.getTransferData(DataFlavor flavor)
Returns an object which represents the data to be transferred.boolean
Clipboard.isDataFlavorAvailable(DataFlavor flavor)
Returns whether or not the current contents of this clipboard can be provided in the specifiedDataFlavor
.boolean
StringSelection.isDataFlavorSupported(DataFlavor flavor)
Returns whether the requested flavor is supported by thisTransferable
.boolean
Transferable.isDataFlavorSupported(DataFlavor flavor)
Returns whether or not the specified data flavor is supported for this object.boolean
DataFlavor.isMimeTypeEqual(DataFlavor dataFlavor)
Compares themimeType
of twoDataFlavor
objects.boolean
DataFlavor.match(DataFlavor that)
Identical toequals(DataFlavor)
.static DataFlavor
DataFlavor.selectBestTextFlavor(DataFlavor[] availableFlavors)
Selects the best textDataFlavor
from an array ofDataFlavor
s.void
SystemFlavorMap.setFlavorsForNative(String nat, DataFlavor[] flavors)
Discards the current mappings for the specifiedString
native, and creates new mappings to the specifiedDataFlavor
s.void
SystemFlavorMap.setNativesForFlavor(DataFlavor flav, String[] natives)
Discards the current mappings for the specifiedDataFlavor
and allDataFlavor
s equal to the specifiedDataFlavor
, and creates new mappings to the specifiedString
natives.ModifierConstructorDescriptionUnsupportedFlavorException(DataFlavor flavor)
Constructs an UnsupportedFlavorException. -
Uses of DataFlavor in java.awt.dnd
Modifier and TypeMethodDescriptionprotected DataFlavor[]
DropTargetContext.getCurrentDataFlavors()
get the available DataFlavors of theTransferable
operand of this operation.DropTargetDragEvent.getCurrentDataFlavors()
This method returns the currentDataFlavor
s from theDropTargetContext
.DropTargetDropEvent.getCurrentDataFlavors()
This method returns the current DataFlavors.DropTargetContext.TransferableProxy.getTransferDataFlavors()
Returns an array of DataFlavor objects indicating the flavors the data can be provided in by the encapsulated transferable.Modifier and TypeMethodDescriptionprotected List<DataFlavor>
DropTargetContext.getCurrentDataFlavorsAsList()
This method returns a the currently available DataFlavors of theTransferable
operand as ajava.util.List
.DropTargetDragEvent.getCurrentDataFlavorsAsList()
This method returns the currentDataFlavor
s as ajava.util.List
DropTargetDropEvent.getCurrentDataFlavorsAsList()
This method returns the currently availableDataFlavor
s as ajava.util.List
.Modifier and TypeMethodDescriptionDropTargetContext.TransferableProxy.getTransferData(DataFlavor df)
Returns an object which represents the data provided by the encapsulated transferable for the requested data flavor.protected boolean
DropTargetContext.isDataFlavorSupported(DataFlavor df)
This method returns aboolean
indicating if the givenDataFlavor
is supported by thisDropTargetContext
.boolean
DropTargetContext.TransferableProxy.isDataFlavorSupported(DataFlavor flavor)
Returns whether or not the specified data flavor is supported by the encapsulated transferable.boolean
DropTargetDragEvent.isDataFlavorSupported(DataFlavor df)
This method returns aboolean
indicating if the specifiedDataFlavor
is supported.boolean
DropTargetDropEvent.isDataFlavorSupported(DataFlavor df)
This method returns aboolean
indicating if the specifiedDataFlavor
is available from the source. -
Uses of DataFlavor in javax.accessibility
Modifier and TypeMethodDescriptionAccessibleStreamable.getMimeTypes()
Returns an array ofDataFlavor
objects for the MIME types this object supports.Modifier and TypeMethodDescriptionAccessibleStreamable.getStream(DataFlavor flavor)
Returns anInputStream
for aDataFlavor
. -
Uses of DataFlavor in javax.swing
Modifier and TypeMethodDescriptionTransferHandler.TransferSupport.getDataFlavors()
Returns the data flavors for this transfer.Modifier and TypeMethodDescriptionboolean
TransferHandler.canImport(JComponent comp, DataFlavor[] transferFlavors)
Indicates whether a component will accept an import of the given set of data flavors prior to actually attempting to import it.boolean
TransferHandler.TransferSupport.isDataFlavorSupported(DataFlavor df)
Returns whether or not the given data flavor is supported.