X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Farchaeopteryx%2FControlPanel.java;h=5495b9e630dc48d28752b504b76914414e4941cf;hb=417e04e65da53dfcdaf099ff8d290c1392e610c7;hp=5bca3986a86714b305e9a42f4b29cd3f3bf148d1;hpb=8bf432f4963f5cbadb6a194192b682b1b7bda40f;p=jalview.git diff --git a/forester/java/src/org/forester/archaeopteryx/ControlPanel.java b/forester/java/src/org/forester/archaeopteryx/ControlPanel.java index 5bca398..5495b9e 100644 --- a/forester/java/src/org/forester/archaeopteryx/ControlPanel.java +++ b/forester/java/src/org/forester/archaeopteryx/ControlPanel.java @@ -134,6 +134,7 @@ final class ControlPanel extends JPanel implements ActionListener { private int _paste_subtree_item; private int _add_new_node_item; private int _edit_node_data_item; + private int _get_ext_desc_data; private int _blast_item; // zooming and quick tree manipulation buttons: private JButton _zoom_in_x; @@ -254,7 +255,7 @@ final class ControlPanel extends JPanel implements ActionListener { _order_of_appearance = !_order_of_appearance; tp.setNodeInPreorderToNull(); tp.getPhylogeny().externalNodesHaveChanged(); - tp.getPhylogeny().hashIDs(); + tp.getPhylogeny().clearHashIdToNodeMap(); tp.getPhylogeny().recalculateNumberOfExternalDescendants( true ); tp.resetNodeIdToDistToLeafMap(); tp.setEdited( true ); @@ -1186,6 +1187,9 @@ final class ControlPanel extends JPanel implements ActionListener { else if ( action == _edit_node_data_item ) { setActionWhenNodeClicked( NodeClickAction.EDIT_NODE_DATA ); } + else if ( action == _get_ext_desc_data ) { + setActionWhenNodeClicked( NodeClickAction.GET_EXT_DESC_DATA ); + } else { throw new RuntimeException( "unknown action: " + action ); } @@ -1375,6 +1379,15 @@ final class ControlPanel extends JPanel implements ActionListener { } cb_index++; } + if ( _configuration.doDisplayClickToOption( Configuration.get_ext_desc_data ) ) { + _get_ext_desc_data = cb_index; + addClickToOption( Configuration.get_ext_desc_data, + _configuration.getClickToTitle( Configuration.get_ext_desc_data ) ); + if ( default_option == Configuration.get_ext_desc_data ) { + selected_index = cb_index; + } + cb_index++; + } if ( getOptions().isEditable() ) { if ( _configuration.doDisplayClickToOption( Configuration.cut_subtree ) ) { _cut_subtree_item = cb_index; @@ -1820,7 +1833,7 @@ final class ControlPanel extends JPanel implements ActionListener { tp.updateSetOfCollapsedExternalNodes(); t.recalculateNumberOfExternalDescendants( false ); tp.setNodeInPreorderToNull(); - t.hashIDs(); + t.clearHashIdToNodeMap(); showWhole(); } } @@ -1957,6 +1970,7 @@ final class ControlPanel extends JPanel implements ActionListener { ADD_NEW_NODE, EDIT_NODE_DATA, SORT_DESCENDENTS, + GET_EXT_DESC_DATA, BLAST; } }