diff options
Diffstat (limited to 'kdejava/koala/org/kde/koala/KMultipleDrag.java')
-rw-r--r-- | kdejava/koala/org/kde/koala/KMultipleDrag.java | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/kdejava/koala/org/kde/koala/KMultipleDrag.java b/kdejava/koala/org/kde/koala/KMultipleDrag.java new file mode 100644 index 00000000..4243c59e --- /dev/null +++ b/kdejava/koala/org/kde/koala/KMultipleDrag.java @@ -0,0 +1,93 @@ +//Auto-generated by kalyptus. DO NOT EDIT. +package org.kde.koala; + +import org.kde.qt.Qt; +import org.kde.qt.QMetaObject; +import org.kde.qt.QtSupport; +import org.kde.qt.QWidget; +import org.kde.qt.QDragObject; +import org.kde.qt.QDragObject; + +/** + + This class makes it easy for applications to provide a drag object + (for drag-n-drop or for clipboard) that has several representations + of the same data, under different formats. + Instead of creating a specific class for each case (as would otherwise + be necessary), you can simply create independent drag objects (e.g. + a QImageDrag object and a KURLDrag object), and bundle them together + using KMultipleDrag. + Sample code for this: + <pre> + KMultipleDrag drag = new KMultipleDrag( parentWidget ); + drag.addDragObject( new QImageDrag( someQImage, 0 ) ); + drag.addDragObject( new KURLDrag( someKURL, 0 ) ); + drag.drag(); + </pre> + Note that the drag objects added to the multiple drag become owned by it. + For that reason their parent should be 0. + @author David Faure <faure@kde.org> + + @short This class makes it easy for applications to provide a drag object (for drag-n-drop or for clipboard) that has several representations of the same data, under different formats. + +*/ +public class KMultipleDrag extends QDragObject { + protected KMultipleDrag(Class dummy){super((Class) null);} + public native QMetaObject metaObject(); + public native String className(); + /** + Create a new KMultipleDrag object. + @param dragSource the parent object which is the source of the data, + 0 for a parent-less object + @param name the name of the object, can be 0 + @short Create a new KMultipleDrag object. + */ + public KMultipleDrag(QWidget dragSource, String name) { + super((Class) null); + newKMultipleDrag(dragSource,name); + } + private native void newKMultipleDrag(QWidget dragSource, String name); + public KMultipleDrag(QWidget dragSource) { + super((Class) null); + newKMultipleDrag(dragSource); + } + private native void newKMultipleDrag(QWidget dragSource); + public KMultipleDrag() { + super((Class) null); + newKMultipleDrag(); + } + private native void newKMultipleDrag(); + /** + Call this to add each underlying drag object to the multiple drag object. + The drag object should not have a parent because the multiple drag object + will own it. + @param dragObject the drag object to add. Should have no parent object. + @short Call this to add each underlying drag object to the multiple drag object. + */ + public native void addDragObject(QDragObject dragObject); + /** + Returns the data of a drag object with that supports the given + mime type. + @param mime the mime type to search + @return the data, or a null byte array if not found + @reimp + + @short Returns the data of a drag object with that supports the given mime type. + */ + public native byte[] encodedData(String mime); + /** + Returns the <code>i</code>'th supported format, or 0. + @param i the number of the format to check + @return the format with the number <code>i</code>, or 0 otherwise + @reimp + + @short Returns the <code>i</code>'th supported format, or 0. + */ + public native String format(int i); + /** Deletes the wrapped C++ instance */ + protected native void finalize() throws InternalError; + /** Delete the wrapped C++ instance ahead of finalize() */ + public native void dispose(); + /** Has the wrapped C++ instance been deleted? */ + public native boolean isDisposed(); +} |