Mobile Tooltip Widget for GWT(Google Web Toolkit)
I am making an Ajax application using GWT and I need some kind of facility to display a tooltip on an image when I hover my mouse over it. Unfortunately GWT does not provide such widget that I can use directly. After spending some time on GWT forum, I found two neat posts (refer to post 1 and post 2), which included some source code for making tooltip widget.
I made a mod version of the tooltip widget which supports mouse movement event. Check it out. The source code is available for free.
Online Demo
Download Source Code
Usage
//create a new image
Image image = new Image("images/bear.bmp");
//create a tooltip
MobileTooltip tooltip = new MobileTooltip("tooltip 1");
//add mouse listener to the image
image.addMouseListener(new MobileTooltipMouseListener(tooltip));
//add the desired image to your page
RootPanel.get().add(image);
By default, the name of CSS style is tooltip, you can change it to anything to fit your need. Below is the style used in the demo:
.tooltip {
border: 1px solid black;
padding: 2px 3px 3px 3px;
font-size: smaller;
background-color: #ffffcc;
}
Related Links
If you find this post useful, consider donating a few bucks to help the server running cost.
Subscribe to keep track of your comment.
17 Comments so far

Introduction The new functionality like the blowout print and the ability to upload prints and create hotspots should be implemented in new Design Time Controls. This to make the new functionality easier to work with for the consultants,......