seqAnnotReport.createSequenceAnnotationReport(tip, sequence,
av.isShowDBRefs(), av.isShowNPFeats(),
sp.seqCanvas.fr.getMinMax());
- setToolTipText("<html>" + sequence.getDisplayId(true) + " "
- + tip.toString() + "</html>");
+ setToolTipText(JvSwingUtils.wrapTooltip(true,
+ sequence.getDisplayId(true) + " " + tip.toString()));
}
}
*/
if (e.getClickCount() < 2 || SwingUtilities.isRightMouseButton(e))
{
+ // reinstate isRightMouseButton check to ignore mouse-related popup events
+ // note - this does nothing on default MacBookPro force-trackpad config!
return;
}
int seq = alignPanel.getSeqPanel().findSeq(e);
- if (SwingUtilities.isRightMouseButton(e))
+ if (e.isPopupTrigger())
{
Sequence sq = (Sequence) av.getAlignment().getSequenceAt(seq);
// build a new links menu based on the current links + any non-positional
// features
- Vector nlinks = new Vector(Preferences.sequenceURLLinks);
- SequenceFeature sf[] = sq == null ? null : sq.getSequenceFeatures();
- for (int sl = 0; sf != null && sl < sf.length; sl++)
+ Vector<String> nlinks = new Vector<String>(
+ Preferences.sequenceURLLinks);
+ SequenceFeature sfs[] = sq == null ? null : sq.getSequenceFeatures();
+ if (sfs != null)
{
- if (sf[sl].begin == sf[sl].end && sf[sl].begin == 0)
+ for (SequenceFeature sf : sfs)
{
- if (sf[sl].links != null && sf[sl].links.size() > 0)
+ if (sf.begin == sf.end && sf.begin == 0)
{
- for (int l = 0, lSize = sf[sl].links.size(); l < lSize; l++)
+ if (sf.links != null && sf.links.size() > 0)
{
- nlinks.addElement(sf[sl].links.elementAt(l));
+ for (int l = 0, lSize = sf.links.size(); l < lSize; l++)
+ {
+ nlinks.addElement(sf.links.elementAt(l));
+ }
}
}
}
}
- jalview.gui.PopupMenu pop = new jalview.gui.PopupMenu(alignPanel, sq,
- nlinks, new Vector(Preferences.getGroupURLLinks()));
+ PopupMenu pop = new PopupMenu(alignPanel, sq, nlinks,
+ Preferences.getGroupURLLinks());
pop.show(this, e.getX(), e.getY());
return;
}
-
if ((av.getSelectionGroup() == null)
- || ((!e.isControlDown() && !e.isShiftDown()) && av
- .getSelectionGroup() != null))
+ || (!jalview.util.Platform.isControlDown(e)
+ && !e.isShiftDown() && av.getSelectionGroup() != null))
{
av.setSelectionGroup(new SequenceGroup());
av.getSelectionGroup().setStartRes(0);