• 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

JTree - DISCONTIGUOUS_TREE_SELECTION

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I am using JTree with selection mode as DISCONTIGUOUS_TREE_SELECTION.

I have to rename all the selected nodes with the corresponding text.

Could anyone let me know, how to retrieve all the selected nodes in JTree if the selection mode is DISCONTIGUOUS_TREE_SELECTION.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by sahitya sahitya:
Hi

I am using JTree with selection mode as DISCONTIGUOUS_TREE_SELECTION.

I have to rename all the selected nodes with the corresponding text.

Could anyone let me know, how to retrieve all the selected nodes in JTree if the selection mode is DISCONTIGUOUS_TREE_SELECTION.



JTree#getSelectionModel().getSelectionPaths().

"Sahitya Sahitya" If I remember correctly, last time, you were requested to change your display name to confirm with the ranch's naming policies. I am surprised you still havent done so. Please do so immediately.
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Maneesh Godbole:
JTree#getSelectionModel().getSelectionPaths().


Which is also called by JTree#getSelectionPaths which is a bit shorter

"Sahitya Sahitya" If I remember correctly, last time, you were requested to change your display name to confirm with the ranch's naming policies. I am surprised you still havent done so. Please do so immediately.


You can find the policy here. Failure to follow it may lead to your account being closed.
[ September 25, 2008: Message edited by: Rob Prime ]
 
sahitya
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank You.....The problem is solved.
 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by sahitya:
Thank You.....The problem is solved.



Not really.
As per the naming policy:
...with a first and last name, and maybe more, separated by spaces
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic