From: cmzmasek@gmail.com Date: Sat, 1 Sep 2012 03:04:47 +0000 (+0000) Subject: in progress X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=417e04e65da53dfcdaf099ff8d290c1392e610c7;p=jalview.git in progress --- diff --git a/forester/java/src/org/forester/archaeopteryx/Configuration.java b/forester/java/src/org/forester/archaeopteryx/Configuration.java index 2420efe..d44ba3b 100644 --- a/forester/java/src/org/forester/archaeopteryx/Configuration.java +++ b/forester/java/src/org/forester/archaeopteryx/Configuration.java @@ -145,6 +145,7 @@ public final class Configuration { final static int add_new_node = 13; final static int edit_node_data = 14; final static int sort_descendents = 15; + final static int get_ext_desc_data = 16; // --------------------------- // Display options for trees // --------------------------- @@ -173,7 +174,7 @@ public final class Configuration { { "Open Sequence Web", "display" }, { "Open Taxonomy Web", "display" }, { "Blast", "display" }, { "Cut Subtree", "display" }, { "Copy Subtree", "display" }, { "Paste Subtree", "display" }, { "Delete Subtree/Node", "display" }, { "Add New Node", "display" }, { "Edit Node Data", "display" }, - { "Sort Descendants", "display" } }; + { "Sort Descendants", "display" }, { "Get External Node Data", "display" } }; // This option is selected in the dropdown int default_clickto = Configuration.display_node_data; // -------------- @@ -372,6 +373,9 @@ public final class Configuration { else if ( name.equals( "sort_descendants" ) ) { index = Configuration.sort_descendents; } + else if ( name.equals( "get_ext_descendents_data" ) ) { + index = Configuration.get_ext_desc_data; + } else if ( name.equals( "display_sequences" ) ) { ForesterUtil .printWarningMessage( Constants.PRG_NAME, "configuration key [display_sequences] is deprecated" ); diff --git a/forester/java/src/org/forester/archaeopteryx/ControlPanel.java b/forester/java/src/org/forester/archaeopteryx/ControlPanel.java index 55b0314..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; @@ -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; @@ -1957,6 +1970,7 @@ final class ControlPanel extends JPanel implements ActionListener { ADD_NEW_NODE, EDIT_NODE_DATA, SORT_DESCENDENTS, + GET_EXT_DESC_DATA, BLAST; } } diff --git a/forester/java/src/org/forester/archaeopteryx/TreePanel.java b/forester/java/src/org/forester/archaeopteryx/TreePanel.java index befe375..992f740 100644 --- a/forester/java/src/org/forester/archaeopteryx/TreePanel.java +++ b/forester/java/src/org/forester/archaeopteryx/TreePanel.java @@ -1337,11 +1337,18 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee case SORT_DESCENDENTS: sortDescendants( node ); break; + case GET_EXT_DESC_DATA: + getExtDescNodeData( node ); + break; default: throw new IllegalArgumentException( "unknown action: " + action ); } } + private void getExtDescNodeData( final PhylogenyNode node ) { + System.out.println( node.toString() ); + } + final void increaseDomainStructureEvalueThreshold() { if ( _domain_structure_e_value_thr_exp < 3 ) { _domain_structure_e_value_thr_exp += 1;