ca.sqlpower.wabit.swingui.tree
Class SmartTreeTransferable
java.lang.Object
ca.sqlpower.wabit.swingui.tree.SmartTreeTransferable
- All Implemented Interfaces:
- java.awt.datatransfer.Transferable
public class SmartTreeTransferable
- extends java.lang.Object
- implements java.awt.datatransfer.Transferable
This is a transferrable which can take any datatype that is in the left tree,
with it you can transfer Olap objects (cubes etc..), SQLObject's (tables).
Items that can be dragged into reports (all wabit objects except connections and
other reports) and finally files to import and export.
|
Constructor Summary |
SmartTreeTransferable(java.util.List<java.lang.Object> transferObjects,
WabitSessionContext context)
This is a smart transferable class which knows what to return given a specific
DataFlavor. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WABIT_OBJECT_FLAVOUR_TO_EXPORT
public static final java.awt.datatransfer.DataFlavor WABIT_OBJECT_FLAVOUR_TO_EXPORT
SmartTreeTransferable
public SmartTreeTransferable(java.util.List<java.lang.Object> transferObjects,
WabitSessionContext context)
- This is a smart transferable class which knows what to return given a specific
DataFlavor. It also will know what types of data it has in it. Then
when asking for a specific DataFlavor it will only objects
of that type even when it has all kinds of different objects
- Parameters:
transferObjects - The objects to transfer, can either be of type WorkspaceTreeModel.Olap4jTreeObject,
WabitObject or SQLObject or can be for exporting.context - A context is needed for when a user tries to export to the desktop,
null is a valid value for this if no exporting to the desktop will
be done.
getTransferData
public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
throws java.awt.datatransfer.UnsupportedFlavorException,
java.io.IOException
- Specified by:
getTransferData in interface java.awt.datatransfer.Transferable
- Throws:
java.awt.datatransfer.UnsupportedFlavorException
java.io.IOException
getTransferDataFlavors
public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
- Specified by:
getTransferDataFlavors in interface java.awt.datatransfer.Transferable
isDataFlavorSupported
public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor flavor)
- Specified by:
isDataFlavorSupported in interface java.awt.datatransfer.Transferable
Copyright © 2009. All Rights Reserved.