com.threerings.opengl.gui
Class LocalTransferHandler<T>

java.lang.Object
  extended by com.threerings.opengl.gui.TransferHandler
      extended by com.threerings.opengl.gui.LocalTransferHandler<T>

public class LocalTransferHandler<T>
extends TransferHandler

A handler for local object references.


Field Summary
 
Fields inherited from class com.threerings.opengl.gui.TransferHandler
COPY, COPY_OR_MOVE, MOVE, NONE
 
Constructor Summary
LocalTransferHandler(Class<T> clazz)
          Creates a new transfer handler for the specified class.
 
Method Summary
 boolean canImport(Component comp, DataFlavor[] transferFlavors)
          Determines whether the specified component can accept an import prior to attempting one.
 Icon getVisualRepresentation(Transferable data)
          Returns the visual representation for the specified transferable, or null to use the default.
 boolean importData(Component comp, Transferable data)
          Attempts to import data from the specified component.
 
Methods inherited from class com.threerings.opengl.gui.TransferHandler
exportAsDrag, exportToClipboard, getSourceActions
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalTransferHandler

public LocalTransferHandler(Class<T> clazz)
Creates a new transfer handler for the specified class.

Method Detail

getVisualRepresentation

public Icon getVisualRepresentation(Transferable data)
Description copied from class: TransferHandler
Returns the visual representation for the specified transferable, or null to use the default.

Overrides:
getVisualRepresentation in class TransferHandler

canImport

public boolean canImport(Component comp,
                         DataFlavor[] transferFlavors)
Description copied from class: TransferHandler
Determines whether the specified component can accept an import prior to attempting one.

Overrides:
canImport in class TransferHandler

importData

public boolean importData(Component comp,
                          Transferable data)
Description copied from class: TransferHandler
Attempts to import data from the specified component.

Overrides:
importData in class TransferHandler
Returns:
true if the data was successfully imported, false if not.


Copyright © 2011. All Rights Reserved.