|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.northwestern.at.utils.swing.XDragSource
edu.northwestern.at.utils.swing.ListDragSource
public abstract class ListDragSource
An abstract base class for JList drag source components.
Dragging multiple element selections is supported. This class takes care of building the drag image. The concrete subclass takes care of building the drag data via the getTransferable method which it must implement.
Constructor Summary | |
---|---|
ListDragSource(javax.swing.JList list)
Constructs a new list drag source. |
Method Summary | |
---|---|
void |
dragGestureRecognized(java.awt.dnd.DragGestureEvent dge)
Handles drag gesture recognized events. |
abstract java.awt.datatransfer.Transferable |
getTransferable()
Gets the drag data. |
Methods inherited from class edu.northwestern.at.utils.swing.XDragSource |
---|
dragDropEnd, dragEnter, dragExit, dragOver, dropActionChanged, getCurrentDragData, getCurrentDragSource, getTriggerEvent, startDrag, startDrag |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ListDragSource(javax.swing.JList list)
list
- The list. Method Detail |
---|
public void dragGestureRecognized(java.awt.dnd.DragGestureEvent dge)
If the drag originated in a non-selected element, that element is selected. Otherwise the selection is unchanged.
Builds a drag image for all the selected list elements,
asks the subclass to build the drag data, then invokes
XDragSource.startDrag
to
start the drag.
dragGestureRecognized
in interface java.awt.dnd.DragGestureListener
dragGestureRecognized
in class XDragSource
dge
- The event. public abstract java.awt.datatransfer.Transferable getTransferable()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |