javadoc
[jalview.git] / src / jalview / gui / AlignFrame.java
index 3859157..5529f2c 100755 (executable)
@@ -610,7 +610,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     showTranslation.setVisible(nucleotide);
     conservationMenuItem.setEnabled(!nucleotide);
     modifyConservation.setEnabled(!nucleotide);
-
+    showGroupConservation.setEnabled(!nucleotide);
     // Remember AlignFrame always starts as protein
     if (!nucleotide)
     {
@@ -655,6 +655,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     showUnconservedMenuItem.setSelected(av.showUnconserved);
     showGroupConsensus.setSelected(av.showGroupConsensus);
     showGroupConservation.setSelected(av.showGroupConservation);
+    showConsensusHistogram.setSelected(av.showConsensusHistogram);
+    showConsensusProfile.setSelected(av.showConsensusProfile);
     setColourSelected(ColourSchemeProperty.getColourName(av
             .getGlobalColourScheme()));
 
@@ -685,20 +687,21 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     }
 
     JPanel progressPanel;
+    Long lId=new Long(id);
     GridLayout layout = (GridLayout) statusPanel.getLayout();
-    if (progressBars.get(new Long(id)) != null)
+    if (progressBars.get(lId) != null)
     {
       progressPanel = (JPanel) progressBars.get(new Long(id));
       statusPanel.remove(progressPanel);
-      progressBars.remove(progressPanel);
+      progressBars.remove(lId);
       progressPanel = null;
       if (message != null)
       {
         statusBar.setText(message);
       }
-      if (progressBarHandlers.contains(new Long(id)))
+      if (progressBarHandlers.contains(lId))
       {
-        progressBarHandlers.remove(new Long(id));
+        progressBarHandlers.remove(lId);
       }
       layout.setRows(layout.getRows() - 1);
     }
@@ -715,7 +718,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
       layout.setRows(layout.getRows() + 1);
       statusPanel.add(progressPanel);
 
-      progressBars.put(new Long(id), progressPanel);
+      progressBars.put(lId, progressPanel);
     }
     // update GUI
     setMenusForViewport();
@@ -2494,6 +2497,12 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
       featureSettings.close();
       featureSettings = null;
     }
+    if (!showSeqFeatures.isSelected())
+    {
+      // make sure features are actually displayed
+      showSeqFeatures.setSelected(true);
+      showSeqFeatures_actionPerformed(null);
+    }
     featureSettings = new FeatureSettings(this);
   }
 
@@ -3769,9 +3778,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
                   .getServiceClient(sh);
           impl.attachWSMenuEntry(seqsrchmenu, this);
         }
-        // finally, add the whole shebang onto the webservices menu
         wsmenu.add(seqsrchmenu);
       }
+      // finally, add the whole shebang onto the webservices menu
       resetWebServiceMenu();
       for (int i = 0, j = wsmenu.size(); i < j; i++)
       {
@@ -3794,6 +3803,16 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
   {
     webService.removeAll();
     build_fetchdbmenu(webService);
+    build_urlServiceMenu(webService);
+  }
+
+  /**
+   * construct any groupURL type service menu entries.
+   * @param webService
+   */
+  private void build_urlServiceMenu(JMenu webService)
+  {
+    jalview.ws.EnfinEnvision2OneWay.getInstance().attachWSMenuEntry(webService, this);
   }
 
   /*
@@ -4473,7 +4492,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
   protected void showGroupConsensus_actionPerformed(ActionEvent e)
   {
     viewport.setShowGroupConsensus(showGroupConsensus.getState());
-    alignPanel.updateAnnotation();
+    alignPanel.updateAnnotation(applyAutoAnnotationSettings.getState());
 
   }
 
@@ -4487,7 +4506,29 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
   protected void showGroupConservation_actionPerformed(ActionEvent e)
   {
     viewport.setShowGroupConservation(showGroupConservation.getState());
-    alignPanel.updateAnnotation();
+    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());
   }
 
   /*