Class RMEditorClipboard

java.lang.Object
com.reportmill.editor.RMEditorClipboard
All Implemented Interfaces:
Transferable

public class RMEditorClipboard extends Object implements Transferable
Handles editor methods specific to clipboard operations (cut, copy paste).
  • Field Details

    • RMDataFlavor

      public static DataFlavor RMDataFlavor
    • SupportedFlavors

      public static DataFlavor[] SupportedFlavors
  • Constructor Details

    • RMEditorClipboard

      public RMEditorClipboard(byte[] bytes)
      Creates new editor clipboard object with the given bytes.
  • Method Details

    • cut

      public static void cut(RMEditor anEditor)
      Handles editor cut operation.
    • copy

      public static void copy(RMEditor anEditor)
      Handles editor copy operation.
    • paste

      public static void paste(RMEditor anEditor)
      Handles editor paste operation.
    • paste

      public static void paste(RMEditor anEditor, Transferable contents, RMShape parent, RMPoint location)
      Handles editor paste operation for given tranferable, parent shape and location.
    • getShapeFromClipboard

      public static RMShape getShapeFromClipboard(RMEditor anEditor)
      Returns the first Shape read from the system clipboard.
    • getShapesFromClipboard

      public static Object getShapesFromClipboard(RMEditor anEditor)
      Returns the shape or shapes read from the system clipboard.
    • getShapesFromClipboard

      public static Object getShapesFromClipboard(RMEditor anEditor, Transferable contents)
      Returns the shape or shapes read from the given tranferable.
    • getTransferDataFlavors

      public DataFlavor[] getTransferDataFlavors()
      Transferable method - returns the tranfer dataflavors supported by this transferable.
      Specified by:
      getTransferDataFlavors in interface Transferable
    • isDataFlavorSupported

      public boolean isDataFlavorSupported(DataFlavor aFlavor)
      Transferable method - returns whehter the given flavor is supported.
      Specified by:
      isDataFlavorSupported in interface Transferable
    • getTransferData

      public Object getTransferData(DataFlavor aFlavor) throws UnsupportedFlavorException, IOException
      Transferable method - returns the tranfer data for the specified flavor.
      Specified by:
      getTransferData in interface Transferable
      Throws:
      UnsupportedFlavorException
      IOException