|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.datatransfer.StringSelection
public class StringSelection
This class transfers a string as plain text using the clipboard.
| Constructor Summary | |
|---|---|
StringSelection(String data)
Transfer the specfied string as text. |
|
| Method Summary | |
|---|---|
Object |
getTransferData(DataFlavor flavor)
This method returns the data in the requested format. |
DataFlavor[] |
getTransferDataFlavors()
Returns a list of supported data flavors. |
boolean |
isDataFlavorSupported(DataFlavor flavor)
Tests whether or not the specified data flavor is supported. |
void |
lostOwnership(Clipboard clipboard,
Transferable contents)
Called when ownership of the clipboard object is lost. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StringSelection(String data)
data - the data for the string selection| Method Detail |
|---|
public DataFlavor[] getTransferDataFlavors()
getTransferDataFlavors in interface Transferablepublic boolean isDataFlavorSupported(DataFlavor flavor)
isDataFlavorSupported in interface Transferableflavor - The data flavor to test.
true if the data flavor is supported,
false otherwise.
public Object getTransferData(DataFlavor flavor)
throws UnsupportedFlavorException,
IOException
getTransferData in interface Transferableflavor - The desired data flavor.
UnsupportedFlavorException - If the specified flavor is not
supported.
IOException - If any other error occurs.DataFlavor.getRepresentationClass()
public void lostOwnership(Clipboard clipboard,
Transferable contents)
lostOwnership in interface ClipboardOwnerclipboard - The affected clipboard.contents - The clipboard contents.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||