Interface ClipboardIO<T>

Type Parameters:
T - the type of the data that can be written and read from the clipboard

public interface ClipboardIO<T>
An interface for reading and writing data of a specific type from/to the Clipboard.
Author:
Werner Randelshofer
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canRead(javafx.scene.input.Clipboard clipboard)
    Returns true if data from the clipboard can be imported
    @Nullable List<T>
    read(javafx.scene.input.Clipboard clipboard)
    Returns null if read failed.
    void
    write(javafx.scene.input.Clipboard clipboard, List<T> items)
    Writes items to the clipboard
  • Method Details

    • write

      void write(javafx.scene.input.Clipboard clipboard, List<T> items)
      Writes items to the clipboard
      Parameters:
      clipboard - The clipboard
      items - the items
    • read

      @Nullable List<T> read(javafx.scene.input.Clipboard clipboard)
      Returns null if read failed.
      Parameters:
      clipboard - The clipboard
      Returns:
      the items
    • canRead

      boolean canRead(javafx.scene.input.Clipboard clipboard)
      Returns true if data from the clipboard can be imported
      Parameters:
      clipboard - The clipboard
      Returns:
      true if import is possible