+ * Build and show the popup-menu at the right-click mouse position
+ *
+ * @param e
+ */
+ void showPopupMenu(MouseEvent e)
+ {
+ int seq2 = alignPanel.getSeqPanel().findSeq(e);
+ Sequence sq = (Sequence) av.getAlignment().getSequenceAt(seq2);
+ // build a new links menu based on the current links + any non-positional
+ // features
+ Vector<String> nlinks = new Vector<String>(Preferences.sequenceURLLinks);
+ SequenceFeature sfs[] = sq == null ? null : sq.getSequenceFeatures();
+ if (sfs != null)
+ {
+ for (SequenceFeature sf : sfs)
+ {
+ if (sf.begin == sf.end && sf.begin == 0)
+ {
+ if (sf.links != null && sf.links.size() > 0)
+ {
+ for (int l = 0, lSize = sf.links.size(); l < lSize; l++)
+ {
+ nlinks.addElement(sf.links.elementAt(l));
+ }
+ }
+ }
+ }
+ }
+
+ PopupMenu pop = new PopupMenu(alignPanel, sq, nlinks,
+ Preferences.getGroupURLLinks());
+ pop.show(this, e.getX(), e.getY());
+ }
+
+ /**