|
Bali Share 1.1.18 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.bali.share.datatransfer.CompoundTransferable
CompoundTransferables make it simpler to provide Transferables that support multiple data types. They do not provide support for Transferables containing multiple objects, a subtle but important distinction. In general, all the Transferables should simply be different representations of the same underlying data.
Clients should always order the sub-transferables
so that the highest-fidelity format is first. For
example, a styled text format should be placed before
a plain text format. Conversely, clients that read data
from Transferables (any Transferables, not just this class),
should always request their preferred data flavor first
if they have a preference. If there is no clear preferred
transferable, pick the first DataFlavor you support
returned by getTransferDataFlavors
.
ObjectTransferable
Constructor Summary | |
CompoundTransferable(java.awt.datatransfer.Transferable[] transferables)
Creates a CompoundTransferable, joining all the provided transferables into a single transferable. |
|
CompoundTransferable(java.awt.datatransfer.Transferable a,
java.awt.datatransfer.Transferable b)
Creates a CompoundTransferable out of two separate Transferables. |
Method Summary | |
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 |
Constructor Detail |
public CompoundTransferable(java.awt.datatransfer.Transferable a, java.awt.datatransfer.Transferable b)
a
- the first transferableb
- the second transferablepublic CompoundTransferable(java.awt.datatransfer.Transferable[] transferables)
transferables
- an array of Transferable implementationsMethod Detail |
public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors
in interface java.awt.datatransfer.Transferable
public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
isDataFlavorSupported
in interface java.awt.datatransfer.Transferable
flavor
- the requested flavor for the datapublic final java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor) throws java.awt.datatransfer.UnsupportedFlavorException, java.io.IOException
getTransferData
in interface java.awt.datatransfer.Transferable
flavor
- the requested flavor for the datajava.io.IOException
- if the data is no longer available
in the requested flavor.java.awt.datatransfer.UnsupportedFlavorException
- if the requested data flavor is
not supported.
|
Bali Share 1.1.18 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |