{
if (ev == null) return null;
TreePath path = getPathForLocation(ev.getX(), ev.getY());
if (path != null)
{
JIDStatus jidStatus = null;
Object o = path.getLastPathComponent();
if (o instanceof PrimaryJIDStatus)
{
jidStatus = ((PrimaryJIDStatus) o).getJIDPrimaryStatus();
}
else if (o instanceof JIDStatus) {
jidStatus = ((JIDStatus) o);
} else {
return null;
}
Avatars avatars = getAvatar();
if(avatars!=null) avatars.setToolTipJIDStatus(jidStatus);
String statusMsg;
if (jidStatus.getStatus() != null) {
statusMsg =
I18N.gettext("main.main.statusmenu.Status_message")
+ " " + jidStatus.getStatus() + "</p><p>";
} else {
statusMsg = "";
}
String waitingStatus = jidStatus.getWaiting();
if (jidStatus.getWaiting() != null) {
waitingStatus =
"<p>" + I18N.gettext("main.main.roster.Waiting_Status")
+ " " + jidStatus.getWaiting() + "</p>";
} else {
waitingStatus = "";
}
return "<HTML><P>"
+ I18N.gettext("main.main.roster.Status")
+ " " + Presence.toLongShow(jidStatus.getShow()) + "</p><p>"
+ statusMsg
+ "JID: " + jidStatus.getCompleteJID() + "</p><p>"
+ I18N.gettext("main.main.roster.Subscription")
+ " " + jidStatus.getSubscription() + "</p>"
+ waitingStatus + "</p></HTML>";
}
return null;
}