public class FurnitureCatalogTransferHandler extends VisualTransferHandler
TransferHandler.DropLocation, TransferHandler.TransferSupportCOPY, COPY_OR_MOVE, LINK, MOVE, NONE| Constructor and Description |
|---|
FurnitureCatalogTransferHandler(ContentManager contentManager,
FurnitureCatalogController catalogController,
FurnitureController furnitureController)
Creates a handler able to transfer catalog selected furniture.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canImport(JComponent destination,
DataFlavor[] flavors)
Returns
true if flavors contains
DataFlavor.javaFileListFlavor flavor. |
protected Transferable |
createTransferable(JComponent source)
Returns a
transferable object
that contains a copy of the selected furniture in catalog. |
int |
getSourceActions(JComponent source)
Returns
COPY. |
Icon |
getVisualRepresentation(Transferable transferable)
Returns the icon of the piece of furniture of
transferable
for HOME_FLAVOR flavor if it contains
only one piece of furniture. |
boolean |
importData(JComponent destination,
Transferable transferable)
Add to catalog the furniture contained in
transferable. |
exportAsDragcanImport, exportDone, exportToClipboard, getCopyAction, getCutAction, getDragImage, getDragImageOffset, getPasteAction, importData, setDragImage, setDragImageOffsetpublic FurnitureCatalogTransferHandler(ContentManager contentManager, FurnitureCatalogController catalogController, FurnitureController furnitureController)
public int getSourceActions(JComponent source)
COPY.getSourceActions in class TransferHandlerpublic Icon getVisualRepresentation(Transferable transferable)
transferable
for HOME_FLAVOR flavor if it contains
only one piece of furniture.getVisualRepresentation in class TransferHandlernull.protected Transferable createTransferable(JComponent source)
transferable object
that contains a copy of the selected furniture in catalog.createTransferable in class TransferHandlerpublic boolean canImport(JComponent destination, DataFlavor[] flavors)
true if flavors contains
DataFlavor.javaFileListFlavor flavor.canImport in class TransferHandlerpublic boolean importData(JComponent destination, Transferable transferable)
transferable.importData in class TransferHandler

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