Results 1 to 1 of 1
Thread: Hijacking the ToolTipManager
- 08-30-2010, 03:11 AM #1Member
- Join Date
- Feb 2010
- Rep Power
Hijacking the ToolTipManager
In my opinion the tooltipmanager in the swing library appears to be very limited in function.
I wish to create my own custom ToolTipManager that for the most part functions just like the previous with some exceptions. I wish to add some advanced functionality into the ToolTipManager such as being able to display all tool tips at once using a toggle button and have the tool tips location appear out of the corner of the button rather then appear where the mouse cursor is located.
Changing the location of a tool tip is not difficult. I simply need to over ride the getToolTipLocation(MouseEvent event) method in the JComponent class. Unfortunately for my intents and purposes I have to do this for every JComponent in the software I am developing. Doing this would be tedious and very dirty. It would be a lot quicker and simpler if I could replace the void showTipWindow() method in the ToolTipManger class.
To allow the toggling of all tooltips at once would also be easier if the default ToolTipManager could be replaced. The current implementation does not allow more the one tooltip to be displayed at the same time regardless of the what the dismissdelay is set too.
Does anyone have any idea as to what I can do to implement these function?
The ToolTipManager has a private constructor and is accessed through a shared instance and there are several JComponents that call it statically. It appears to me that doing what I wish is impossible but I am posting here in hopes that some has some ideas.
- By pravinkumar in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 05-04-2010, 10:34 AM