+ /**
+ * sort the alignment using the given treePanel
+ * @param treePanel tree used to sort view
+ * @param title string used for undo event name
+ */
+ public void sortByTree(TreePanel treePanel, String title)
+ {
+ SequenceI[] oldOrder = viewport.getAlignment().getSequencesArray();
+ AlignmentSorter.sortByTree(viewport.getAlignment(), treePanel
+ .getTree());
+ // addHistoryItem(new HistoryItem("Sort", viewport.alignment,
+ // HistoryItem.SORT));
+ addHistoryItem(new OrderCommand("Order by "+title, oldOrder,
+ viewport.alignment));
+ alignPanel.paintAlignment(true);
+ }
+ /**
+ * Do any automatic reordering of the alignment and add the necessary bits to the menu structure for the new tree
+ * @param treePanel
+ * @param title
+ */
+ protected void addTreeMenuItem(final TreePanel treePanel, final String title)