Java Platform 1.2

java.awt.datatransfer
Class SystemFlavorMap

java.lang.Object
  |
  +--java.awt.datatransfer.SystemFlavorMap

public final class SystemFlavorMap
extends Object
implements FlavorMap

The SystemFlavorMap is an externally configurable map that maps platform native type names (strings) to MIME type strings, and also their associated DataFlavors.

This map is used by the DnD system to map platform data types to MIME types to enable the transfer of objects between Java and the platform via the platform DnD System.

Since:
JDK1.2

Method Summary
static DataFlavor decodeDataFlavor(String atom)
           
static String decodeJavaMIMEType(String atom)
           
static String encodeDataFlavor(DataFlavor df)
           
static String encodeJavaMIMEType(String mimeType)
           
static FlavorMap getDefaultFlavorMap()
          get the default system implementation
 Map getFlavorsForNatives(String[] natives)
          map natives to corresponding flavors
 Map getNativesForFlavors(DataFlavor[] flavors)
          map flavors to native data types names
static boolean isJavaMIMEType(String atom)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDefaultFlavorMap

public static FlavorMap getDefaultFlavorMap()
get the default system implementation

getNativesForFlavors

public Map getNativesForFlavors(DataFlavor[] flavors)
map flavors to native data types names
Specified by:
getNativesForFlavors in interface FlavorMap

getFlavorsForNatives

public Map getFlavorsForNatives(String[] natives)
map natives to corresponding flavors
Specified by:
getFlavorsForNatives in interface FlavorMap

encodeJavaMIMEType

public static String encodeJavaMIMEType(String mimeType)
Returns:
encode a Java MIMEType for use as a native type name

encodeDataFlavor

public static String encodeDataFlavor(DataFlavor df)
Returns:
encode a Java MIMEType for use as a native type name

isJavaMIMEType

public static boolean isJavaMIMEType(String atom)
Returns:
if the native type string is an encoded Java MIMEType

decodeJavaMIMEType

public static String decodeJavaMIMEType(String atom)
Returns:
the decoded Java MIMEType string

decodeDataFlavor

public static DataFlavor decodeDataFlavor(String atom)
                                   throws ClassNotFoundException
Returns:
the decoded Java MIMEType as a DataFlavor

Java Platform 1.2

Submit a bug or feature Version 1.2 of Java Platform API Specification
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.