public class DefaultDrawingViewTransferHandler
extends javax.swing.TransferHandler
Constructor and Description |
---|
DefaultDrawingViewTransferHandler()
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
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) |
public DefaultDrawingViewTransferHandler()
public boolean importData(javax.swing.JComponent comp, java.awt.datatransfer.Transferable t)
importData
in class javax.swing.TransferHandler
public boolean importData(javax.swing.TransferHandler.TransferSupport support)
importData
in class javax.swing.TransferHandler
protected boolean importData(javax.swing.JComponent comp, java.awt.datatransfer.Transferable t, java.util.HashSet<Figure> transferFigures, java.awt.Point dropPoint)
protected void moveToDropPoint(javax.swing.JComponent component, java.util.HashSet<Figure> transferFigures, java.awt.Point dropPoint)
public int getSourceActions(javax.swing.JComponent c)
getSourceActions
in class javax.swing.TransferHandler
protected java.awt.datatransfer.Transferable createTransferable(javax.swing.JComponent c)
createTransferable
in class javax.swing.TransferHandler
protected java.awt.datatransfer.Transferable createTransferable(DrawingView view, java.util.Set<Figure> transferFigures)
protected void exportDone(javax.swing.JComponent source, java.awt.datatransfer.Transferable data, int action)
exportDone
in class javax.swing.TransferHandler
public void exportAsDrag(javax.swing.JComponent comp, java.awt.event.InputEvent e, int action)
exportAsDrag
in class javax.swing.TransferHandler
public javax.swing.Icon getVisualRepresentation(java.awt.datatransfer.Transferable t)
getVisualRepresentation
in class javax.swing.TransferHandler
public boolean canImport(javax.swing.JComponent comp, java.awt.datatransfer.DataFlavor[] transferFlavors)
canImport
in class javax.swing.TransferHandler