• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Subtree in JTree

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JTree has root folder invisible. It has folders as child nodes of tree called A, B, C, D.

A, B can contain only leaf nodes.

C, D can contain child nodes as folder and those child folders will have leaf nodes.

The problem is I want C/D should be treated as single tree i.e. user can not move any leaf node of C/D tree to any other folder like A/B...that is 'p' can be moved to Folder2 but not to folder 'A'/ 'B'...How to make these type of settings??



Kindly help me.
[ July 02, 2008: Message edited by: Jeevan Anand ]
 
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried to keep this simple to show/emphasize how to customize the drop behavior. There are so many possibilities that it's difficult to say much about it.

Edit: Most of the code in the TransferHandler was taken from the Drag and Drop tutorial.
[ July 04, 2008: Message edited by: Craig Wood ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic