|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DropHandler
Handles the 'drop' part of a drag-and-drop operation of a local object of given type.
Used in conjunction with LocalTransferHandler
.
Handles objects that belong to a single class.
Method Summary | |
---|---|
boolean |
acceptDrop(javax.swing.JComponent target,
java.lang.Object object,
int seqNr)
Accept an object which was dropped onto the component handled by this handler. |
boolean |
allowsMultipleDrops(javax.swing.JComponent target)
Does this handler allow multiple objects of this class to be dropped at the same time? |
java.lang.Class<?> |
getDropClass(javax.swing.JComponent target)
Return the class of elements that can be dropped by this handler onto the given component. |
Method Detail |
---|
java.lang.Class<?> getDropClass(javax.swing.JComponent target)
boolean allowsMultipleDrops(javax.swing.JComponent target)
target
- Target onto which the object would be dropped.boolean acceptDrop(javax.swing.JComponent target, java.lang.Object object, int seqNr)
It is advisable not to return false except possibly for the first element in the drop, because the drag source is notified only of the fact that the entire drop did not succeed, and not of the exact number of objects that were accepted.
object
- Object being dropped. The object is known to belong to the correct class.target
- Target onto which the object would be dropped.seqNr
- Sequence number of this object within a set of objects being dropped in one
go. The first object has sequence number 0.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |