X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fext%2Ftreeviewer%2FTreeViewerBindingI.java;h=bb6eb19121d8624bf903f923d3d18f094e070115;hb=01982168e80062f30c7ea08ceced49030cbfaffd;hp=da999c6a074afd9d0da7bcd0f9c7578d7665d01d;hpb=61d2fe973679dd35d3e471ced017a558f2d6e27b;p=jalview.git diff --git a/src/jalview/ext/treeviewer/TreeViewerBindingI.java b/src/jalview/ext/treeviewer/TreeViewerBindingI.java index da999c6..bb6eb19 100644 --- a/src/jalview/ext/treeviewer/TreeViewerBindingI.java +++ b/src/jalview/ext/treeviewer/TreeViewerBindingI.java @@ -28,11 +28,13 @@ import jalview.structure.SelectionSource; import java.awt.event.ActionListener; import java.awt.event.MouseListener; +import java.util.Map; /** * - * Interface for binding a tree viewer to Jalview alignments. Assumes a tree - * viewer will both want to receive and send selection events. + * Interface for associating the nodes of a tree viewer with Jalview alignment + * sequences and communicating between the two. Assumes a tree viewer will both + * want to receive and send selection events. * * @author kjvanderheide * @@ -43,20 +45,49 @@ public interface TreeViewerBindingI SelectionSource { /** + * Gets the mapping for sequences with their associated tree nodes + * + * @return + */ + public Map getAlignmentWithNodes(); + + /** + * Gets the mapping for tree nodes with their associated sequences + * + * @return + */ + public Map getNodesWithAlignment(); + + /** + * + * @param x + * coordinate that functions as the clustering threshold + */ + public void partitionTree(final int x); + + public void showMatchingChildSequences(TreeNodeI parentNode); + + public void showMatchingSequence(TreeNodeI nodeToMatch); + + /** * If a node is selected in the tree panel this method highlights the * corresponding sequence in the Jalview alignment view. If an internal node * is selected all child sequences get highlighted as well. */ public void showNodeSelectionOnAlign(TreeNodeI node); - public void treeSelectionChanged(SequenceI sequence); - - public void showMatchingSequence(TreeNodeI nodeToMatch); - - public void showMatchingChildSequences(TreeNodeI parentNode); + /** + * Sorts the given alignment by the order in which the sequences appear in the + * tree. + * + * @param alignPanel + * Panel containing the alignment to be sorted. + * @return the sorting Command + */ + public CommandI sortAlignmentIn(AlignmentPanel alignPanel); public void sortByTree_actionPerformed(); - public CommandI sortAlignmentIn(AlignmentPanel alignPanel); + public void treeSelectionChanged(SequenceI sequence); }