2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
3 * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
11 * Jalview is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
18 package jalview.appletgui;
23 import java.awt.event.*;
25 import jalview.analysis.*;
26 import jalview.commands.*;
27 import jalview.datamodel.*;
28 import jalview.schemes.*;
29 import jalview.util.UrlLink;
30 import jalview.io.AppletFormatAdapter;
32 public class APopupMenu extends java.awt.PopupMenu implements
33 ActionListener, ItemListener
35 Menu groupMenu = new Menu();
37 MenuItem editGroupName = new MenuItem();
39 protected MenuItem clustalColour = new MenuItem();
41 protected MenuItem zappoColour = new MenuItem();
43 protected MenuItem taylorColour = new MenuItem();
45 protected MenuItem hydrophobicityColour = new MenuItem();
47 protected MenuItem helixColour = new MenuItem();
49 protected MenuItem strandColour = new MenuItem();
51 protected MenuItem turnColour = new MenuItem();
53 protected MenuItem buriedColour = new MenuItem();
55 protected CheckboxMenuItem abovePIDColour = new CheckboxMenuItem();
57 protected MenuItem userDefinedColour = new MenuItem();
59 protected MenuItem PIDColour = new MenuItem();
61 protected MenuItem BLOSUM62Colour = new MenuItem();
63 MenuItem noColourmenuItem = new MenuItem();
65 protected CheckboxMenuItem conservationMenuItem = new CheckboxMenuItem();
67 final AlignmentPanel ap;
69 MenuItem unGroupMenuItem = new MenuItem();
71 MenuItem nucleotideMenuItem = new MenuItem();
73 Menu colourMenu = new Menu();
75 CheckboxMenuItem showBoxes = new CheckboxMenuItem();
77 CheckboxMenuItem showText = new CheckboxMenuItem();
79 CheckboxMenuItem showColourText = new CheckboxMenuItem();
81 CheckboxMenuItem displayNonconserved = new CheckboxMenuItem();
83 Menu editMenu = new Menu("Edit");
85 MenuItem copy = new MenuItem("Copy (Jalview Only)");
87 MenuItem cut = new MenuItem("Cut (Jalview Only)");
89 MenuItem toUpper = new MenuItem("To Upper Case");
91 MenuItem toLower = new MenuItem("To Lower Case");
93 MenuItem toggleCase = new MenuItem("Toggle Case");
95 Menu outputmenu = new Menu();
97 Menu seqMenu = new Menu();
99 MenuItem pdb = new MenuItem();
101 MenuItem hideSeqs = new MenuItem();
103 MenuItem repGroup = new MenuItem();
105 MenuItem sequenceName = new MenuItem("Edit Name/Description");
107 MenuItem sequenceFeature = new MenuItem("Create Sequence Feature");
109 MenuItem editSequence = new MenuItem("Edit Sequence");
113 MenuItem revealAll = new MenuItem();
115 Menu menu1 = new Menu();
117 public APopupMenu(AlignmentPanel apanel, final Sequence seq, Vector links)
119 // /////////////////////////////////////////////////////////
120 // If this is activated from the sequence panel, the user may want to
121 // edit or annotate a particular residue. Therefore display the residue menu
123 // If from the IDPanel, we must display the sequence menu
124 // ////////////////////////////////////////////////////////
132 } catch (Exception e)
137 for (int i = 0; i < jalview.io.AppletFormatAdapter.WRITEABLE_FORMATS.length; i++)
139 MenuItem item = new MenuItem(
140 jalview.io.AppletFormatAdapter.WRITEABLE_FORMATS[i]);
142 item.addActionListener(this);
143 outputmenu.add(item);
146 SequenceGroup sg = ap.av.getSelectionGroup();
148 if (sg != null && sg.getSize() > 0)
150 editGroupName.setLabel(sg.getName());
151 showText.setState(sg.getDisplayText());
152 showColourText.setState(sg.getColourText());
153 showBoxes.setState(sg.getDisplayBoxes());
154 displayNonconserved.setState(sg.getShowNonconserved());
155 if (!ap.av.alignment.getGroups().contains(sg))
157 groupMenu.remove(unGroupMenuItem);
167 if (links != null && links.size() > 0)
169 Menu linkMenu = new Menu("Link");
171 for (int i = 0; i < links.size(); i++)
173 link = links.elementAt(i).toString();
174 UrlLink urlLink = new UrlLink(link);
175 if (!urlLink.isValid())
177 System.err.println(urlLink.getInvalidMessage());
180 final String target = urlLink.getTarget(); // link.substring(0,
181 // link.indexOf("|"));
182 final String label = urlLink.getLabel();
183 if (urlLink.isDynamic())
186 // collect matching db-refs
187 DBRefEntry[] dbr = jalview.util.DBRefUtils.selectRefs(seq
188 .getDBRef(), new String[]
190 // collect id string too
191 String id = seq.getName();
192 String descr = seq.getDescription();
193 if (descr != null && descr.length() < 1)
199 for (int r = 0; r < dbr.length; r++)
201 if (id != null && dbr[r].getAccessionId().equals(id))
203 // suppress duplicate link creation for the bare sequence ID
204 // string with this link
207 // create Bare ID link for this RUL
208 String[] urls = urlLink.makeUrls(dbr[r].getAccessionId(),
212 for (int u = 0; u < urls.length; u += 2)
214 addshowLink(linkMenu, label + "|" + urls[u], urls[u + 1]);
221 // create Bare ID link for this RUL
222 String[] urls = urlLink.makeUrls(id, true);
225 for (int u = 0; u < urls.length; u += 2)
227 addshowLink(linkMenu, label, urls[u + 1]);
230 // addshowLink(linkMenu, target, url_pref + id + url_suff);
232 // Now construct URLs from description but only try to do it for regex
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,
257 * link.indexOf("$SEQUENCE_ID$"));
259 * String url_suff = link.substring(link.indexOf("$SEQUENCE_ID$") + 13);
260 * // collect matching db-refs DBRefEntry[] dbr =
261 * jalview.util.DBRefUtils.selectRefs(seq.getDBRef(), new
262 * String[]{target}); // collect id string too String id =
263 * seq.getName(); if (id.indexOf("|") > -1) { id =
264 * id.substring(id.lastIndexOf("|") + 1); } if (dbr!=null) { for (int
265 * r=0;r<dbr.length; r++) { if (dbr[r].getAccessionId().equals(id)) { //
266 * suppress duplicate link creation for the bare sequence ID string with
267 * this link id = null; } addshowLink(linkMenu,
268 * dbr[r].getSource()+"|"+dbr[r].getAccessionId(), target,
269 * url_pref+dbr[r].getAccessionId()+url_suff); } } if (id!=null) { //
270 * create Bare ID link for this RUL addshowLink(linkMenu, target,
271 * url_pref + id + url_suff); } } else { addshowLink(linkMenu, target,
272 * link.substring(link.lastIndexOf("|")+1)); }
275 if (linkMenu.getItemCount() > 0)
279 seqMenu.add(linkMenu);
287 // TODO: add group link menu entry here
290 seqMenu.setLabel(seq.getName());
291 repGroup.setLabel("Represent Group with " + seq.getName());
298 if (!ap.av.hasHiddenRows)
305 * add a show URL menu item to the given linkMenu
309 * - menu label string
313 private void addshowLink(Menu linkMenu, final String target,
316 addshowLink(linkMenu, target, target, url);
320 * add a show URL menu item to the given linkMenu
324 * - URL target window
326 * - menu label string
330 private void addshowLink(Menu linkMenu, final String target,
331 final String label, final String url)
333 MenuItem item = new MenuItem(label);
334 item.addActionListener(new java.awt.event.ActionListener()
336 public void actionPerformed(ActionEvent e)
338 ap.alignFrame.showURL(url, target);
344 public void itemStateChanged(ItemEvent evt)
346 if (evt.getSource() == abovePIDColour)
348 abovePIDColour_itemStateChanged();
350 else if (evt.getSource() == showColourText)
352 showColourText_itemStateChanged();
354 else if (evt.getSource() == showText)
356 showText_itemStateChanged();
358 else if (evt.getSource() == showBoxes)
360 showBoxes_itemStateChanged();
362 else if (evt.getSource() == displayNonconserved)
364 this.showNonconserved_itemStateChanged();
368 public void actionPerformed(ActionEvent evt)
370 Object source = evt.getSource();
371 if (source == clustalColour)
373 clustalColour_actionPerformed();
375 else if (source == zappoColour)
377 zappoColour_actionPerformed();
379 else if (source == taylorColour)
381 taylorColour_actionPerformed();
383 else if (source == hydrophobicityColour)
385 hydrophobicityColour_actionPerformed();
387 else if (source == helixColour)
389 helixColour_actionPerformed();
391 else if (source == strandColour)
393 strandColour_actionPerformed();
395 else if (source == turnColour)
397 turnColour_actionPerformed();
399 else if (source == buriedColour)
401 buriedColour_actionPerformed();
403 else if (source == nucleotideMenuItem)
405 nucleotideMenuItem_actionPerformed();
408 else if (source == userDefinedColour)
410 userDefinedColour_actionPerformed();
412 else if (source == PIDColour)
414 PIDColour_actionPerformed();
416 else if (source == BLOSUM62Colour)
418 BLOSUM62Colour_actionPerformed();
420 else if (source == noColourmenuItem)
422 noColourmenuItem_actionPerformed();
424 else if (source == conservationMenuItem)
426 conservationMenuItem_itemStateChanged();
428 else if (source == unGroupMenuItem)
430 unGroupMenuItem_actionPerformed();
433 else if (source == sequenceName)
437 else if (source == pdb)
441 else if (source == hideSeqs)
443 hideSequences(false);
445 else if (source == repGroup)
449 else if (source == revealAll)
451 ap.av.showAllHiddenSeqs();
454 else if (source == editGroupName)
456 EditNameDialog dialog = new EditNameDialog(getGroup().getName(),
457 getGroup().getDescription(), " Group Name",
458 "Group Description", ap.alignFrame,
459 "Edit Group Name / Description", 500, 100, true);
463 getGroup().setName(dialog.getName().replace(' ', '_'));
464 getGroup().setDescription(dialog.getDescription());
468 else if (source == copy)
470 ap.alignFrame.copy_actionPerformed();
472 else if (source == cut)
474 ap.alignFrame.cut_actionPerformed();
476 else if (source == editSequence)
478 SequenceGroup sg = ap.av.getSelectionGroup();
483 seq = (Sequence) sg.getSequenceAt(0);
485 EditNameDialog dialog = new EditNameDialog(seq.getSequenceAsString(
486 sg.getStartRes(), sg.getEndRes() + 1), null,
487 "Edit Sequence ", null,
489 ap.alignFrame, "Edit Sequence", 500, 100, true);
493 EditCommand editCommand = new EditCommand("Edit Sequences",
494 EditCommand.REPLACE, dialog.getName().replace(' ',
495 ap.av.getGapCharacter()), sg
496 .getSequencesAsArray(ap.av.hiddenRepSequences),
497 sg.getStartRes(), sg.getEndRes() + 1, ap.av.alignment);
499 ap.alignFrame.addHistoryItem(editCommand);
501 ap.av.firePropertyChange("alignment", null, ap.av.getAlignment()
506 else if (source == toUpper || source == toLower || source == toggleCase)
508 SequenceGroup sg = ap.av.getSelectionGroup();
509 Vector regions = new Vector();
512 int start = sg.getStartRes();
513 int end = sg.getEndRes() + 1;
517 if (ap.av.hasHiddenColumns)
521 start = ap.av.colSel.adjustForHiddenColumns(start);
524 end = ap.av.colSel.getHiddenBoundaryRight(start);
527 end = sg.getEndRes() + 1;
529 if (end > sg.getEndRes())
531 end = sg.getEndRes() + 1;
535 regions.addElement(new int[]
538 if (ap.av.hasHiddenColumns)
540 start = ap.av.colSel.adjustForHiddenColumns(end);
541 start = ap.av.colSel.getHiddenBoundaryLeft(start) + 1;
543 } while (end < sg.getEndRes());
545 int[][] startEnd = new int[regions.size()][2];
546 for (int i = 0; i < regions.size(); i++)
548 startEnd[i] = (int[]) regions.elementAt(i);
554 if (source == toggleCase)
556 description = "Toggle Case";
557 caseChange = ChangeCaseCommand.TOGGLE_CASE;
559 else if (source == toUpper)
561 description = "To Upper Case";
562 caseChange = ChangeCaseCommand.TO_UPPER;
566 description = "To Lower Case";
567 caseChange = ChangeCaseCommand.TO_LOWER;
570 ChangeCaseCommand caseCommand = new ChangeCaseCommand(description,
571 sg.getSequencesAsArray(ap.av.hiddenRepSequences), startEnd,
574 ap.alignFrame.addHistoryItem(caseCommand);
576 ap.av.firePropertyChange("alignment", null, ap.av.getAlignment()
581 else if (source == sequenceFeature)
583 SequenceGroup sg = ap.av.getSelectionGroup();
589 int rsize = 0, gSize = sg.getSize();
590 SequenceI[] rseqs, seqs = new SequenceI[gSize];
591 SequenceFeature[] tfeatures, features = new SequenceFeature[gSize];
593 for (int i = 0; i < gSize; i++)
595 int start = sg.getSequenceAt(i).findPosition(sg.getStartRes());
596 int end = sg.findEndRes(sg.getSequenceAt(i));
599 seqs[rsize] = sg.getSequenceAt(i);
600 features[rsize] = new SequenceFeature(null, null, null, start,
605 rseqs = new SequenceI[rsize];
606 tfeatures = new SequenceFeature[rsize];
607 System.arraycopy(seqs, 0, rseqs, 0, rsize);
608 System.arraycopy(features, 0, tfeatures, 0, rsize);
609 features = tfeatures;
612 if (ap.seqPanel.seqCanvas.getFeatureRenderer().amendFeatures(seqs,
615 ap.alignFrame.sequenceFeatures.setState(true);
616 ap.av.showSequenceFeatures(true);
617 ap.highlightSearchResults(null);
627 void outputText(ActionEvent e)
629 CutAndPasteTransfer cap = new CutAndPasteTransfer(true, ap.alignFrame);
631 Frame frame = new Frame();
633 jalview.bin.JalviewLite.addFrame(frame, "Selection output - "
634 + e.getActionCommand(), 600, 500);
636 cap.setText(new jalview.io.AppletFormatAdapter().formatSequences(e
637 .getActionCommand(), new Alignment(ap.av
638 .getSelectionAsNewSequence()), ap.av.showJVSuffix));
644 EditNameDialog dialog = new EditNameDialog(seq.getName(), seq
645 .getDescription(), " Sequence Name",
646 "Sequence Description", ap.alignFrame,
647 "Edit Sequence Name / Description", 500, 100, true);
651 seq.setName(dialog.getName());
652 seq.setDescription(dialog.getDescription());
653 ap.paintAlignment(false);
659 if (seq.getPDBId() != null)
661 PDBEntry entry = (PDBEntry) seq.getPDBId().firstElement();
663 if (ap.av.applet.jmolAvailable)
664 new jalview.appletgui.AppletJmol(entry, new Sequence[]
665 { seq }, null, ap, AppletFormatAdapter.URL);
667 new MCview.AppletPDBViewer(entry, new Sequence[]
668 { seq }, null, ap, AppletFormatAdapter.URL);
673 CutAndPasteTransfer cap = new CutAndPasteTransfer(true, ap.alignFrame);
674 cap.setText("Paste your PDB file here.");
675 cap.setPDBImport(seq);
676 Frame frame = new Frame();
678 jalview.bin.JalviewLite.addFrame(frame, "Paste PDB file ", 400, 300);
682 private void jbInit() throws Exception
684 groupMenu.setLabel("Group");
685 groupMenu.setLabel("Selection");
686 sequenceFeature.addActionListener(this);
688 editGroupName.addActionListener(this);
689 unGroupMenuItem.setLabel("Remove Group");
690 unGroupMenuItem.addActionListener(this);
692 nucleotideMenuItem.setLabel("Nucleotide");
693 nucleotideMenuItem.addActionListener(this);
694 conservationMenuItem.addItemListener(this);
695 abovePIDColour.addItemListener(this);
696 colourMenu.setLabel("Group Colour");
697 showBoxes.setLabel("Boxes");
698 showBoxes.setState(true);
699 showBoxes.addItemListener(this);
700 sequenceName.addActionListener(this);
701 displayNonconserved.setLabel("Show Nonconserved");
702 displayNonconserved.setState(false);
703 displayNonconserved.addItemListener(this);
704 showText.setLabel("Text");
705 showText.addItemListener(this);
706 showColourText.setLabel("Colour Text");
707 showColourText.addItemListener(this);
708 outputmenu.setLabel("Output to Textbox...");
709 seqMenu.setLabel("Sequence");
710 pdb.setLabel("View PDB Structure");
711 hideSeqs.setLabel("Hide Sequences");
712 repGroup.setLabel("Represent Group with");
713 revealAll.setLabel("Reveal All");
714 menu1.setLabel("Group");
719 groupMenu.add(editGroupName);
720 groupMenu.add(editMenu);
721 groupMenu.add(outputmenu);
722 groupMenu.add(sequenceFeature);
723 groupMenu.add(menu1);
725 colourMenu.add(noColourmenuItem);
726 colourMenu.add(clustalColour);
727 colourMenu.add(BLOSUM62Colour);
728 colourMenu.add(PIDColour);
729 colourMenu.add(zappoColour);
730 colourMenu.add(taylorColour);
731 colourMenu.add(hydrophobicityColour);
732 colourMenu.add(helixColour);
733 colourMenu.add(strandColour);
734 colourMenu.add(turnColour);
735 colourMenu.add(buriedColour);
736 colourMenu.add(nucleotideMenuItem);
737 colourMenu.add(userDefinedColour);
738 colourMenu.addSeparator();
739 colourMenu.add(abovePIDColour);
740 colourMenu.add(conservationMenuItem);
742 noColourmenuItem.setLabel("None");
743 noColourmenuItem.addActionListener(this);
745 clustalColour.setLabel("Clustalx colours");
746 clustalColour.addActionListener(this);
747 zappoColour.setLabel("Zappo");
748 zappoColour.addActionListener(this);
749 taylorColour.setLabel("Taylor");
750 taylorColour.addActionListener(this);
751 hydrophobicityColour.setLabel("Hydrophobicity");
752 hydrophobicityColour.addActionListener(this);
753 helixColour.setLabel("Helix propensity");
754 helixColour.addActionListener(this);
755 strandColour.setLabel("Strand propensity");
756 strandColour.addActionListener(this);
757 turnColour.setLabel("Turn propensity");
758 turnColour.addActionListener(this);
759 buriedColour.setLabel("Buried Index");
760 buriedColour.addActionListener(this);
761 abovePIDColour.setLabel("Above % Identity");
763 userDefinedColour.setLabel("User Defined");
764 userDefinedColour.addActionListener(this);
765 PIDColour.setLabel("Percentage Identity");
766 PIDColour.addActionListener(this);
767 BLOSUM62Colour.setLabel("BLOSUM62");
768 BLOSUM62Colour.addActionListener(this);
769 conservationMenuItem.setLabel("Conservation");
772 copy.addActionListener(this);
774 cut.addActionListener(this);
776 editMenu.add(editSequence);
777 editSequence.addActionListener(this);
779 editMenu.add(toUpper);
780 toUpper.addActionListener(this);
781 editMenu.add(toLower);
782 toLower.addActionListener(this);
783 editMenu.add(toggleCase);
784 seqMenu.add(sequenceName);
786 seqMenu.add(repGroup);
787 menu1.add(unGroupMenuItem);
788 menu1.add(colourMenu);
789 menu1.add(showBoxes);
791 menu1.add(showColourText);
792 menu1.add(displayNonconserved);
793 toggleCase.addActionListener(this);
794 pdb.addActionListener(this);
795 hideSeqs.addActionListener(this);
796 repGroup.addActionListener(this);
797 revealAll.addActionListener(this);
802 ap.paintAlignment(true);
805 protected void clustalColour_actionPerformed()
807 SequenceGroup sg = getGroup();
808 sg.cs = new ClustalxColourScheme(sg
809 .getSequences(ap.av.hiddenRepSequences), ap.av.alignment
814 protected void zappoColour_actionPerformed()
816 getGroup().cs = new ZappoColourScheme();
820 protected void taylorColour_actionPerformed()
822 getGroup().cs = new TaylorColourScheme();
826 protected void hydrophobicityColour_actionPerformed()
828 getGroup().cs = new HydrophobicColourScheme();
832 protected void helixColour_actionPerformed()
834 getGroup().cs = new HelixColourScheme();
838 protected void strandColour_actionPerformed()
840 getGroup().cs = new StrandColourScheme();
844 protected void turnColour_actionPerformed()
846 getGroup().cs = new TurnColourScheme();
850 protected void buriedColour_actionPerformed()
852 getGroup().cs = new BuriedColourScheme();
856 public void nucleotideMenuItem_actionPerformed()
858 getGroup().cs = new NucleotideColourScheme();
862 protected void abovePIDColour_itemStateChanged()
864 SequenceGroup sg = getGroup();
870 if (abovePIDColour.getState())
872 sg.cs.setConsensus(AAFrequency.calculate(sg
873 .getSequences(ap.av.hiddenRepSequences), 0, ap.av.alignment
875 int threshold = SliderPanel.setPIDSliderSource(ap, sg.cs, getGroup()
878 sg.cs.setThreshold(threshold, ap.av.getIgnoreGapsConsensus());
880 SliderPanel.showPIDSlider();
884 // remove PIDColouring
886 sg.cs.setThreshold(0, ap.av.getIgnoreGapsConsensus());
893 protected void userDefinedColour_actionPerformed()
895 new UserDefinedColours(ap, getGroup());
898 protected void PIDColour_actionPerformed()
900 SequenceGroup sg = getGroup();
901 sg.cs = new PIDColourScheme();
902 sg.cs.setConsensus(AAFrequency.calculate(sg
903 .getSequences(ap.av.hiddenRepSequences), 0, ap.av.alignment
908 protected void BLOSUM62Colour_actionPerformed()
910 SequenceGroup sg = getGroup();
912 sg.cs = new Blosum62ColourScheme();
914 sg.cs.setConsensus(AAFrequency.calculate(sg
915 .getSequences(ap.av.hiddenRepSequences), 0, ap.av.alignment
921 protected void noColourmenuItem_actionPerformed()
923 getGroup().cs = null;
927 protected void conservationMenuItem_itemStateChanged()
929 SequenceGroup sg = getGroup();
935 if (conservationMenuItem.getState())
938 Conservation c = new Conservation("Group",
939 ResidueProperties.propHash, 3, sg
940 .getSequences(ap.av.hiddenRepSequences), 0,
941 ap.av.alignment.getWidth());
944 c.verdict(false, ap.av.ConsPercGaps);
946 sg.cs.setConservation(c);
948 SliderPanel.setConservationSlider(ap, sg.cs, sg.getName());
949 SliderPanel.showConservationSlider();
952 // remove ConservationColouring
954 sg.cs.setConservation(null);
960 SequenceGroup getGroup()
962 SequenceGroup sg = ap.av.getSelectionGroup();
964 // this method won't add a new group if it already exists
967 ap.av.alignment.addGroup(sg);
973 void unGroupMenuItem_actionPerformed()
975 SequenceGroup sg = ap.av.getSelectionGroup();
976 ap.av.alignment.deleteGroup(sg);
977 ap.av.setSelectionGroup(null);
978 ap.paintAlignment(true);
981 public void showColourText_itemStateChanged()
983 getGroup().setColourText(showColourText.getState());
987 public void showText_itemStateChanged()
989 getGroup().setDisplayText(showText.getState());
993 public void showNonconserved_itemStateChanged()
995 getGroup().setShowNonconserved(this.displayNonconserved.getState());
999 public void showBoxes_itemStateChanged()
1001 getGroup().setDisplayBoxes(showBoxes.getState());
1005 void hideSequences(boolean representGroup)
1007 SequenceGroup sg = ap.av.getSelectionGroup();
1008 if (sg == null || sg.getSize() < 1)
1010 ap.av.hideSequence(new SequenceI[]
1015 ap.av.setSelectionGroup(null);
1019 ap.av.hideRepSequences(seq, sg);
1024 int gsize = sg.getSize();
1027 hseqs = new SequenceI[gsize];
1030 for (int i = 0; i < gsize; i++)
1032 hseqs[index++] = sg.getSequenceAt(i);
1035 ap.av.hideSequence(hseqs);