JHotDraw 7.4.1

org.jhotdraw.draw
Class DefaultDrawingViewTransferHandler

java.lang.Object
  extended by javax.swing.TransferHandler
      extended by org.jhotdraw.draw.DefaultDrawingViewTransferHandler
All Implemented Interfaces:
java.io.Serializable

public class DefaultDrawingViewTransferHandler
extends javax.swing.TransferHandler

Default TransferHandler for DrawingView objects.

Version:
$Id: DefaultDrawingViewTransferHandler.java 604 2010-01-09 12:00:29Z rawcoder $
Author:
Werner Randelshofer
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
DefaultDrawingViewTransferHandler()
          Creates a new instance.
 
Method Summary
 boolean canImport(javax.swing.JComponent comp, java.awt.datatransfer.DataFlavor[] transferFlavors)
           
protected  java.awt.datatransfer.Transferable createTransferable(DrawingView view, java.util.Set<Figure> transferFigures)
           
protected  java.awt.datatransfer.Transferable createTransferable(javax.swing.JComponent c)
           
 void exportAsDrag(javax.swing.JComponent comp, java.awt.event.InputEvent e, int action)
           
protected  void exportDone(javax.swing.JComponent source, java.awt.datatransfer.Transferable data, int action)
           
 int getSourceActions(javax.swing.JComponent c)
           
 javax.swing.Icon getVisualRepresentation(java.awt.datatransfer.Transferable t)
           
 boolean importData(javax.swing.JComponent comp, java.awt.datatransfer.Transferable t)
           
protected  boolean importData(javax.swing.JComponent comp, java.awt.datatransfer.Transferable t, java.util.HashSet<Figure> transferFigures, java.awt.Point dropPoint)
          Imports data and stores the transferred figures into the supplied transferFigures collection.
 boolean importData(javax.swing.TransferHandler.TransferSupport support)
           
protected  void moveToDropPoint(javax.swing.JComponent component, java.util.HashSet<Figure> transferFigures, java.awt.Point dropPoint)
           
 
Methods inherited from class javax.swing.TransferHandler
canImport, exportToClipboard, getCopyAction, getCutAction, getPasteAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDrawingViewTransferHandler

public DefaultDrawingViewTransferHandler()
Creates a new instance.

Method Detail

importData

public boolean importData(javax.swing.JComponent comp,
                          java.awt.datatransfer.Transferable t)
Overrides:
importData in class javax.swing.TransferHandler

importData

public boolean importData(javax.swing.TransferHandler.TransferSupport support)
Overrides:
importData in class javax.swing.TransferHandler

importData

protected boolean importData(javax.swing.JComponent comp,
                             java.awt.datatransfer.Transferable t,
                             java.util.HashSet<Figure> transferFigures,
                             java.awt.Point dropPoint)
Imports data and stores the transferred figures into the supplied transferFigures collection.


moveToDropPoint

protected void moveToDropPoint(javax.swing.JComponent component,
                               java.util.HashSet<Figure> transferFigures,
                               java.awt.Point dropPoint)

getSourceActions

public int getSourceActions(javax.swing.JComponent c)
Overrides:
getSourceActions in class javax.swing.TransferHandler

createTransferable

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

createTransferable

protected java.awt.datatransfer.Transferable createTransferable(DrawingView view,
                                                                java.util.Set<Figure> transferFigures)

exportDone

protected void exportDone(javax.swing.JComponent source,
                          java.awt.datatransfer.Transferable data,
                          int action)
Overrides:
exportDone in class javax.swing.TransferHandler

exportAsDrag

public void exportAsDrag(javax.swing.JComponent comp,
                         java.awt.event.InputEvent e,
                         int action)
Overrides:
exportAsDrag in class javax.swing.TransferHandler

getVisualRepresentation

public javax.swing.Icon getVisualRepresentation(java.awt.datatransfer.Transferable t)
Overrides:
getVisualRepresentation in class javax.swing.TransferHandler

canImport

public boolean canImport(javax.swing.JComponent comp,
                         java.awt.datatransfer.DataFlavor[] transferFlavors)
Overrides:
canImport in class javax.swing.TransferHandler

Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.