public class ETableTransferable extends Object implements Transferable
Modifier and Type | Field and Description |
---|---|
protected String |
plainData
The data content of this transferable
|
Constructor and Description |
---|
ETableTransferable(String plainData)
Create a new transferable.
|
Modifier and Type | Method and Description |
---|---|
protected String |
getPlainData()
Fetch the data in a text/plain format.
|
Object |
getTransferData(DataFlavor flavor)
Returns an object which represents the data to be transferred.
|
DataFlavor[] |
getTransferDataFlavors()
Returns an array of DataFlavor objects indicating the flavors the data
can be provided in.
|
boolean |
isDataFlavorSupported(DataFlavor flavor)
Returns whether or not the specified data flavor is supported for
this object.
|
protected boolean |
isPlainFlavor(DataFlavor flavor)
Returns whether or not the specified data flavor is an plain flavor that
is supported.
|
protected boolean |
isPlainSupported()
Should the plain text flavors be offered? If so, the method
getPlainData should be implemented to provide something reasonable.
|
protected boolean |
isStringFlavor(DataFlavor flavor)
Returns whether or not the specified data flavor is a String flavor that
is supported.
|
protected String plainData
public ETableTransferable(String plainData)
plainData
- The data content of this transferablepublic DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors
in interface Transferable
public boolean isDataFlavorSupported(DataFlavor flavor)
isDataFlavorSupported
in interface Transferable
flavor
- the requested flavor for the datapublic Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException
getTransferData
in interface Transferable
flavor
- the requested flavor for the dataIOException
- if the data is no longer available
in the requested flavor.UnsupportedFlavorException
- if the requested data flavor is
not supported.DataFlavor.getRepresentationClass()
protected boolean isPlainFlavor(DataFlavor flavor)
flavor
- the requested flavor for the dataprotected boolean isPlainSupported()
protected String getPlainData()
protected boolean isStringFlavor(DataFlavor flavor)
flavor
- the requested flavor for the data