|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dsto.dfc.swing.dnd.ObjectTransferable
public class ObjectTransferable
Allows any object or array of objects to be stored as a Transferable. Automatically supports highest-fidelity transfer by choosing best supported flavors.
Field Summary | |
---|---|
static DataFlavor |
RAW_SERIALIZED_OBJECT_FLAVOR
|
Constructor Summary | |
---|---|
ObjectTransferable(Object[] values,
String humanName)
Create a transferable containing a list of values. |
|
ObjectTransferable(Object value,
String humanName)
Creates a transferable with a single value. |
Method Summary | |
---|---|
void |
dispose()
Disposes all disposable values. |
protected static Class |
findCommonClass(Object[] values)
Find the most specific class common to a set of values. |
Object |
getTransferData(DataFlavor flavor)
|
DataFlavor[] |
getTransferDataFlavors()
|
boolean |
isDataFlavorSupported(DataFlavor flavor)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final DataFlavor RAW_SERIALIZED_OBJECT_FLAVOR
Constructor Detail |
---|
public ObjectTransferable(Object value, String humanName)
value.getClass ()
. To
use a different representation class (eg an interface of value),
use the array version of this constructor instead and ensure the
array's component class type is the desired interface type.
public ObjectTransferable(Object[] values, String humanName)
Method Detail |
---|
public void dispose()
dispose
in interface Disposable
protected static Class findCommonClass(Object[] values)
public DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors
in interface Transferable
public boolean isDataFlavorSupported(DataFlavor flavor)
isDataFlavorSupported
in interface Transferable
public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException
getTransferData
in interface Transferable
UnsupportedFlavorException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |