Class RMEditorClipboard
- java.lang.Object
- 
- com.inductiveautomation.rm.editor.RMEditorClipboard
 
- 
- All Implemented Interfaces:
- java.awt.datatransfer.Transferable
 
 public class RMEditorClipboard extends java.lang.Object implements java.awt.datatransfer.TransferableHandles editor methods specific to clipboard operations (cut, copy paste).
- 
- 
Field SummaryFields Modifier and Type Field Description static java.awt.datatransfer.DataFlavorRMDataFlavorstatic java.awt.datatransfer.DataFlavor[]SupportedFlavors
 - 
Constructor SummaryConstructors Constructor Description RMEditorClipboard(byte[] bytes)Creates new editor clipboard object with the given bytes.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidcopy(RMEditor anEditor)Handles editor copy operation.static voidcut(RMEditor anEditor)Handles editor cut operation.static RMShapegetShapeFromClipboard(RMEditor anEditor)Returns the first Shape read from the system clipboard.static java.lang.ObjectgetShapesFromClipboard(RMEditor anEditor, java.awt.datatransfer.Transferable contents)Returns the shape or shapes read from the given transferable (uses system clipboard if null).java.lang.ObjectgetTransferData(java.awt.datatransfer.DataFlavor aFlavor)Transferable method - returns the transfer data for the specified flavor.java.awt.datatransfer.DataFlavor[]getTransferDataFlavors()Transferable method - returns the transfer data flavors supported by this transferable.static RMShapegetTransferPDF(java.awt.datatransfer.Transferable contents)Returns an RMImage with the contents if there's a pdf image on the clipboard.static RMShapegetTransferText(java.awt.datatransfer.Transferable contents)Returns an RMText object with the contents if there's a plain text string on the clipboard.booleanisDataFlavorSupported(java.awt.datatransfer.DataFlavor aFlavor)Transferable method - returns whether the given flavor is supported.static voidpaste(RMEditor anEditor)Handles editor paste operation.static voidpaste(RMEditor anEditor, java.awt.datatransfer.Transferable contents, RMParentShape aParent, java.awt.geom.Point2D aPoint)Handles editor paste operation for given transferable, parent shape and location.
 
- 
- 
- 
Method Detail- 
cutpublic static void cut(RMEditor anEditor) Handles editor cut operation.
 - 
copypublic static void copy(RMEditor anEditor) Handles editor copy operation.
 - 
pastepublic static void paste(RMEditor anEditor) Handles editor paste operation.
 - 
pastepublic static void paste(RMEditor anEditor, java.awt.datatransfer.Transferable contents, RMParentShape aParent, java.awt.geom.Point2D aPoint) Handles editor paste operation for given transferable, parent shape and location.
 - 
getShapeFromClipboardpublic static RMShape getShapeFromClipboard(RMEditor anEditor) Returns the first Shape read from the system clipboard.
 - 
getShapesFromClipboardpublic static java.lang.Object getShapesFromClipboard(RMEditor anEditor, java.awt.datatransfer.Transferable contents) Returns the shape or shapes read from the given transferable (uses system clipboard if null).
 - 
getTransferTextpublic static RMShape getTransferText(java.awt.datatransfer.Transferable contents) Returns an RMText object with the contents if there's a plain text string on the clipboard.
 - 
getTransferPDFpublic static RMShape getTransferPDF(java.awt.datatransfer.Transferable contents) Returns an RMImage with the contents if there's a pdf image on the clipboard.
 - 
getTransferDataFlavorspublic java.awt.datatransfer.DataFlavor[] getTransferDataFlavors() Transferable method - returns the transfer data flavors supported by this transferable.- Specified by:
- getTransferDataFlavorsin interface- java.awt.datatransfer.Transferable
 
 - 
isDataFlavorSupportedpublic boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor aFlavor) Transferable method - returns whether the given flavor is supported.- Specified by:
- isDataFlavorSupportedin interface- java.awt.datatransfer.Transferable
 
 - 
getTransferDatapublic java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor aFlavor) throws java.awt.datatransfer.UnsupportedFlavorException, java.io.IOExceptionTransferable method - returns the transfer data for the specified flavor.- Specified by:
- getTransferDatain interface- java.awt.datatransfer.Transferable
- Throws:
- java.awt.datatransfer.UnsupportedFlavorException
- java.io.IOException
 
 
- 
 
-