|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.TransferHandler
antsnest.datatransfer.BuildTreeTransferHandler
public class BuildTreeTransferHandler
The handler that sets up data transfer on the build tree
| Field Summary |
|---|
| Fields inherited from class javax.swing.TransferHandler |
|---|
COPY, COPY_OR_MOVE, MOVE, NONE |
| Constructor Summary | |
|---|---|
BuildTreeTransferHandler()
Constructs a new handler |
|
| Method Summary | |
|---|---|
boolean |
canImport(JComponent c,
DataFlavor[] flavors)
Tells whether a component can accept a data drop |
protected Transferable |
createTransferable(JComponent c)
Creates a transferable from a list |
void |
exportAsDrag(JComponent c,
InputEvent e,
int action)
Called when the transfer begins |
void |
exportDone(JComponent c,
Transferable data,
int action)
Called when the data has been transferred |
int |
getSourceActions(JComponent c)
Informs what transfer actions are supported |
boolean |
importData(JComponent c,
Transferable trans)
Does the importing of the data into the tree |
| Methods inherited from class javax.swing.TransferHandler |
|---|
exportToClipboard, getCopyAction, getCutAction, getPasteAction, getVisualRepresentation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BuildTreeTransferHandler()
| Method Detail |
|---|
public void exportAsDrag(JComponent c,
InputEvent e,
int action)
exportAsDrag in class TransferHandlerc - the component being dragged frome - the event that triggered the transferaction - the kind of transfer occuring
public void exportDone(JComponent c,
Transferable data,
int action)
exportDone in class TransferHandlerc - the component that was dragged fromdata - the data that was transferredaction - the kind of transfer occuringprotected Transferable createTransferable(JComponent c)
createTransferable in class TransferHandlerc - the list that holds the Ant attributes
public int getSourceActions(JComponent c)
getSourceActions in class TransferHandlerc - the component using this handler
public boolean canImport(JComponent c,
DataFlavor[] flavors)
canImport in class TransferHandlerc - the component receiving the dropflavors - the data flavors the drop can come in
public boolean importData(JComponent c,
Transferable trans)
importData in class TransferHandlerc - the component receiving the droptrans - the transferable encapsulating the data
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||