Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DnD JTree



On Tuesday, Jul 8, 2003, at 18:18 Europe/Bucharest, email@hidden wrote:

| Second: I have no idea how enable dragging more than one node ...

Include more than one node to whatever it is you're using as the dragged data. Usually, that would mean adding all the currently-selected nodes (which requires that your tree allow multiple selection).


There is a problem with multiple selection in a tree and DnD, because if the user selects more than one node in the tree and starts a drag, only the node that was under the mouse pointer remains selected.
What we did to enable multiple selection DnD was to remember the currently selected nodes in the tree (register as a selection listener in the tree) and when a drag is initiated, manually select the nodes if the mouse was pressed on one of the previous selected nodes.


Catalin Bratu
Software Development Manager

ADCON TELEMETRY srl
Bd. Ion Ionescu de la
Brad No. 8, Bucharest
R-71592, Romania
Tel.: +40 (21) 490-6083
Fax.: +40 (21) 490-6086
eMail: email@hidden
http://www.adcon.com
*******************************
SMART WIRELESS SOLUTIONS
*******************************
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.