//
// Copyright (C) 2008-2009 Christian M. Zmasek
// Copyright (C) 2008-2009 Burnham Institute for Medical Research
-//
+//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
-//
+//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
private JComboBox _show_sequence_relations;
private JComboBox _sequence_relation_type_box;
private JCheckBox _show_vector_data_cb;
+ private JCheckBox _show_properties_cb;
private JLabel _click_to_label;
private JLabel _zoom_label;
private JLabel _domain_display_label;
/**
* Handle an action.
*/
+ @Override
public void actionPerformed( final ActionEvent e ) {
try {
final TreePanel tp = getMainPanel().getCurrentTreePanel();
addJCheckBox( _show_node_names, ch_panel );
add( ch_panel );
break;
- case Configuration.show_tax_code:
- _show_taxo_code = new JCheckBox( title );
- addJCheckBox( _show_taxo_code, ch_panel );
- add( ch_panel );
- break;
case Configuration.show_taxonomy_scientific_names:
_show_taxo_scientific_names = new JCheckBox( title );
addJCheckBox( _show_taxo_scientific_names, ch_panel );
addJCheckBox( _show_taxo_common_names, ch_panel );
add( ch_panel );
break;
+ case Configuration.show_tax_code:
+ _show_taxo_code = new JCheckBox( title );
+ addJCheckBox( _show_taxo_code, ch_panel );
+ add( ch_panel );
+ break;
case Configuration.show_taxonomy_images:
_show_taxo_images_cb = new JCheckBox( title );
addJCheckBox( _show_taxo_images_cb, ch_panel );
addJCheckBox( _show_vector_data_cb, ch_panel );
add( ch_panel );
break;
+ case Configuration.show_properties:
+ _show_properties_cb = new JCheckBox( title );
+ addJCheckBox( _show_properties_cb, ch_panel );
+ add( ch_panel );
+ break;
default:
throw new RuntimeException( "unknown checkbox: " + which );
}
add( horizGrid );
add( getSequenceRelationBox() );
if ( _configuration.doDisplayOption( Configuration.show_relation_confidence ) ) {
- addCheckbox( Configuration.show_relation_confidence, _configuration
- .getDisplayTitle( Configuration.show_relation_confidence ) );
- setCheckbox( Configuration.show_relation_confidence, _configuration
- .doCheckOption( Configuration.show_relation_confidence ) );
+ addCheckbox( Configuration.show_relation_confidence,
+ _configuration.getDisplayTitle( Configuration.show_relation_confidence ) );
+ setCheckbox( Configuration.show_relation_confidence,
+ _configuration.doCheckOption( Configuration.show_relation_confidence ) );
}
}// addSequenceRelationBlock
return _color_branches_cb;
}
+ public JCheckBox getColorAccSpeciesCb() {
+ return _color_acc_species;
+ }
+
Configuration getConfiguration() {
return _configuration;
}
return ( ( _show_vector_data_cb != null ) && _show_vector_data_cb.isSelected() );
}
+ public boolean isShowProperties() {
+ return ( ( _show_properties_cb != null ) && _show_properties_cb.isSelected() );
+ }
+
boolean isShowGeneSymbols() {
return ( ( _show_gene_symbols != null ) && _show_gene_symbols.isSelected() );
}
return ( ( _show_node_names != null ) && _show_node_names.isSelected() );
}
- boolean isShowProperty() {
- return ( ( _show_annotation != null ) && _show_annotation.isSelected() );
- }
-
boolean isShowSequenceAcc() {
return ( ( _show_sequence_acc != null ) && _show_sequence_acc.isSelected() );
}
_show_node_names.setSelected( state );
}
break;
- case Configuration.show_tax_code:
- if ( _show_taxo_code != null ) {
- _show_taxo_code.setSelected( state );
- }
- break;
case Configuration.show_taxonomy_scientific_names:
if ( _show_taxo_scientific_names != null ) {
_show_taxo_scientific_names.setSelected( state );
_show_taxo_common_names.setSelected( state );
}
break;
+ case Configuration.show_tax_code:
+ if ( _show_taxo_code != null ) {
+ _show_taxo_code.setSelected( state );
+ }
+ break;
case Configuration.show_taxonomy_images:
if ( _show_taxo_images_cb != null ) {
_show_taxo_images_cb.setSelected( state );
_show_vector_data_cb.setSelected( state );
}
break;
+ case Configuration.show_properties:
+ if ( _show_properties_cb != null ) {
+ _show_properties_cb.setSelected( state );
+ }
+ break;
case Configuration.show_sequence_acc:
if ( _show_sequence_acc != null ) {
_show_sequence_acc.setSelected( state );
int cb_index = 0;
if ( _configuration.doDisplayClickToOption( Configuration.display_node_data ) ) {
_show_data_item = cb_index;
- addClickToOption( Configuration.display_node_data, _configuration
- .getClickToTitle( Configuration.display_node_data ) );
+ addClickToOption( Configuration.display_node_data,
+ _configuration.getClickToTitle( Configuration.display_node_data ) );
if ( default_option == Configuration.display_node_data ) {
selected_index = cb_index;
}
}
if ( _configuration.doDisplayClickToOption( Configuration.collapse_uncollapse ) ) {
_collapse_cb_item = cb_index;
- addClickToOption( Configuration.collapse_uncollapse, _configuration
- .getClickToTitle( Configuration.collapse_uncollapse ) );
+ addClickToOption( Configuration.collapse_uncollapse,
+ _configuration.getClickToTitle( Configuration.collapse_uncollapse ) );
if ( default_option == Configuration.collapse_uncollapse ) {
selected_index = cb_index;
}
}
if ( _configuration.doDisplayClickToOption( Configuration.copy_subtree ) ) {
_copy_subtree_item = cb_index;
- addClickToOption( Configuration.copy_subtree, _configuration
- .getClickToTitle( Configuration.copy_subtree ) );
+ addClickToOption( Configuration.copy_subtree,
+ _configuration.getClickToTitle( Configuration.copy_subtree ) );
if ( default_option == Configuration.copy_subtree ) {
selected_index = cb_index;
}
}
if ( _configuration.doDisplayClickToOption( Configuration.paste_subtree ) ) {
_paste_subtree_item = cb_index;
- addClickToOption( Configuration.paste_subtree, _configuration
- .getClickToTitle( Configuration.paste_subtree ) );
+ addClickToOption( Configuration.paste_subtree,
+ _configuration.getClickToTitle( Configuration.paste_subtree ) );
if ( default_option == Configuration.paste_subtree ) {
selected_index = cb_index;
}
}
if ( _configuration.doDisplayClickToOption( Configuration.delete_subtree_or_node ) ) {
_delete_node_or_subtree_item = cb_index;
- addClickToOption( Configuration.delete_subtree_or_node, _configuration
- .getClickToTitle( Configuration.delete_subtree_or_node ) );
+ addClickToOption( Configuration.delete_subtree_or_node,
+ _configuration.getClickToTitle( Configuration.delete_subtree_or_node ) );
if ( default_option == Configuration.delete_subtree_or_node ) {
selected_index = cb_index;
}
}
if ( _configuration.doDisplayClickToOption( Configuration.add_new_node ) ) {
_add_new_node_item = cb_index;
- addClickToOption( Configuration.add_new_node, _configuration
- .getClickToTitle( Configuration.add_new_node ) );
+ addClickToOption( Configuration.add_new_node,
+ _configuration.getClickToTitle( Configuration.add_new_node ) );
if ( default_option == Configuration.add_new_node ) {
selected_index = cb_index;
}
}
if ( _configuration.doDisplayClickToOption( Configuration.edit_node_data ) ) {
_edit_node_data_item = cb_index;
- addClickToOption( Configuration.edit_node_data, _configuration
- .getClickToTitle( Configuration.edit_node_data ) );
+ addClickToOption( Configuration.edit_node_data,
+ _configuration.getClickToTitle( Configuration.edit_node_data ) );
if ( default_option == Configuration.edit_node_data ) {
selected_index = cb_index;
}
private void setupDisplayCheckboxes() {
if ( _configuration.doDisplayOption( Configuration.display_as_phylogram ) ) {
- addCheckbox( Configuration.display_as_phylogram, _configuration
- .getDisplayTitle( Configuration.display_as_phylogram ) );
- setCheckbox( Configuration.display_as_phylogram, _configuration
- .doCheckOption( Configuration.display_as_phylogram ) );
+ addCheckbox( Configuration.display_as_phylogram,
+ _configuration.getDisplayTitle( Configuration.display_as_phylogram ) );
+ setCheckbox( Configuration.display_as_phylogram,
+ _configuration.doCheckOption( Configuration.display_as_phylogram ) );
}
if ( _configuration.doDisplayOption( Configuration.dynamically_hide_data ) ) {
- addCheckbox( Configuration.dynamically_hide_data, _configuration
- .getDisplayTitle( Configuration.dynamically_hide_data ) );
- setCheckbox( Configuration.dynamically_hide_data, _configuration
- .doCheckOption( Configuration.dynamically_hide_data ) );
+ addCheckbox( Configuration.dynamically_hide_data,
+ _configuration.getDisplayTitle( Configuration.dynamically_hide_data ) );
+ setCheckbox( Configuration.dynamically_hide_data,
+ _configuration.doCheckOption( Configuration.dynamically_hide_data ) );
}
if ( _configuration.doDisplayOption( Configuration.node_data_popup ) ) {
addCheckbox( Configuration.node_data_popup, _configuration.getDisplayTitle( Configuration.node_data_popup ) );
setCheckbox( Configuration.node_data_popup, _configuration.doCheckOption( Configuration.node_data_popup ) );
}
if ( _configuration.doDisplayOption( Configuration.display_internal_data ) ) {
- addCheckbox( Configuration.display_internal_data, _configuration
- .getDisplayTitle( Configuration.display_internal_data ) );
- setCheckbox( Configuration.display_internal_data, _configuration
- .doCheckOption( Configuration.display_internal_data ) );
+ addCheckbox( Configuration.display_internal_data,
+ _configuration.getDisplayTitle( Configuration.display_internal_data ) );
+ setCheckbox( Configuration.display_internal_data,
+ _configuration.doCheckOption( Configuration.display_internal_data ) );
}
if ( _configuration.doDisplayOption( Configuration.color_according_to_species ) ) {
- addCheckbox( Configuration.color_according_to_species, _configuration
- .getDisplayTitle( Configuration.color_according_to_species ) );
- setCheckbox( Configuration.color_according_to_species, _configuration
- .doCheckOption( Configuration.color_according_to_species ) );
+ addCheckbox( Configuration.color_according_to_species,
+ _configuration.getDisplayTitle( Configuration.color_according_to_species ) );
+ setCheckbox( Configuration.color_according_to_species,
+ _configuration.doCheckOption( Configuration.color_according_to_species ) );
}
if ( _configuration.doDisplayOption( Configuration.color_according_to_annotation ) ) {
- addCheckbox( Configuration.color_according_to_annotation, _configuration
- .getDisplayTitle( Configuration.color_according_to_annotation ) );
- setCheckbox( Configuration.color_according_to_annotation, _configuration
- .doCheckOption( Configuration.color_according_to_annotation ) );
+ addCheckbox( Configuration.color_according_to_annotation,
+ _configuration.getDisplayTitle( Configuration.color_according_to_annotation ) );
+ setCheckbox( Configuration.color_according_to_annotation,
+ _configuration.doCheckOption( Configuration.color_according_to_annotation ) );
}
if ( _configuration.doDisplayOption( Configuration.color_branches ) ) {
addCheckbox( Configuration.color_branches, _configuration.getDisplayTitle( Configuration.color_branches ) );
setCheckbox( Configuration.show_tax_code, _configuration.doCheckOption( Configuration.show_tax_code ) );
}
if ( _configuration.doDisplayOption( Configuration.show_taxonomy_scientific_names ) ) {
- addCheckbox( Configuration.show_taxonomy_scientific_names, _configuration
- .getDisplayTitle( Configuration.show_taxonomy_scientific_names ) );
- setCheckbox( Configuration.show_taxonomy_scientific_names, _configuration
- .doCheckOption( Configuration.show_taxonomy_scientific_names ) );
+ addCheckbox( Configuration.show_taxonomy_scientific_names,
+ _configuration.getDisplayTitle( Configuration.show_taxonomy_scientific_names ) );
+ setCheckbox( Configuration.show_taxonomy_scientific_names,
+ _configuration.doCheckOption( Configuration.show_taxonomy_scientific_names ) );
}
if ( _configuration.doDisplayOption( Configuration.show_taxonomy_common_names ) ) {
- addCheckbox( Configuration.show_taxonomy_common_names, _configuration
- .getDisplayTitle( Configuration.show_taxonomy_common_names ) );
- setCheckbox( Configuration.show_taxonomy_common_names, _configuration
- .doCheckOption( Configuration.show_taxonomy_common_names ) );
+ addCheckbox( Configuration.show_taxonomy_common_names,
+ _configuration.getDisplayTitle( Configuration.show_taxonomy_common_names ) );
+ setCheckbox( Configuration.show_taxonomy_common_names,
+ _configuration.doCheckOption( Configuration.show_taxonomy_common_names ) );
}
if ( _configuration.doDisplayOption( Configuration.show_taxonomy_images ) ) {
- addCheckbox( Configuration.show_taxonomy_images, _configuration
- .getDisplayTitle( Configuration.show_taxonomy_images ) );
- setCheckbox( Configuration.show_taxonomy_images, _configuration
- .doCheckOption( Configuration.show_taxonomy_images ) );
+ addCheckbox( Configuration.show_taxonomy_images,
+ _configuration.getDisplayTitle( Configuration.show_taxonomy_images ) );
+ setCheckbox( Configuration.show_taxonomy_images,
+ _configuration.doCheckOption( Configuration.show_taxonomy_images ) );
}
if ( _configuration.doDisplayOption( Configuration.show_gene_symbols ) ) {
- addCheckbox( Configuration.show_gene_symbols, _configuration
- .getDisplayTitle( Configuration.show_gene_symbols ) );
- setCheckbox( Configuration.show_gene_symbols, _configuration
- .doCheckOption( Configuration.show_gene_symbols ) );
+ addCheckbox( Configuration.show_gene_symbols,
+ _configuration.getDisplayTitle( Configuration.show_gene_symbols ) );
+ setCheckbox( Configuration.show_gene_symbols,
+ _configuration.doCheckOption( Configuration.show_gene_symbols ) );
}
if ( _configuration.doDisplayOption( Configuration.show_gene_names ) ) {
addCheckbox( Configuration.show_gene_names, _configuration.getDisplayTitle( Configuration.show_gene_names ) );
setCheckbox( Configuration.show_gene_names, _configuration.doCheckOption( Configuration.show_gene_names ) );
}
if ( _configuration.doDisplayOption( Configuration.show_sequence_acc ) ) {
- addCheckbox( Configuration.show_sequence_acc, _configuration
- .getDisplayTitle( Configuration.show_sequence_acc ) );
- setCheckbox( Configuration.show_sequence_acc, _configuration
- .doCheckOption( Configuration.show_sequence_acc ) );
+ addCheckbox( Configuration.show_sequence_acc,
+ _configuration.getDisplayTitle( Configuration.show_sequence_acc ) );
+ setCheckbox( Configuration.show_sequence_acc,
+ _configuration.doCheckOption( Configuration.show_sequence_acc ) );
}
if ( _configuration.doDisplayOption( Configuration.show_annotation ) ) {
addCheckbox( Configuration.show_annotation, _configuration.getDisplayTitle( Configuration.show_annotation ) );
setCheckbox( Configuration.show_annotation, _configuration.doCheckOption( Configuration.show_annotation ) );
}
if ( _configuration.doDisplayOption( Configuration.show_binary_characters ) ) {
- addCheckbox( Configuration.show_binary_characters, _configuration
- .getDisplayTitle( Configuration.show_binary_characters ) );
- setCheckbox( Configuration.show_binary_characters, _configuration
- .doCheckOption( Configuration.show_binary_characters ) );
+ addCheckbox( Configuration.show_binary_characters,
+ _configuration.getDisplayTitle( Configuration.show_binary_characters ) );
+ setCheckbox( Configuration.show_binary_characters,
+ _configuration.doCheckOption( Configuration.show_binary_characters ) );
}
if ( _configuration.doDisplayOption( Configuration.show_binary_character_counts ) ) {
- addCheckbox( Configuration.show_binary_character_counts, _configuration
- .getDisplayTitle( Configuration.show_binary_character_counts ) );
- setCheckbox( Configuration.show_binary_character_counts, _configuration
- .doCheckOption( Configuration.show_binary_character_counts ) );
+ addCheckbox( Configuration.show_binary_character_counts,
+ _configuration.getDisplayTitle( Configuration.show_binary_character_counts ) );
+ setCheckbox( Configuration.show_binary_character_counts,
+ _configuration.doCheckOption( Configuration.show_binary_character_counts ) );
}
if ( _configuration.doDisplayOption( Configuration.show_domain_architectures ) ) {
- addCheckbox( Configuration.show_domain_architectures, _configuration
- .getDisplayTitle( Configuration.show_domain_architectures ) );
- setCheckbox( Configuration.show_domain_architectures, _configuration
- .doCheckOption( Configuration.show_domain_architectures ) );
+ addCheckbox( Configuration.show_domain_architectures,
+ _configuration.getDisplayTitle( Configuration.show_domain_architectures ) );
+ setCheckbox( Configuration.show_domain_architectures,
+ _configuration.doCheckOption( Configuration.show_domain_architectures ) );
}
if ( _configuration.doDisplayOption( Configuration.write_confidence_values ) ) {
- addCheckbox( Configuration.write_confidence_values, _configuration
- .getDisplayTitle( Configuration.write_confidence_values ) );
- setCheckbox( Configuration.write_confidence_values, _configuration
- .doCheckOption( Configuration.write_confidence_values ) );
+ addCheckbox( Configuration.write_confidence_values,
+ _configuration.getDisplayTitle( Configuration.write_confidence_values ) );
+ setCheckbox( Configuration.write_confidence_values,
+ _configuration.doCheckOption( Configuration.write_confidence_values ) );
}
if ( _configuration.doDisplayOption( Configuration.write_events ) ) {
addCheckbox( Configuration.write_events, _configuration.getDisplayTitle( Configuration.write_events ) );
setCheckbox( Configuration.write_events, _configuration.doCheckOption( Configuration.write_events ) );
}
if ( _configuration.doDisplayOption( Configuration.show_vector_data ) ) {
- addCheckbox( Configuration.show_vector_data, _configuration
- .getDisplayTitle( Configuration.show_vector_data ) );
+ addCheckbox( Configuration.show_vector_data,
+ _configuration.getDisplayTitle( Configuration.show_vector_data ) );
setCheckbox( Configuration.show_vector_data, _configuration.doCheckOption( Configuration.show_vector_data ) );
}
+ if ( _configuration.doDisplayOption( Configuration.show_properties ) ) {
+ addCheckbox( Configuration.show_properties, _configuration.getDisplayTitle( Configuration.show_properties ) );
+ setCheckbox( Configuration.show_properties, _configuration.doCheckOption( Configuration.show_properties ) );
+ }
}
void setupSearchTools() {
for( final TreePanel tree_panel : _mainpanel.getTreePanels() ) {
if ( tree_panel != null ) {
tree_panel.validate();
- tree_panel.setParametersForPainting( _mainpanel.getSizeOfViewport().width, _mainpanel
- .getSizeOfViewport().height, true );
+ tree_panel.setParametersForPainting( _mainpanel.getSizeOfViewport().width,
+ _mainpanel.getSizeOfViewport().height,
+ true );
tree_panel.resetPreferredSize();
tree_panel.repaint();
}