|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.opengl.gui.TransferHandler
com.threerings.opengl.gui.LocalTransferHandler<T>
public class LocalTransferHandler<T>
A handler for local object references.
| Field Summary | |
|---|---|
protected Class<T> |
_clazz
The class that we handle. |
protected DataFlavor |
_flavor
The corresponding data flavor. |
| 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 | |
|---|---|
protected boolean |
canImport(Component comp)
Determines whether the component can import an object. |
boolean |
canImport(Component comp,
DataFlavor[] transferFlavors)
Determines whether the specified component can accept an import prior to attempting one. |
protected Transferable |
createTransferable(Component comp)
Creates the transferable to use as the source for a data transfer. |
protected void |
exportDone(Component source,
T object,
int action)
Called when the export action has completed. |
protected void |
exportDone(Component source,
Transferable data,
int action)
Invoked after data has been exported. |
protected T |
getObject(Component comp)
Returns the object associated with the component. |
protected Icon |
getVisualRepresentation(T object)
Returns the visual representation for the specified object, or null to use the default. |
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. |
protected boolean |
importObject(Component comp,
T object)
Attempts to import the specified object. |
| Methods inherited from class com.threerings.opengl.gui.TransferHandler |
|---|
exportAsDrag, exportToClipboard, getSourceActions |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Class<T> _clazz
protected DataFlavor _flavor
| Constructor Detail |
|---|
public LocalTransferHandler(Class<T> clazz)
| Method Detail |
|---|
public Icon getVisualRepresentation(Transferable data)
TransferHandler
getVisualRepresentation in class TransferHandler
public boolean canImport(Component comp,
DataFlavor[] transferFlavors)
TransferHandler
canImport in class TransferHandler
public boolean importData(Component comp,
Transferable data)
TransferHandler
importData in class TransferHandlerprotected Transferable createTransferable(Component comp)
TransferHandler
createTransferable in class TransferHandler
protected void exportDone(Component source,
Transferable data,
int action)
TransferHandler
exportDone in class TransferHandlerprotected Icon getVisualRepresentation(T object)
protected boolean canImport(Component comp)
protected boolean importObject(Component comp,
T object)
protected T getObject(Component comp)
protected void exportDone(Component source,
T object,
int action)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||