@Override
public void actionPerformed ( final ActionEvent e )
{
try
{
final VersionInfo lv = getLastVersion ();
if ( lv != null && lv.compareTo ( VersionManager.getLibraryVersion () ) > 0 )
{
// Displaying update icon
update.setVisible ( true );
// Updating tips
final ImageIcon updateIcon = getUpdateIcon ();
final WebCustomTooltip versionTip = TooltipManager
.showOneTimeTooltip ( update, null, updateIcon, "New library version available: " + lv.toString () );
update.addMouseListener ( new MouseAdapter ()
{
@Override
public void mouseEntered ( final MouseEvent e )
{
versionTip.closeTooltip ();
update.removeMouseListener ( this );
}
} );
TooltipManager.setTooltip ( update, updateIcon, "Download new version: " + lv.toString () );
// Finishing updater thread
( ( WebTimer ) e.getSource () ).stop ();
}
}