• Post Reply Bookmark Topic Watch Topic
  • New Topic

Porting JTree (Swing) to Tree (SWT)

 
Emanuel Ramos
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!