• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

(SWT/JFace)Questions about pop-up tooltip in treeviewer

 
Wang Zhe
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to implement the following functionality in a treeviewer.

1. When user select a tree item, I want that a small frame like a toolbar can be pop-up and user can click button inside to switch to differenct editors or viewers.

2. When mouse move to a tree item, I want that a tooltip window is pop-up which should be same as the help pop-up windows in java code editor. User can focus on this window and resize it if it is small and the window should be closed when the focus lost.

I have no idea how to implement them. I need a help.

Many thanks.
 
Andrey Kozhanov
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would try to bind MouseListener and MouseMotionListener to the tree and for tooltip windows would try to use JFrame with setUndecorated(true).
 
Rob Spoor
Sheriff
Pie
Posts: 20512
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Andey, you probably missed the SWT / JFace part. That means Swing classes are out of the question.

The idea of mouse listeners is good though, I'm sure these are available in SWT / JFace as well. For the tree there are also probably selection listeners you can use.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic