Use AAFrequency final keys
[jalview.git] / src / jalview / gui / AlignFrame.java
index f7c8840..27503f9 100755 (executable)
@@ -415,6 +415,9 @@ public class AlignFrame
       tabbedPane.addTab(ap.av.viewName==null?"Original":ap.av.viewName, ap);
     }
 
+    ap.av.updateConsensus(ap);
+    ap.av.updateConservation(ap);
+
 
     ap.av.addPropertyChangeListener(new PropertyChangeListener()
     {
@@ -1616,8 +1619,9 @@ public class AlignFrame
 
      if (av.hconsensus != null && av.autoCalculateConsensus)
      {
-       av.updateConsensus();
-       av.updateConservation();
+       av.updateConsensus(ap);
+       av.updateConservation(ap);
+       ap.annotationPanel.repaint();
      }
 
      resetAllColourSchemes();
@@ -2747,16 +2751,26 @@ public class AlignFrame
   {
     return ShowNewickTree(nf,title,600,500,4,5);
   }
+  public TreePanel ShowNewickTree(NewickFile nf, String title, AlignmentView input)
+  {
+    return ShowNewickTree(nf,title, input, 600,500,4,5);
+  }
+  public TreePanel ShowNewickTree(NewickFile nf, String title, int w,int h,int x, int y) {
+    return ShowNewickTree(nf, title, null, w, h, x, y);
+  }
   /**
-   * DOCUMENT ME!
-   *
-   * @param nf DOCUMENT ME!
-   * @param title DOCUMENT ME!
+   * Add a treeviewer for the tree extracted from a newick file object to the current alignment view 
    *
-   * @return DOCUMENT ME!
+   * @param nf the tree
+   * @param title tree viewer title
+   * @param input Associated alignment input data (or null)
+   * @param w width
+   * @param h height
+   * @param x position
+   * @param y position
+   * @return TreePanel handle
    */
-  public TreePanel ShowNewickTree(NewickFile nf, String title, int w,int h,int x, int y)
-  {
+  public TreePanel ShowNewickTree(NewickFile nf, String title, AlignmentView input, int w,int h,int x, int y) {
     TreePanel tp = null;
 
     try
@@ -2768,7 +2782,7 @@ public class AlignFrame
         tp = new TreePanel(alignPanel,
                            "FromFile",
                            title,
-                           nf);
+                           nf, input);
 
         tp.setSize(w,h);