+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * jalview.jbgui.GAlignFrame#showGroupConsensus_actionPerformed(java.awt.event
+ * .ActionEvent)
+ */
+ protected void showGroupConsensus_actionPerformed(ActionEvent e)
+ {
+ viewport.setShowGroupConsensus(showGroupConsensus.getState());
+ alignPanel.updateAnnotation(applyAutoAnnotationSettings.getState());
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * jalview.jbgui.GAlignFrame#showGroupConservation_actionPerformed(java.awt
+ * .event.ActionEvent)
+ */
+ protected void showGroupConservation_actionPerformed(ActionEvent e)
+ {
+ viewport.setShowGroupConservation(showGroupConservation.getState());
+ alignPanel.updateAnnotation(applyAutoAnnotationSettings.getState());
+ }
+
+ /* (non-Javadoc)
+ * @see jalview.jbgui.GAlignFrame#showConsensusHistogram_actionPerformed(java.awt.event.ActionEvent)
+ */
+ protected void showConsensusHistogram_actionPerformed(ActionEvent e)
+ {
+ viewport.setShowConsensusHistogram(showConsensusHistogram.getState());
+ alignPanel.updateAnnotation(applyAutoAnnotationSettings.getState());
+ }
+
+ /* (non-Javadoc)
+ * @see jalview.jbgui.GAlignFrame#showConsensusProfile_actionPerformed(java.awt.event.ActionEvent)
+ */
+ protected void showConsensusProfile_actionPerformed(ActionEvent e)
+ {
+ viewport.setShowConsensusProfile(showConsensusProfile.getState());
+ alignPanel.updateAnnotation(applyAutoAnnotationSettings.getState());
+ }
+ protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
+ {
+ alignPanel.updateAnnotation(applyAutoAnnotationSettings.getState());
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * jalview.jbgui.GAlignFrame#makeGrpsFromSelection_actionPerformed(java.awt
+ * .event.ActionEvent)
+ */
+ protected void makeGrpsFromSelection_actionPerformed(ActionEvent e)
+ {
+ if (viewport.getSelectionGroup() != null)
+ {
+ SequenceGroup[] gps = jalview.analysis.Grouping.makeGroupsFrom(
+ viewport.getSequenceSelection(), viewport.getAlignmentView(
+ true).getSequenceStrings(viewport.getGapCharacter()),
+ viewport.alignment.getGroups());
+ viewport.alignment.deleteAllGroups();
+ viewport.sequenceColours = null;
+ viewport.setSelectionGroup(null);
+ // set view properties for each group
+ for (int g = 0; g < gps.length; g++)
+ {
+ gps[g].setShowunconserved(viewport.getShowUnconserved());
+ gps[g].setIncludeAllConsSymbols(viewport.isIncludeAllConsensusSymbols());
+ viewport.alignment.addGroup(gps[g]);
+ Color col = new Color((int) (Math.random() * 255), (int) (Math
+ .random() * 255), (int) (Math.random() * 255));
+ col = col.brighter();
+ for (Enumeration sq = gps[g].getSequences(null).elements(); sq
+ .hasMoreElements(); viewport.setSequenceColour(
+ (SequenceI) sq.nextElement(), col))
+ ;
+ }
+ PaintRefresher.Refresh(this, viewport.getSequenceSetId());
+ alignPanel.updateAnnotation();
+ alignPanel.paintAlignment(true);
+ }
+ }