|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.utils.swing.XDragSource edu.northwestern.at.utils.swing.TreeDragSource
public abstract class TreeDragSource
An abstract base class for JTree drag source components.
Dragging multiple node 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 | |
---|---|
TreeDragSource(javax.swing.JTree tree)
Constructs a new tree 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 TreeDragSource(javax.swing.JTree tree)
tree
- The tree. Method Detail |
---|
public void dragGestureRecognized(java.awt.dnd.DragGestureEvent dge)
If the drag originated in a non-selected node, that node is selected. Otherwise the selection is unchanged.
Builds a drag image for all the selected tree nodes,
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 |