com.alee.extended.drag
Class ProxyDropHandler

java.lang.Object
  extended by javax.swing.TransferHandler
      extended by com.alee.extended.drag.ProxyDropHandler
All Implemented Interfaces:
java.io.Serializable

public class ProxyDropHandler
extends javax.swing.TransferHandler

This TransferHandler allows you to proxify drop event to another JComponent.

Author:
Mikle Garin
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
ProxyDropHandler()
          Constructs new ProxyDropHandler that passes drop actions to parent components.
ProxyDropHandler(javax.swing.JComponent component)
          Constructs new ProxyDropHandler that passes drop actions to specified component.
 
Method Summary
 boolean canImport(javax.swing.TransferHandler.TransferSupport info)
          
 javax.swing.JComponent getComponent()
          Returns component to pass drop actions to.
 boolean importData(javax.swing.TransferHandler.TransferSupport info)
          
 void setComponent(javax.swing.JComponent component)
          Sets component to pass drop actions to.
 
Methods inherited from class javax.swing.TransferHandler
canImport, createTransferable, exportAsDrag, exportDone, exportToClipboard, getCopyAction, getCutAction, getPasteAction, getSourceActions, getVisualRepresentation, importData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyDropHandler

public ProxyDropHandler()
Constructs new ProxyDropHandler that passes drop actions to parent components.


ProxyDropHandler

public ProxyDropHandler(javax.swing.JComponent component)
Constructs new ProxyDropHandler that passes drop actions to specified component.

Parameters:
component - component to pass drop actions to
Method Detail

getComponent

public javax.swing.JComponent getComponent()
Returns component to pass drop actions to. Null means that drop actions are passes to parent components.

Returns:
component to pass drop actions to

setComponent

public void setComponent(javax.swing.JComponent component)
Sets component to pass drop actions to. If set to null drop actions will be passes to parent components.

Parameters:
component - component to pass drop actions to

canImport

public boolean canImport(javax.swing.TransferHandler.TransferSupport info)

Overrides:
canImport in class javax.swing.TransferHandler

importData

public boolean importData(javax.swing.TransferHandler.TransferSupport info)

Overrides:
importData in class javax.swing.TransferHandler