|
Sweet Home 3D 4.1 | |||||||||
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.LocatedTransferHandler
com.eteks.sweethome3d.swing.FurnitureTransferHandler
public class FurnitureTransferHandler
Home furniture 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 | |
---|---|
FurnitureTransferHandler(Home home,
ContentManager contentManager,
HomeController homeController)
Creates a handler able to transfer home furniture. |
Method Summary | |
---|---|
boolean |
canImportFlavor(DataFlavor[] flavors)
Returns true if flavors contains
HOME_FLAVOR flavor
or DataFlavor.javaFileListFlavor flavor. |
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 . |
Methods inherited from class com.eteks.sweethome3d.swing.LocatedTransferHandler |
---|
canImport, dragEntered, dragExited, dragMoved, getDropLocation, getModelContents, isDrop |
Methods inherited from class javax.swing.TransferHandler |
---|
canImport, exportAsDrag, exportToClipboard, getCopyAction, getCutAction, getPasteAction, getVisualRepresentation, importData |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FurnitureTransferHandler(Home home, ContentManager contentManager, HomeController homeController)
Method Detail |
---|
public int getSourceActions(JComponent source)
COPY_OR_MOVE
.
getSourceActions
in class TransferHandler
protected Transferable createTransferable(JComponent source)
transferable object
that contains a copy of the selected furniture in home.
createTransferable
in class TransferHandler
protected void exportDone(JComponent source, Transferable data, int action)
exportDone
in class TransferHandler
public boolean canImportFlavor(DataFlavor[] flavors)
true
if flavors contains
HOME_FLAVOR
flavor
or DataFlavor.javaFileListFlavor
flavor.
canImportFlavor
in class LocatedTransferHandler
public boolean importData(JComponent destination, Transferable transferable)
transferable
.
importData
in class TransferHandler
|
Sweet Home 3D 4.1 | |||||||||
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 |