}
}
- // use aa to see if the mouse pointer is on a
- List<SequenceFeature> allFeatures = findFeaturesAtRes(sequence,
- sequence.findPosition(res));
-
- int index = 0;
- while (index < allFeatures.size())
+ /*
+ * add feature details to tooltip if over one or more features
+ */
+ if (respos != -1)
{
- SequenceFeature sf = allFeatures.get(index);
-
- tooltipText.append(sf.getType() + " " + sf.begin + ":" + sf.end);
-
- if (sf.getDescription() != null)
- SequenceFeature[] allFeatures = findFeaturesAtRes(sequence,
- sequence.findPosition(column));
-
- int index = 0;
- while (index < allFeatures.length)
++ List<SequenceFeature> allFeatures = findFeaturesAtRes(sequence,
++ respos);
++ for (SequenceFeature sf : allFeatures)
{
- tooltipText.append(" " + sf.getDescription());
- }
- SequenceFeature sf = allFeatures[index];
-
+ tooltipText.append(sf.getType() + " " + sf.begin + ":" + sf.end);
- if (sf.getValue("status") != null)
- {
- String status = sf.getValue("status").toString();
- if (status.length() > 0)
+ if (sf.getDescription() != null)
{
- tooltipText.append(" (" + sf.getValue("status") + ")");
+ tooltipText.append(" " + sf.getDescription());
}
- }
- tooltipText.append("\n");
- index++;
+ if (sf.getValue("status") != null)
+ {
+ String status = sf.getValue("status").toString();
+ if (status.length() > 0)
+ {
+ tooltipText.append(" (" + sf.getValue("status") + ")");
+ }
+ }
+ tooltipText.append("\n");
-
- index++;
+ }
}
if (tooltip == null)
import jalview.math.AlignmentDimension;
import jalview.schemes.ResidueProperties;
import jalview.structure.StructureSelectionManager;
+import jalview.util.Comparison;
import jalview.util.MessageManager;
import jalview.util.Platform;
+ import jalview.viewmodel.ViewportListenerI;
import jalview.viewmodel.ViewportRanges;
import java.awt.BorderLayout;