DefaultTransferableObject (OpenMap API)
Date: 2016-12-09

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bbn.openmap.tools.dnd
Class DefaultTransferableObject

    java.lang.Object
      com.bbn.openmap.tools.dnd.DefaultTransferableObject

All Implemented Interfaces:
  java.awt.datatransfer.Transferable

    public class DefaultTransferableObject

extends java.lang.Object
implements java.awt.datatransfer.Transferable

Transferable object class with the default data flavor of DataFlavor.javaJVMLocalObjectMimeType.

Field Summary
`static java.awt.datatransfer.DataFlavor` | `OBJECT_FLAVOR`

Constructor Summary
`DefaultTransferableObject(java.lang.Object data)`

Method Summary
`void` | `addTransferDataFlavor(java.awt.datatransfer.DataFlavor flavor)` Adds another supported data flavor to the array.
`java.lang.Object` | `getTransferData(java.awt.datatransfer.DataFlavor flavor)` Returns an object which represents the data to be transferred.
`java.awt.datatransfer.DataFlavor[]` | `getTransferDataFlavors()` Returns an array of DataFlavor objects indicating the flavors the data can be provided in.
`boolean` | `isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)` Returns whether or not the specified data flavor is supported for this object.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### OBJECT_FLAVOR

    public static final java.awt.datatransfer.DataFlavor OBJECT_FLAVOR

Constructor Detail

### DefaultTransferableObject

    public DefaultTransferableObject(java.lang.Object data)

Method Detail

### addTransferDataFlavor

    public void addTransferDataFlavor(java.awt.datatransfer.DataFlavor flavor)

  Adds another supported data flavor to the array.

### getTransferData

    public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
                                     throws java.awt.datatransfer.UnsupportedFlavorException

  Returns an object which represents the data to be transferred. The class of the object returned is defined by the representation class of the flavor.

  Specified by:
    `getTransferData` in interface `java.awt.datatransfer.Transferable`
  Parameters:
    `flavor` - the requested flavor for the data
  Throws:
    `IOException` - if the data is no longer available in the requested flavor.
    `java.awt.datatransfer.UnsupportedFlavorException` - if the requested data flavor is not supported.
  See Also:
    `DataFlavor.getRepresentationClass()`

### getTransferDataFlavors

    public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()

  Returns an array of DataFlavor objects indicating the flavors the data can be provided in. The array should be ordered according to preference for providing the data (from most richly descriptive to least descriptive).

  Specified by:
    `getTransferDataFlavors` in interface `java.awt.datatransfer.Transferable`
  Returns:
    an array of data flavors in which this data can be transferred

### isDataFlavorSupported

    public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)

  Returns whether or not the specified data flavor is supported for this object.

  Specified by:
    `isDataFlavorSupported` in interface `java.awt.datatransfer.Transferable`
  Parameters:
    `flavor` - the requested flavor for the data
  Returns:
    boolean indicating wjether or not the data flavor is supported

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details