Dragging non-selected cell in JTree



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?

.



Relevant Pages

  • Re: Alphabet Code Game
    ... Geez, I guess I don't get it, or I'm not explaining myself clearly - sorry ... to select, drag, and copy it in column B. ... you mentioned creating a named range all the way over ... In Row1 type the word or sentence, one letter in each cell, numbers ...
    (microsoft.public.excel.misc)
  • Re: dragging to resize columns
    ... "preferred width" for a cell, then you can't change the "preferrred width" ... For information on the effects of dragging column borders in combination ... >> a column of, say, 1 inch, and try to drag it just a hair ... >>>dimensions specified as the horizontal grid size on the ...
    (microsoft.public.word.tables)
  • Re: Alphabet Code Game
    ... I know you guys say to drag the formula across the rows, ... output in Row2. ... you mentioned creating a named range all the way ... In Row1 type the word or sentence, one letter in each cell, ...
    (microsoft.public.excel.misc)
  • RE: Odd Formula copying Behavior
    ... Private Sub Worksheet_Change ... Drag copy down one ... cell, and dragging downward). ... First thing I would check is whether Manual recalc is on - choose Formulas, ...
    (microsoft.public.excel.misc)
  • Re: Decimal places in Excel 2003
    ... I did not know this 'feature' is new. ... > Microsoft acknowledges there is an "issue" with the drag feature. ... > 0.688 before computer rounding problems started. ... > to get the value of the bottom cell. ...
    (microsoft.public.excel.worksheet.functions)