|
Sweet Home 3D 4.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.TransferHandler
com.eteks.sweethome3d.swing.VisualTransferHandler
com.eteks.sweethome3d.swing.FurnitureCatalogTransferHandler
public class FurnitureCatalogTransferHandler
Catalog transfer handler.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.TransferHandler |
---|
TransferHandler.DropLocation, TransferHandler.TransferSupport |
Field Summary |
---|
Fields inherited from class javax.swing.TransferHandler |
---|
COPY, COPY_OR_MOVE, LINK, MOVE, NONE |
Constructor Summary | |
---|---|
FurnitureCatalogTransferHandler(ContentManager contentManager,
FurnitureCatalogController catalogController,
FurnitureController furnitureController)
Creates a handler able to transfer catalog selected furniture. |
Method Summary | |
---|---|
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 . |
Methods inherited from class com.eteks.sweethome3d.swing.VisualTransferHandler |
---|
exportAsDrag |
Methods inherited from class javax.swing.TransferHandler |
---|
canImport, exportDone, exportToClipboard, getCopyAction, getCutAction, getPasteAction, importData |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FurnitureCatalogTransferHandler(ContentManager contentManager, FurnitureCatalogController catalogController, FurnitureController furnitureController)
Method Detail |
---|
public int getSourceActions(JComponent source)
COPY
.
getSourceActions
in class TransferHandler
public Icon getVisualRepresentation(Transferable transferable)
transferable
for HOME_FLAVOR
flavor if it contains
only one piece of furniture.
getVisualRepresentation
in class TransferHandler
null
.protected Transferable createTransferable(JComponent source)
transferable object
that contains a copy of the selected furniture in catalog.
createTransferable
in class TransferHandler
public boolean canImport(JComponent destination, DataFlavor[] flavors)
true
if flavors contains
DataFlavor.javaFileListFlavor
flavor.
canImport
in class TransferHandler
public boolean importData(JComponent destination, Transferable transferable)
transferable
.
importData
in class TransferHandler
|
Sweet Home 3D 4.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
![]() |
© Copyrights 2006-2013 eTeks - All rights reserved
Distributed under GNU General Public License |