updated code for kona libs, not quite working yet.
[feisty_meow.git] / kona / src / org / feistymeow / dragdrop / IDragonDropDataProvider.java
1 package org.feistymeow.dragdrop;
2
3 import java.util.List;
4 import java.awt.Point;
5
6 /**
7  * An interface for any object that can interact with a DragonTransferSupport to receive files (or
8  * other things) that are dropped on it and that can provide files (or other things) for dragging to
9  * another location. Note that the details of finding a selected node or determining what objects
10  * are relevant there is entirely up to the component. You probably do not need this interface if
11  * you have implemented your own TransferHandler.
12  * 
13  * @author Chris Koeritz
14  * @copyright Copyright (c) 2012-$now By University of Virginia
15  * @license This file is free software; you can modify and redistribute it under the terms of the
16  *          Apache License v2.0: http://www.apache.org/licenses/LICENSE-2.0
17  */
18 public interface IDragonDropDataProvider
19 {
20     /**
21      * A function that is invoked by the handler when some files or other objects are being dragged
22      * out of the parent. The handler expects the real provider to come up with a useful set of
23      * things to deliver at the drag target.
24      */
25     public List<Object> provideDragList();
26
27     /**
28      * A function that is invoked by the d&d manager when a passel of objects have been dropped on
29      * the parent object.
30      */
31     public boolean consumeDropList(List<Object> dropSet, Point cursor);
32 }