AwtClipboard
Date: 2019-10-22

org.jmol.awt

## Class AwtClipboard

- java.lang.Object
- - org.jmol.awt.AwtClipboard

- All Implemented Interfaces:
    java.awt.datatransfer.Transferable

      public class AwtClipboard
      extends java.lang.Object
      implements java.awt.datatransfer.Transferable

  This class is used to transfer text or an image into the clipboard and to get tet from the clipboard. Simplified by Bob Hanson
  Author:
    Nicolas Vervelle

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.awt.Image` | `image` The image to transfer into the clipboard.
    `private java.lang.String` | `text`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `private` | `AwtClipboard(java.lang.Object image)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `getClipboardText()` Get the String residing on the clipboard.
    `java.lang.Object` | `getTransferData(java.awt.datatransfer.DataFlavor flavor)`
    `java.awt.datatransfer.DataFlavor[]` | `getTransferDataFlavors()`
    `boolean` | `isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)`
    `static void` | `setClipboard(java.lang.Object textOrImage)` Transfers text or image into the clipboard.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### image

          private java.awt.Image image

      The image to transfer into the clipboard.

    - #### text

          private java.lang.String text

  - ### Constructor Detail

    - #### AwtClipboard

          private AwtClipboard(java.lang.Object image)

  - ### Method Detail

    - #### setClipboard

          public static void setClipboard(java.lang.Object textOrImage)

      Transfers text or image into the clipboard.
      Parameters:
        `textOrImage` - to transfer into the clipboard.

    - #### getTransferDataFlavors

          public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()

      Specified by:
        `getTransferDataFlavors` in interface `java.awt.datatransfer.Transferable`

    - #### isDataFlavorSupported

          public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)

      Specified by:
        `isDataFlavorSupported` in interface `java.awt.datatransfer.Transferable`

    - #### getTransferData

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

      Specified by:
        `getTransferData` in interface `java.awt.datatransfer.Transferable`
      Throws:
        `java.awt.datatransfer.UnsupportedFlavorException`
        `java.io.IOException`

    - #### getClipboardText

          public static java.lang.String getClipboardText()

      Get the String residing on the clipboard. Or, if it is a file list, get the load command associated with that. from http://www.javapractices.com/Topic82.cjp
      Returns:
        any text found on the Clipboard; if none found, return an empty String.