DESY ACOP Beans Home

com.cosylab.gui.components.util
Class ImageClipboardHelper

java.lang.Object
  extended by javax.swing.TransferHandler
      extended by com.cosylab.gui.components.util.ImageClipboardHelper
All Implemented Interfaces:
java.awt.datatransfer.Transferable, java.io.Serializable

public class ImageClipboardHelper
extends javax.swing.TransferHandler
implements java.awt.datatransfer.Transferable

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.TransferHandler
javax.swing.TransferHandler.DropLocation, javax.swing.TransferHandler.TransferSupport
 
Field Summary
 
Fields inherited from class javax.swing.TransferHandler
COPY, COPY_OR_MOVE, LINK, MOVE, NONE
 
Constructor Summary
ImageClipboardHelper()
           
 
Method Summary
 java.awt.datatransfer.Transferable createTransferable(javax.swing.JComponent comp)
           
 int getSourceActions(javax.swing.JComponent c)
          we need to define action copy , because we are copying image to sys.
 java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
           
 java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
           
 boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
           
 
Methods inherited from class javax.swing.TransferHandler
canImport, canImport, exportAsDrag, exportDone, exportToClipboard, getCopyAction, getCutAction, getPasteAction, getVisualRepresentation, importData, importData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageClipboardHelper

public ImageClipboardHelper()
Method Detail

getSourceActions

public int getSourceActions(javax.swing.JComponent c)
we need to define action copy , because we are copying image to sys. clipboard

Overrides:
getSourceActions in class javax.swing.TransferHandler

createTransferable

public java.awt.datatransfer.Transferable createTransferable(javax.swing.JComponent comp)
Overrides:
createTransferable in class javax.swing.TransferHandler

getTransferData

public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
Specified by:
getTransferData in interface java.awt.datatransfer.Transferable

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


Copyright © 2010. All Rights Reserved.