import ims.ocrr.vo.InvestShortVo; //导入方法依赖的package包/类
private String getComponentInvestigationTooltip(InvestShortVo result)
{
if (result == null)
return "";
StringBuilder tooltip = new StringBuilder();
tooltip.append(result.getInvestigationIndex().getDescription());
if (result.getTurnaroundMeasureIsNotNull() && result.getExpectedTurnaroundIsNotNull())
{
tooltip.append(" - Expected Turn Around: ");
tooltip.append(result.getExpectedTurnaround().toString());
tooltip.append(" ").append(result.getTurnaroundMeasure().getText());
}
else if (result.getProviderServiceIsNotNull() && result.getProviderService().getLocationServiceIsNotNull() && result.getProviderService().getLocationService().getServiceIsNotNull() && result.getProviderService().getLocationService().getService().getExpectedTurnaround() != null)
{
tooltip.append(" - Expected Turn Around: ");
tooltip.append(result.getProviderService().getLocationService().getService().getExpectedTurnaround().toString());
if(result.getProviderService().getLocationService().getService().getTurnaroundMeasure() != null)
tooltip.append(" ").append(result.getProviderService().getLocationService().getService().getTurnaroundMeasure().getText());
}
// Amend '&' characters with space not to cause problems in tool tip boxes
// as these are HTML and '&' is a special character
for (int i = tooltip.length() - 1; i >= 0; i--)
{
if (tooltip.charAt(i) == '&' && i < tooltip.length() - 1 && tooltip.charAt(i + 1) != ' ')
tooltip.insert(i, " ");
}
return tooltip.toString();
}