+ StringBuffer tooltiptext = new StringBuffer();
+ if (sequence == null)
+ {
+ return;
+ }
+ if (sequence.getDescription() != null)
+ {
+ tooltiptext.append(sequence.getDescription());
+ tooltiptext.append("\n");
+ }
+
+ for (SequenceFeature sf : sequence.getFeatures()
+ .getNonPositionalFeatures())
+ {
+ boolean nl = false;
+ if (sf.getFeatureGroup() != null)
+ {
+ tooltiptext.append(sf.getFeatureGroup());
+ nl = true;
+ }
+ if (sf.getType() != null)
+ {
+ tooltiptext.append(" ");
+ tooltiptext.append(sf.getType());
+ nl = true;
+ }
+ if (sf.getDescription() != null)
+ {
+ tooltiptext.append(" ");
+ tooltiptext.append(sf.getDescription());
+ nl = true;
+ }
+ if (!Float.isNaN(sf.getScore()) && sf.getScore() != 0f)
+ {
+ tooltiptext.append(" Score = ");
+ tooltiptext.append(sf.getScore());
+ nl = true;
+ }
+ if (sf.getStatus() != null && sf.getStatus().length() > 0)
+ {
+ tooltiptext.append(" (");
+ tooltiptext.append(sf.getStatus());
+ tooltiptext.append(")");
+ nl = true;
+ }
+ if (nl)
+ {
+ tooltiptext.append("\n");
+ }
+ }
+
+ if (tooltiptext.length() == 0)