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



Am Dienstag, 08.07.03, um 17:18 Uhr (Europe/Berlin) schrieb email@hidden:

Alexander Lohse wrote:
| I am having problems to create a nice visual DnD for dragging from a
| JTree:
|
| I know I can get the node from the Click-Point, and I know I can attach
| an Image to the "drag". If I do not attach an Image, the outline of the
| whole JTree seems to be used. So my first question: How can I paint
| the outline of just the current dragging element?

Use an image of the current element as the drag image.

And how would I do that?
How do I get an Image from ... maybe a CellRenderer ... or even just the Outline ... ?
Maybe have too little awt-knownledge to do that.

Can you point me to some docs or examples?

Regards,

Alex

| 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).

Glen Fisher

Human Touch Medienproduktion GmbH
WebJazz Internet Suite
Alexander Lohse
Am See 1
17440 Klein Jasedow

Tel: (038374) 75211
Fax: (038374) 75223
e-mail: email@hidden
web: http://www.webjazz.de


Human Touch Medienproduktion GmbH
WebJazz Internet Suite
Alexander Lohse
Am See 1
17440 Klein Jasedow

Tel: (038374) 75211
Fax: (038374) 75223
e-mail: email@hidden
web: http://www.webjazz.de
_______________________________________________
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.