2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
3 * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 package jalview.appletgui;
24 import java.awt.event.*;
26 import jalview.analysis.*;
27 import jalview.commands.*;
28 import jalview.datamodel.*;
29 import jalview.schemes.*;
30 import jalview.util.UrlLink;
31 import jalview.io.AppletFormatAdapter;
33 public class APopupMenu extends java.awt.PopupMenu implements
34 ActionListener, ItemListener
36 Menu groupMenu = new Menu();
38 MenuItem editGroupName = new MenuItem();
40 protected MenuItem clustalColour = new MenuItem();
42 protected MenuItem zappoColour = new MenuItem();
44 protected MenuItem taylorColour = new MenuItem();
46 protected MenuItem hydrophobicityColour = new MenuItem();
48 protected MenuItem helixColour = new MenuItem();
50 protected MenuItem strandColour = new MenuItem();
52 protected MenuItem turnColour = new MenuItem();
54 protected MenuItem buriedColour = new MenuItem();
56 protected CheckboxMenuItem abovePIDColour = new CheckboxMenuItem();
58 protected MenuItem userDefinedColour = new MenuItem();
60 protected MenuItem PIDColour = new MenuItem();
62 protected MenuItem BLOSUM62Colour = new MenuItem();
64 MenuItem noColourmenuItem = new MenuItem();
66 protected CheckboxMenuItem conservationMenuItem = new CheckboxMenuItem();
68 final AlignmentPanel ap;
70 MenuItem unGroupMenuItem = new MenuItem();
72 MenuItem nucleotideMenuItem = new MenuItem();
74 Menu colourMenu = new Menu();
76 CheckboxMenuItem showBoxes = new CheckboxMenuItem();
78 CheckboxMenuItem showText = new CheckboxMenuItem();
80 CheckboxMenuItem showColourText = new CheckboxMenuItem();
82 CheckboxMenuItem displayNonconserved = new CheckboxMenuItem();
84 Menu editMenu = new Menu("Edit");
86 MenuItem copy = new MenuItem("Copy (Jalview Only)");
88 MenuItem cut = new MenuItem("Cut (Jalview Only)");
90 MenuItem toUpper = new MenuItem("To Upper Case");
92 MenuItem toLower = new MenuItem("To Lower Case");
94 MenuItem toggleCase = new MenuItem("Toggle Case");
96 Menu outputmenu = new Menu();
98 Menu seqMenu = new Menu();
100 MenuItem pdb = new MenuItem();
102 MenuItem hideSeqs = new MenuItem();
104 MenuItem repGroup = new MenuItem();
106 MenuItem sequenceName = new MenuItem("Edit Name/Description");
108 MenuItem sequenceFeature = new MenuItem("Create Sequence Feature");
110 MenuItem editSequence = new MenuItem("Edit Sequence");
114 MenuItem revealAll = new MenuItem();
116 Menu menu1 = new Menu();
118 public APopupMenu(AlignmentPanel apanel, final Sequence seq, Vector links)
120 // /////////////////////////////////////////////////////////
121 // If this is activated from the sequence panel, the user may want to
122 // edit or annotate a particular residue. Therefore display the residue menu
124 // If from the IDPanel, we must display the sequence menu
125 // ////////////////////////////////////////////////////////
133 } catch (Exception e)
138 for (int i = 0; i < jalview.io.AppletFormatAdapter.WRITEABLE_FORMATS.length; i++)
140 MenuItem item = new MenuItem(
141 jalview.io.AppletFormatAdapter.WRITEABLE_FORMATS[i]);
143 item.addActionListener(this);
144 outputmenu.add(item);
147 SequenceGroup sg = ap.av.getSelectionGroup();
149 if (sg != null && sg.getSize() > 0)
151 editGroupName.setLabel(sg.getName());
152 showText.setState(sg.getDisplayText());
153 showColourText.setState(sg.getColourText());
154 showBoxes.setState(sg.getDisplayBoxes());
155 displayNonconserved.setState(sg.getShowunconserved());
156 if (!ap.av.alignment.getGroups().contains(sg))
158 groupMenu.remove(unGroupMenuItem);
168 if (links != null && links.size() > 0)
170 Menu linkMenu = new Menu("Link");
172 for (int i = 0; i < links.size(); i++)
174 link = links.elementAt(i).toString();
175 UrlLink urlLink = new UrlLink(link);
176 if (!urlLink.isValid())
178 System.err.println(urlLink.getInvalidMessage());
181 final String target = urlLink.getTarget(); // link.substring(0,
182 // link.indexOf("|"));
183 final String label = urlLink.getLabel();
184 if (urlLink.isDynamic())
187 // collect matching db-refs
188 DBRefEntry[] dbr = jalview.util.DBRefUtils.selectRefs(seq
189 .getDBRef(), new String[]
191 // collect id string too
192 String id = seq.getName();
193 String descr = seq.getDescription();
194 if (descr!=null && descr.length()<1)
200 for (int r = 0; r < dbr.length; r++)
202 if (id != null && dbr[r].getAccessionId().equals(id))
204 // suppress duplicate link creation for the bare sequence ID
205 // string with this link
208 // create Bare ID link for this RUL
209 String[] urls = urlLink.makeUrls(dbr[r].getAccessionId(),
213 for (int u = 0; u < urls.length; u += 2)
215 addshowLink(linkMenu, label + "|" + urls[u], urls[u + 1]);
222 // create Bare ID link for this RUL
223 String[] urls = urlLink.makeUrls(id, true);
226 for (int u = 0; u < urls.length; u += 2)
228 addshowLink(linkMenu, label, urls[u + 1]);
231 // addshowLink(linkMenu, target, url_pref + id + url_suff);
233 // Now construct URLs from description but only try to do it for regex URL links
234 if (descr != null && urlLink.getRegexReplace()!=null)
236 // create link for this URL from description only if regex matches
237 String[] urls = urlLink.makeUrls(descr, true);
240 for (int u = 0; u < urls.length; u += 2)
242 addshowLink(linkMenu, label, urls[u + 1]);
249 addshowLink(linkMenu, target, urlLink.getUrl_prefix()); // link.substring(link.lastIndexOf("|")+1));
254 * if (link.indexOf("$SEQUENCE_ID$") > -1) { // Substitute SEQUENCE_ID
255 * string and any matching database reference accessions String url_pref =
256 * link.substring(link.indexOf("|") + 1, link.indexOf("$SEQUENCE_ID$"));
258 * String url_suff = link.substring(link.indexOf("$SEQUENCE_ID$") + 13);
259 * // collect matching db-refs DBRefEntry[] dbr =
260 * jalview.util.DBRefUtils.selectRefs(seq.getDBRef(), new
261 * String[]{target}); // collect id string too String id =
262 * seq.getName(); if (id.indexOf("|") > -1) { id =
263 * id.substring(id.lastIndexOf("|") + 1); } if (dbr!=null) { for (int
264 * r=0;r<dbr.length; r++) { if (dbr[r].getAccessionId().equals(id)) { //
265 * suppress duplicate link creation for the bare sequence ID string with
266 * this link id = null; } addshowLink(linkMenu,
267 * dbr[r].getSource()+"|"+dbr[r].getAccessionId(), target,
268 * url_pref+dbr[r].getAccessionId()+url_suff); } } if (id!=null) { //
269 * create Bare ID link for this RUL addshowLink(linkMenu, target,
270 * url_pref + id + url_suff); } } else { addshowLink(linkMenu, target,
271 * link.substring(link.lastIndexOf("|")+1)); }
277 seqMenu.add(linkMenu);
286 seqMenu.setLabel(seq.getName());
287 repGroup.setLabel("Represent Group with " + seq.getName());
294 if (!ap.av.hasHiddenRows)
301 * add a show URL menu item to the given linkMenu
309 private void addshowLink(Menu linkMenu, final String target,
312 addshowLink(linkMenu, target, target, url);
316 * add a show URL menu item to the given linkMenu
326 private void addshowLink(Menu linkMenu, final String target,
327 final String label, final String url)
329 MenuItem item = new MenuItem(label);
330 item.addActionListener(new java.awt.event.ActionListener()
332 public void actionPerformed(ActionEvent e)
334 ap.alignFrame.showURL(url, target);
340 public void itemStateChanged(ItemEvent evt)
342 if (evt.getSource() == abovePIDColour)
344 abovePIDColour_itemStateChanged();
346 else if (evt.getSource() == showColourText)
348 showColourText_itemStateChanged();
350 else if (evt.getSource() == showText)
352 showText_itemStateChanged();
354 else if (evt.getSource() == showBoxes)
356 showBoxes_itemStateChanged();
358 else if (evt.getSource() == displayNonconserved)
360 this.showNonconserved_itemStateChanged();
364 public void actionPerformed(ActionEvent evt)
366 Object source = evt.getSource();
367 if (source == clustalColour)
369 clustalColour_actionPerformed();
371 else if (source == zappoColour)
373 zappoColour_actionPerformed();
375 else if (source == taylorColour)
377 taylorColour_actionPerformed();
379 else if (source == hydrophobicityColour)
381 hydrophobicityColour_actionPerformed();
383 else if (source == helixColour)
385 helixColour_actionPerformed();
387 else if (source == strandColour)
389 strandColour_actionPerformed();
391 else if (source == turnColour)
393 turnColour_actionPerformed();
395 else if (source == buriedColour)
397 buriedColour_actionPerformed();
399 else if (source == nucleotideMenuItem)
401 nucleotideMenuItem_actionPerformed();
404 else if (source == userDefinedColour)
406 userDefinedColour_actionPerformed();
408 else if (source == PIDColour)
410 PIDColour_actionPerformed();
412 else if (source == BLOSUM62Colour)
414 BLOSUM62Colour_actionPerformed();
416 else if (source == noColourmenuItem)
418 noColourmenuItem_actionPerformed();
420 else if (source == conservationMenuItem)
422 conservationMenuItem_itemStateChanged();
424 else if (source == unGroupMenuItem)
426 unGroupMenuItem_actionPerformed();
429 else if (source == sequenceName)
433 else if (source == pdb)
437 else if (source == hideSeqs)
439 hideSequences(false);
441 else if (source == repGroup)
445 else if (source == revealAll)
447 ap.av.showAllHiddenSeqs();
450 else if (source == editGroupName)
452 EditNameDialog dialog = new EditNameDialog(getGroup().getName(),
453 getGroup().getDescription(), " Group Name",
454 "Group Description", ap.alignFrame,
455 "Edit Group Name / Description", 500, 100, true);
459 getGroup().setName(dialog.getName().replace(' ', '_'));
460 getGroup().setDescription(dialog.getDescription());
464 else if (source == copy)
466 ap.alignFrame.copy_actionPerformed();
468 else if (source == cut)
470 ap.alignFrame.cut_actionPerformed();
472 else if (source == editSequence)
474 SequenceGroup sg = ap.av.getSelectionGroup();
479 seq = (Sequence) sg.getSequenceAt(0);
481 EditNameDialog dialog = new EditNameDialog(seq.getSequenceAsString(
482 sg.getStartRes(), sg.getEndRes() + 1), null,
483 "Edit Sequence ", null,
485 ap.alignFrame, "Edit Sequence", 500, 100, true);
489 EditCommand editCommand = new EditCommand("Edit Sequences",
490 EditCommand.REPLACE, dialog.getName().replace(' ',
491 ap.av.getGapCharacter()), sg
492 .getSequencesAsArray(ap.av.hiddenRepSequences),
493 sg.getStartRes(), sg.getEndRes() + 1, ap.av.alignment);
495 ap.alignFrame.addHistoryItem(editCommand);
497 ap.av.firePropertyChange("alignment", null, ap.av.getAlignment()
502 else if (source == toUpper || source == toLower || source == toggleCase)
504 SequenceGroup sg = ap.av.getSelectionGroup();
505 Vector regions = new Vector();
508 int start = sg.getStartRes();
509 int end = sg.getEndRes() + 1;
513 if (ap.av.hasHiddenColumns)
517 start = ap.av.colSel.adjustForHiddenColumns(start);
520 end = ap.av.colSel.getHiddenBoundaryRight(start);
523 end = sg.getEndRes() + 1;
525 if (end > sg.getEndRes())
527 end = sg.getEndRes() + 1;
531 regions.addElement(new int[]
534 if (ap.av.hasHiddenColumns)
536 start = ap.av.colSel.adjustForHiddenColumns(end);
537 start = ap.av.colSel.getHiddenBoundaryLeft(start) + 1;
539 } while (end < sg.getEndRes());
541 int[][] startEnd = new int[regions.size()][2];
542 for (int i = 0; i < regions.size(); i++)
544 startEnd[i] = (int[]) regions.elementAt(i);
550 if (source == toggleCase)
552 description = "Toggle Case";
553 caseChange = ChangeCaseCommand.TOGGLE_CASE;
555 else if (source == toUpper)
557 description = "To Upper Case";
558 caseChange = ChangeCaseCommand.TO_UPPER;
562 description = "To Lower Case";
563 caseChange = ChangeCaseCommand.TO_LOWER;
566 ChangeCaseCommand caseCommand = new ChangeCaseCommand(description,
567 sg.getSequencesAsArray(ap.av.hiddenRepSequences), startEnd,
570 ap.alignFrame.addHistoryItem(caseCommand);
572 ap.av.firePropertyChange("alignment", null, ap.av.getAlignment()
577 else if (source == sequenceFeature)
579 SequenceGroup sg = ap.av.getSelectionGroup();
585 int gSize = sg.getSize();
586 SequenceI[] seqs = new SequenceI[gSize];
587 SequenceFeature[] features = new SequenceFeature[gSize];
589 for (int i = 0; i < gSize; i++)
591 seqs[i] = sg.getSequenceAt(i);
592 int start = sg.getSequenceAt(i).findPosition(sg.getStartRes());
593 int end = sg.findEndRes(sg.getSequenceAt(i));
594 features[i] = new SequenceFeature(null, null, null, start, end,
598 if (ap.seqPanel.seqCanvas.getFeatureRenderer().amendFeatures(seqs,
601 ap.alignFrame.sequenceFeatures.setState(true);
602 ap.av.showSequenceFeatures(true);
603 ap.highlightSearchResults(null);
613 void outputText(ActionEvent e)
615 CutAndPasteTransfer cap = new CutAndPasteTransfer(true, ap.alignFrame);
617 Frame frame = new Frame();
619 jalview.bin.JalviewLite.addFrame(frame, "Selection output - "
620 + e.getActionCommand(), 600, 500);
622 cap.setText(new jalview.io.AppletFormatAdapter().formatSequences(e
623 .getActionCommand(), new Alignment(ap.av
624 .getSelectionAsNewSequence()), ap.av.showJVSuffix));
630 EditNameDialog dialog = new EditNameDialog(seq.getName(), seq
631 .getDescription(), " Sequence Name",
632 "Sequence Description", ap.alignFrame,
633 "Edit Sequence Name / Description", 500, 100, true);
637 seq.setName(dialog.getName());
638 seq.setDescription(dialog.getDescription());
639 ap.paintAlignment(false);
645 if (seq.getPDBId() != null)
647 PDBEntry entry = (PDBEntry) seq.getPDBId().firstElement();
649 if (ap.av.applet.jmolAvailable)
650 new jalview.appletgui.AppletJmol(entry, new Sequence[]
651 { seq }, null, ap, AppletFormatAdapter.URL);
653 new MCview.AppletPDBViewer(entry, new Sequence[]
654 { seq }, null, ap, AppletFormatAdapter.URL);
659 CutAndPasteTransfer cap = new CutAndPasteTransfer(true, ap.alignFrame);
660 cap.setText("Paste your PDB file here.");
661 cap.setPDBImport(seq);
662 Frame frame = new Frame();
664 jalview.bin.JalviewLite.addFrame(frame, "Paste PDB file ", 400, 300);
668 private void jbInit() throws Exception
670 groupMenu.setLabel("Group");
671 groupMenu.setLabel("Selection");
672 sequenceFeature.addActionListener(this);
674 editGroupName.addActionListener(this);
675 unGroupMenuItem.setLabel("Remove Group");
676 unGroupMenuItem.addActionListener(this);
678 nucleotideMenuItem.setLabel("Nucleotide");
679 nucleotideMenuItem.addActionListener(this);
680 conservationMenuItem.addItemListener(this);
681 abovePIDColour.addItemListener(this);
682 colourMenu.setLabel("Group Colour");
683 showBoxes.setLabel("Boxes");
684 showBoxes.setState(true);
685 showBoxes.addItemListener(this);
686 sequenceName.addActionListener(this);
687 displayNonconserved.setLabel("Show Nonconserved");
688 displayNonconserved.setState(false);
689 displayNonconserved.addItemListener(this);
690 showText.setLabel("Text");
691 showText.addItemListener(this);
692 showColourText.setLabel("Colour Text");
693 showColourText.addItemListener(this);
694 outputmenu.setLabel("Output to Textbox...");
695 seqMenu.setLabel("Sequence");
696 pdb.setLabel("View PDB Structure");
697 hideSeqs.setLabel("Hide Sequences");
698 repGroup.setLabel("Represent Group with");
699 revealAll.setLabel("Reveal All");
700 menu1.setLabel("Group");
705 groupMenu.add(editGroupName);
706 groupMenu.add(editMenu);
707 groupMenu.add(outputmenu);
708 groupMenu.add(sequenceFeature);
709 groupMenu.add(menu1);
711 colourMenu.add(noColourmenuItem);
712 colourMenu.add(clustalColour);
713 colourMenu.add(BLOSUM62Colour);
714 colourMenu.add(PIDColour);
715 colourMenu.add(zappoColour);
716 colourMenu.add(taylorColour);
717 colourMenu.add(hydrophobicityColour);
718 colourMenu.add(helixColour);
719 colourMenu.add(strandColour);
720 colourMenu.add(turnColour);
721 colourMenu.add(buriedColour);
722 colourMenu.add(nucleotideMenuItem);
723 colourMenu.add(userDefinedColour);
724 colourMenu.addSeparator();
725 colourMenu.add(abovePIDColour);
726 colourMenu.add(conservationMenuItem);
728 noColourmenuItem.setLabel("None");
729 noColourmenuItem.addActionListener(this);
731 clustalColour.setLabel("Clustalx colours");
732 clustalColour.addActionListener(this);
733 zappoColour.setLabel("Zappo");
734 zappoColour.addActionListener(this);
735 taylorColour.setLabel("Taylor");
736 taylorColour.addActionListener(this);
737 hydrophobicityColour.setLabel("Hydrophobicity");
738 hydrophobicityColour.addActionListener(this);
739 helixColour.setLabel("Helix propensity");
740 helixColour.addActionListener(this);
741 strandColour.setLabel("Strand propensity");
742 strandColour.addActionListener(this);
743 turnColour.setLabel("Turn propensity");
744 turnColour.addActionListener(this);
745 buriedColour.setLabel("Buried Index");
746 buriedColour.addActionListener(this);
747 abovePIDColour.setLabel("Above % Identity");
749 userDefinedColour.setLabel("User Defined");
750 userDefinedColour.addActionListener(this);
751 PIDColour.setLabel("Percentage Identity");
752 PIDColour.addActionListener(this);
753 BLOSUM62Colour.setLabel("BLOSUM62");
754 BLOSUM62Colour.addActionListener(this);
755 conservationMenuItem.setLabel("Conservation");
758 copy.addActionListener(this);
760 cut.addActionListener(this);
762 editMenu.add(editSequence);
763 editSequence.addActionListener(this);
765 editMenu.add(toUpper);
766 toUpper.addActionListener(this);
767 editMenu.add(toLower);
768 toLower.addActionListener(this);
769 editMenu.add(toggleCase);
770 seqMenu.add(sequenceName);
772 seqMenu.add(repGroup);
773 menu1.add(unGroupMenuItem);
774 menu1.add(colourMenu);
775 menu1.add(showBoxes);
777 menu1.add(showColourText);
778 menu1.add(displayNonconserved);
779 toggleCase.addActionListener(this);
780 pdb.addActionListener(this);
781 hideSeqs.addActionListener(this);
782 repGroup.addActionListener(this);
783 revealAll.addActionListener(this);
788 ap.paintAlignment(true);
791 protected void clustalColour_actionPerformed()
793 SequenceGroup sg = getGroup();
794 sg.cs = new ClustalxColourScheme(sg
795 .getSequences(ap.av.hiddenRepSequences), ap.av.alignment
800 protected void zappoColour_actionPerformed()
802 getGroup().cs = new ZappoColourScheme();
806 protected void taylorColour_actionPerformed()
808 getGroup().cs = new TaylorColourScheme();
812 protected void hydrophobicityColour_actionPerformed()
814 getGroup().cs = new HydrophobicColourScheme();
818 protected void helixColour_actionPerformed()
820 getGroup().cs = new HelixColourScheme();
824 protected void strandColour_actionPerformed()
826 getGroup().cs = new StrandColourScheme();
830 protected void turnColour_actionPerformed()
832 getGroup().cs = new TurnColourScheme();
836 protected void buriedColour_actionPerformed()
838 getGroup().cs = new BuriedColourScheme();
842 public void nucleotideMenuItem_actionPerformed()
844 getGroup().cs = new NucleotideColourScheme();
848 protected void abovePIDColour_itemStateChanged()
850 SequenceGroup sg = getGroup();
856 if (abovePIDColour.getState())
858 sg.cs.setConsensus(AAFrequency.calculate(sg
859 .getSequences(ap.av.hiddenRepSequences), 0, ap.av.alignment
861 int threshold = SliderPanel.setPIDSliderSource(ap, sg.cs, getGroup()
864 sg.cs.setThreshold(threshold, ap.av.getIgnoreGapsConsensus());
866 SliderPanel.showPIDSlider();
870 // remove PIDColouring
872 sg.cs.setThreshold(0, ap.av.getIgnoreGapsConsensus());
879 protected void userDefinedColour_actionPerformed()
881 new UserDefinedColours(ap, getGroup());
884 protected void PIDColour_actionPerformed()
886 SequenceGroup sg = getGroup();
887 sg.cs = new PIDColourScheme();
888 sg.cs.setConsensus(AAFrequency.calculate(sg
889 .getSequences(ap.av.hiddenRepSequences), 0, ap.av.alignment
894 protected void BLOSUM62Colour_actionPerformed()
896 SequenceGroup sg = getGroup();
898 sg.cs = new Blosum62ColourScheme();
900 sg.cs.setConsensus(AAFrequency.calculate(sg
901 .getSequences(ap.av.hiddenRepSequences), 0, ap.av.alignment
907 protected void noColourmenuItem_actionPerformed()
909 getGroup().cs = null;
913 protected void conservationMenuItem_itemStateChanged()
915 SequenceGroup sg = getGroup();
921 if (conservationMenuItem.getState())
924 Conservation c = new Conservation("Group",
925 ResidueProperties.propHash, 3, sg
926 .getSequences(ap.av.hiddenRepSequences), 0,
927 ap.av.alignment.getWidth());
930 c.verdict(false, ap.av.ConsPercGaps);
932 sg.cs.setConservation(c);
934 SliderPanel.setConservationSlider(ap, sg.cs, sg.getName());
935 SliderPanel.showConservationSlider();
938 // remove ConservationColouring
940 sg.cs.setConservation(null);
946 SequenceGroup getGroup()
948 SequenceGroup sg = ap.av.getSelectionGroup();
950 // this method won't add a new group if it already exists
953 ap.av.alignment.addGroup(sg);
959 void unGroupMenuItem_actionPerformed()
961 SequenceGroup sg = ap.av.getSelectionGroup();
962 ap.av.alignment.deleteGroup(sg);
963 ap.av.setSelectionGroup(null);
964 ap.paintAlignment(true);
967 public void showColourText_itemStateChanged()
969 getGroup().setColourText(showColourText.getState());
973 public void showText_itemStateChanged()
975 getGroup().setDisplayText(showText.getState());
979 public void showNonconserved_itemStateChanged()
981 getGroup().setShowunconserved(this.displayNonconserved.getState());
985 public void showBoxes_itemStateChanged()
987 getGroup().setDisplayBoxes(showBoxes.getState());
991 void hideSequences(boolean representGroup)
993 SequenceGroup sg = ap.av.getSelectionGroup();
994 if (sg == null || sg.getSize() < 1)
996 ap.av.hideSequence(new SequenceI[]
1001 ap.av.setSelectionGroup(null);
1005 ap.av.hideRepSequences(seq, sg);
1010 int gsize = sg.getSize();
1013 hseqs = new SequenceI[gsize];
1016 for (int i = 0; i < gsize; i++)
1018 hseqs[index++] = sg.getSequenceAt(i);
1021 ap.av.hideSequence(hseqs);