Dragging non-selected cell in JTree
- From: "Bill Tschumy" <bill@xxxxxxxxxxxxx>
- Date: 28 Dec 2005 09:17:36 -0800
I have implemented Drag and Drop from a JTree by setting
tree.setDragEnabled( true );
tree.setTransferHandler( new NodeTransferSource() );
where NodeTransferSource is a subclass of TransferHandler.
Everything works well when I drag a cell that is already selected.
However, if you click and drag a cell that is not selected, the cell
gets selected but no drag is initiated (however, exportAsDrag and
getSourceActions are being called in NodeTransferSource). This
requires the user to click and drag yet again.
Is there a way to get the drag to work even though the cell is not
already selected?
.
- Prev by Date: Best Approach for putting words on a JPanel (with special requirements) [2nd attempted post]
- Next by Date: Re: Input Verifier for JComboBox
- Previous by thread: Best Approach for putting words on a JPanel (with special requirements) [2nd attempted post]
- Next by thread: Deleting a Row in a JTable
- Index(es):
Relevant Pages
|