Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Porting JTree (Swing) to Tree (SWT)

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am porting my application interface from Swing to SWT (it will be an Eclipse plugin). My application uses JTree and DefaultMutableTreeNode to show information to the user.
In the class DefaultMutableTreeNode (Swing) there is a way to set an user object (method setUserObject). However, I didn't find any equivalent method in the classes Tree and TreeItem.
Is there a way to set an user object in the TreeItem class like it is possible in Swing?

Thanks
 
Emanuel Ramos
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found the solution to my problem

The class TreeItem inherits the methods getData() and setData() from the class Widget. The usage is same as the methods setUserObject() and getUserObject() from Swing.

Emanuel
 
He's dead Jim. Grab his tricorder. I'll get his wallet and this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic