public class FurnitureTransferHandler extends LocatedTransferHandler
TransferHandler.DropLocation, TransferHandler.TransferSupportCOPY, COPY_OR_MOVE, LINK, MOVE, NONE| Constructor and Description |
|---|
FurnitureTransferHandler(Home home,
ContentManager contentManager,
HomeController homeController)
Creates a handler able to transfer home furniture.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canImportFlavor(DataFlavor[] flavors)
|
protected Transferable |
createTransferable(JComponent source)
Returns a
transferable object
that contains a copy of the selected furniture in home. |
protected void |
exportDone(JComponent source,
Transferable data,
int action)
Removes the copied element once moved.
|
int |
getSourceActions(JComponent source)
Returns
COPY_OR_MOVE. |
boolean |
importData(JComponent destination,
Transferable transferable)
Add to home the furniture contained in
transferable. |
canImport, dragEntered, dragExited, dragMoved, getDropLocation, getModelContents, isDropcanImport, exportAsDrag, exportToClipboard, getCopyAction, getCutAction, getDragImage, getDragImageOffset, getPasteAction, getVisualRepresentation, importData, setDragImage, setDragImageOffsetpublic FurnitureTransferHandler(Home home, ContentManager contentManager, HomeController homeController)
public int getSourceActions(JComponent source)
COPY_OR_MOVE.getSourceActions in class TransferHandlerprotected Transferable createTransferable(JComponent source)
transferable object
that contains a copy of the selected furniture in home.createTransferable in class TransferHandlerprotected void exportDone(JComponent source, Transferable data, int action)
exportDone in class TransferHandlerpublic boolean canImportFlavor(DataFlavor[] flavors)
canImportFlavor in class LocatedTransferHandlerpublic boolean importData(JComponent destination, Transferable transferable)
transferable.importData in class TransferHandler

© Copyrights 2006-2017 Emmanuel PUYBARET / eTeks
Distributed under GNU General Public License