Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright 2012-04-26 Werner Randelshofer
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.monte.media.gui.datatransfer
Class StringTransferable

    java.lang.Object
      org.monte.media.gui.datatransfer.AbstractTransferable
          org.monte.media.gui.datatransfer.StringTransferable

All Implemented Interfaces:
  java.awt.datatransfer.Transferable

    public class StringTransferable

extends AbstractTransferable

StringTransferable.

Note: This transferable should always be used in conjunction with PlainTextTransferable.

Usage:

     String text = "bla";
     CompositeTransfer t = new CompositeTransferable();
     t.add(new StringTransferable(text));
     t.add(new PlainTextTransferable(text));

Version:
  1.0 22. August 2007 Created.
Author:
  Werner Randelshofer

Constructor Summary
`StringTransferable(java.awt.datatransfer.DataFlavor[] flavors, java.lang.String string)`
`StringTransferable(java.awt.datatransfer.DataFlavor flavor, java.lang.String string)`
`StringTransferable(java.lang.String string)`

Method Summary
`protected static java.awt.datatransfer.DataFlavor[]` | `getDefaultFlavors()`
`java.lang.Object` | `getTransferData(java.awt.datatransfer.DataFlavor flavor)`

Methods inherited from class org.monte.media.gui.datatransfer.AbstractTransferable
`getTransferDataFlavors, isDataFlavorSupported`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### StringTransferable

    public StringTransferable(java.lang.String string)

### StringTransferable

    public StringTransferable(java.awt.datatransfer.DataFlavor flavor,
                              java.lang.String string)

### StringTransferable

    public StringTransferable(java.awt.datatransfer.DataFlavor[] flavors,
                              java.lang.String string)

Method Detail

### getTransferData

    public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
                                     throws java.awt.datatransfer.UnsupportedFlavorException,
                                            java.io.IOException

  Throws:
    `java.awt.datatransfer.UnsupportedFlavorException`
    `java.io.IOException`

### getDefaultFlavors

    protected static java.awt.datatransfer.DataFlavor[] getDefaultFlavors()

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright 2012-04-26 Werner Randelshofer
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD