JAL-1953 some more comments, moved JalviewBinding
[jalview.git] / src / jalview / ext / treeviewer / TreeViewerUtils.java
index d065662..7e1a4e9 100644 (file)
@@ -1,7 +1,6 @@
 package jalview.ext.treeviewer;
 
 import jalview.datamodel.SequenceI;
-import jalview.ext.archaeopteryx.JalviewBinding;
 import jalview.util.MessageManager;
 import jalview.viewmodel.AlignmentViewport;
 
@@ -11,7 +10,10 @@ import java.util.HashMap;
 import java.util.Map;
 
 /**
- * Static class containing generic methods for
+ * Static class containing generic methods for communicating between the tree
+ * viewer frame and Jalview, currently includes adding the frame to the Jalview
+ * Desktop and triggering an association between an {@link AlignmentViewport}
+ * and {@link TreeFrameI}.
  * 
  * @author kjvanderheide
  *
@@ -25,15 +27,14 @@ public final class TreeViewerUtils
   private static Map<TreeFrameI, TreeViewerBindingI> activeViews = new HashMap<>();
 
   /**
+   * Adds the given tree frame to the Jalview {@link Desktop}.
    * 
    * @param treeFrame
-   * @return
+   * @return the same tree frame but now as part of Jalview.
    */
   public static TreeFrameI addTreeViewFrameToJalview(
-          final TreeFrameI treeFrame)
+          final TreeFrameI treeFrame, int width, int height)
   {
-    int width = 400;
-    int height = 550;
     treeFrame.setMinimumSize(new Dimension(width, height));
     // aptxApp.setFont(Desktop.instance.getFont());
     // aptxApp.getMainPanel().setFont(Desktop.instance.getFont());
@@ -57,6 +58,8 @@ public final class TreeViewerUtils
   }
 
   /**
+   * Convience method for building the association between Jalview's alignment
+   * and the tree frame.
    * 
    * @param treeFrame
    * @param jalviewAlignViewport