- Sequence sq = (Sequence) av.getAlignment().getSequenceAt(seq);
- // 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());