if (transformedPoint == null) {
return;
}
// Find if an element is below the mouse location to show its tooltip
TrafficDefinitionElement trafficElementBelowMouse = null;
RoadNetworkElement roadElementBelowMouse = roadNetwork.PointHitTest(transformedPoint);
if (currentTrafficLayer != null) {
trafficElementBelowMouse = currentTrafficLayer.PointHitTest(transformedPoint);
}
// Set the tooltip of the element below the mouse
if (trafficElementBelowMouse != null) {
setToolTipText(trafficElementBelowMouse.getToolTip());
} else if (roadElementBelowMouse != null) {
setToolTipText(roadElementBelowMouse.getToolTip());
} else {
setToolTipText(null);
}