Package docking.dnd
Class GenericDataFlavor
- java.lang.Object
- 
- java.awt.datatransfer.DataFlavor
- 
- docking.dnd.GenericDataFlavor
 
 
- 
- All Implemented Interfaces:
- java.io.Externalizable,- java.io.Serializable,- java.lang.Cloneable
 
 public class GenericDataFlavor extends java.awt.datatransfer.DataFlavorGeneric data flavor class to override the equals(DataFlavor) method in order to have data flavors support the same general class types such as an ArrayList.- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description GenericDataFlavor()Construct a new GenericDataFlavor.GenericDataFlavor(java.lang.Class<?> representationClass, java.lang.String humanPresentableName)Construct a GenericDataFlavor that represents a Java classGenericDataFlavor(java.lang.String mimeType)construct a GenericDataFlavor from a Mime Type string.GenericDataFlavor(java.lang.String mimeType, java.lang.String humanPresentableName)Construct a GenericDataFlavor that represents a MimeType If the mimeType is "application/x-java-serialized-object; class=", the result is the same as calling new GenericDataFlavor(Class:forName( ) GenericDataFlavor(java.lang.String mimeType, java.lang.String humanPresentableName, java.lang.ClassLoader classLoader)Construct a GenericDataFlavor that represents a MimeType If the mimeType is "application/x-java-serialized-object; class=", the result is the same as calling new GenericDataFlavor(Class:forName( ). 
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.awt.datatransfer.DataFlavor dataFlavor)Return true if dataFlavor equals this generic data flavor.booleanequals(java.lang.Object obj)Return true if obj is equal this generic data flavor.- 
Methods inherited from class java.awt.datatransfer.DataFlavorclone, equals, getDefaultRepresentationClass, getDefaultRepresentationClassAsString, getHumanPresentableName, getMimeType, getParameter, getPrimaryType, getReaderForText, getRepresentationClass, getSubType, getTextPlainUnicodeFlavor, hashCode, isFlavorJavaFileListType, isFlavorRemoteObjectType, isFlavorSerializedObjectType, isFlavorTextType, isMimeTypeEqual, isMimeTypeEqual, isMimeTypeSerializedObject, isRepresentationClassByteBuffer, isRepresentationClassCharBuffer, isRepresentationClassInputStream, isRepresentationClassReader, isRepresentationClassRemote, isRepresentationClassSerializable, match, normalizeMimeType, normalizeMimeTypeParameter, readExternal, selectBestTextFlavor, setHumanPresentableName, toString, tryToLoadClass, writeExternal
 
- 
 
- 
- 
- 
Constructor Detail- 
GenericDataFlavorpublic GenericDataFlavor() Construct a new GenericDataFlavor.
 - 
GenericDataFlavorpublic GenericDataFlavor(java.lang.Class<?> representationClass, java.lang.String humanPresentableName)Construct a GenericDataFlavor that represents a Java class- Parameters:
- representationClass- the class used to transfer data in this flavor
- humanPresentableName- the human-readable string used to identify this flavor. If this parameter is null then the value of the the MIME Content Type is used.
 
 - 
GenericDataFlavorpublic GenericDataFlavor(java.lang.String mimeType) throws java.lang.ClassNotFoundExceptionconstruct a GenericDataFlavor from a Mime Type string.- Parameters:
- mimeType- he string used to identify the MIME type for this flavor The string must specify a "class=" parameter in order to succeed in constructing a DataFlavor.
- Throws:
- java.lang.ClassNotFoundException- if the class could not be loaded
- java.lang.IllegalArgumentException- thrown if mimeType does not specify a "class=" parameter
 
 - 
GenericDataFlavorpublic GenericDataFlavor(java.lang.String mimeType, java.lang.String humanPresentableName)Construct a GenericDataFlavor that represents a MimeType If the mimeType is "application/x-java-serialized-object; class=", the result is the same as calling new GenericDataFlavor(Class:forName( ) - Parameters:
- mimeType- the string used to identify the MIME type for this flavor
- humanPresentableName- the human-readable string used to identify this flavor
- Throws:
- java.lang.IllegalArgumentException- thrown if the mimeType does not specify a "class=" parameter, or if the class is not successfully loaded
 
 - 
GenericDataFlavorpublic GenericDataFlavor(java.lang.String mimeType, java.lang.String humanPresentableName, java.lang.ClassLoader classLoader) throws java.lang.ClassNotFoundExceptionConstruct a GenericDataFlavor that represents a MimeType If the mimeType is "application/x-java-serialized-object; class=", the result is the same as calling new GenericDataFlavor(Class:forName( ). - Parameters:
- mimeType- the string used to identify the MIME type for this flavor
- humanPresentableName- the human-readable string used to identify this flavor.
- classLoader- class loader to load the class
- Throws:
- java.lang.ClassNotFoundException- is thrown if class could not be loaded
 
 
- 
 - 
Method Detail- 
equalspublic boolean equals(java.awt.datatransfer.DataFlavor dataFlavor) Return true if dataFlavor equals this generic data flavor.- Overrides:
- equalsin class- java.awt.datatransfer.DataFlavor
 
 - 
equalspublic boolean equals(java.lang.Object obj) Return true if obj is equal this generic data flavor.- Overrides:
- equalsin class- java.awt.datatransfer.DataFlavor
 
 
- 
 
-