public static class CommandToCodePanel.TransferableString extends Object implements Serializable, Transferable
| Constructor and Description |
|---|
TransferableString(String data)
Initializes the container.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getData()
Returns the underlying data string.
|
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.
|
String |
toString()
Returns the underlying data string.
|
public TransferableString(String data)
data - the string to transferpublic DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors in interface Transferablepublic boolean isDataFlavorSupported(DataFlavor flavor)
isDataFlavorSupported in interface Transferableflavor - the requested flavor for the datapublic Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException
getTransferData in interface Transferableflavor - 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()public String getData()
Copyright © 2016 University of Waikato, Hamilton, NZ. All Rights Reserved.