• 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

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
 
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
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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic