private JCheckBox _color_acc_species;
private JCheckBox _color_according_to_annotation;
private boolean _color_branches;
- private JCheckBox _color_branches_cb;
+ private JCheckBox _use_visual_styles_cb;
private int _color_subtree_cb_item;
+ private int _change_node_font_item;
// The settings from the conf file
private final Configuration _configuration;
private int _copy_subtree_item;
private int _open_pdb_item;
private int _open_seq_web_item;
private int _open_tax_web_item;
+ private int _color_node_font_item;
private JButton _order;
private boolean _order_of_appearance;
private int _paste_subtree_item;
private int _reroot_cb_item;
private JButton _return_to_super_tree;
-
+ // Search
+ private JLabel _search_found_label_0;
+ private JLabel _search_found_label_1;
+ private JButton _search_reset_button_0;
+ private JButton _search_reset_button_1;
+ private JTextField _search_tf_0;
+ private JTextField _search_tf_1;
private int _select_nodes_item;
private Sequence _selected_query_seq;
private JCheckBox _seq_relation_confidence_switch;
private JCheckBox _show_annotation;
private JCheckBox _show_binary_character_counts;
private JCheckBox _show_binary_characters;
- // Search
- private JLabel _search_found_label_0;
- private JButton _search_reset_button_0;
- private JTextField _search_tf_0;
- private JLabel _search_found_label_1;
- private JButton _search_reset_button_1;
- private JTextField _search_tf_1;
-
// Indices for the click-to options in the combo box
private int _show_data_item;
private JCheckBox _show_domain_architectures;
return _color_acc_species;
}
- public JCheckBox getColorBranchesCb() {
- return _color_branches_cb;
+ public JCheckBox getUseVisualStylesCb() {
+ return _use_visual_styles_cb;
}
public JCheckBox getDisplayAsPhylogramCb() {
addJCheckBox( getShowEventsCb(), ch_panel );
add( ch_panel );
break;
- case Configuration.color_branches:
- _color_branches_cb = new JCheckBox( title );
- getColorBranchesCb().setToolTipText( "To use branch color values, if present" );
- addJCheckBox( getColorBranchesCb(), ch_panel );
+ case Configuration.use_style:
+ _use_visual_styles_cb = new JCheckBox( title );
+ getUseVisualStylesCb().setToolTipText( "To use visual styles (colors, fonts), if present" );
+ addJCheckBox( getUseVisualStylesCb(), ch_panel );
add( ch_panel );
break;
case Configuration.width_branches:
JLabel getSearchFoundCountsLabel0() {
return _search_found_label_0;
}
-
+
JLabel getSearchFoundCountsLabel1() {
return _search_found_label_1;
}
JButton getSearchResetButton0() {
return _search_reset_button_0;
}
-
+
JButton getSearchResetButton1() {
return _search_reset_button_1;
}
JTextField getSearchTextField0() {
return _search_tf_0;
}
-
+
JTextField getSearchTextField1() {
return _search_tf_1;
}
return ( ( _color_acc_species != null ) && _color_acc_species.isSelected() );
}
- boolean isColorBranches() {
- return ( ( ( getColorBranchesCb() != null ) && getColorBranchesCb().isSelected() ) || ( ( getColorBranchesCb() == null ) && _color_branches ) );
+ boolean isUseVisualStyles() {
+ return ( ( ( getUseVisualStylesCb() != null ) && getUseVisualStylesCb().isSelected() ) || ( ( getUseVisualStylesCb() == null ) && _color_branches ) );
}
boolean isDrawPhylogram() {
if ( query != null ) {
query = query.trim();
}
-
-
if ( !ForesterUtil.isEmpty( query ) ) {
search0( main_panel, tree, query );
}
searchReset0();
}
}
-
+
void search1() {
final MainPanel main_panel = getMainPanel();
final Phylogeny tree = main_panel.getCurrentPhylogeny();
if ( query != null ) {
query = query.trim();
}
-
if ( !ForesterUtil.isEmpty( query ) ) {
search1( main_panel, tree, query );
}
searchReset1();
}
}
-
-
void searchReset0() {
if ( getMainPanel().getCurrentTreePanel() != null ) {
getMainPanel().getCurrentTreePanel().setFoundNodes0( null );
}
}
-
+
void searchReset1() {
if ( getMainPanel().getCurrentTreePanel() != null ) {
getMainPanel().getCurrentTreePanel().setFoundNodes1( null );
getShowEventsCb().setSelected( state );
}
break;
- case Configuration.color_branches:
- if ( getColorBranchesCb() != null ) {
- getColorBranchesCb().setSelected( state );
+ case Configuration.use_style:
+ if ( getUseVisualStylesCb() != null ) {
+ getUseVisualStylesCb().setSelected( state );
}
break;
case Configuration.width_branches:
else if ( action == _open_pdb_item ) {
setActionWhenNodeClicked( NodeClickAction.OPEN_PDB_WEB );
}
+ else if ( action == _color_node_font_item ) {
+ setActionWhenNodeClicked( NodeClickAction.COLOR_NODE_FONT );
+ }
+ else if ( action == _change_node_font_item ) {
+ setActionWhenNodeClicked( NodeClickAction.CHANGE_NODE_FONT );
+ }
else {
throw new RuntimeException( "unknown action: " + action );
}
void setSearchFoundCountsOnLabel0( final int counts ) {
getSearchFoundCountsLabel0().setText( "Found: " + counts );
}
-
+
void setSearchFoundCountsOnLabel1( final int counts ) {
getSearchFoundCountsLabel1().setText( "Found: " + counts );
}
s_panel_2.add( _search_found_label_1 );
addJButton( _search_reset_button_1, s_panel_2 );
}
-
-
+
void showAnnotations() {
if ( _show_annotation != null ) {
_show_annotation.setSelected( true );
searchReset0();
}
}
-
+
private void search1( final MainPanel main_panel, final Phylogeny tree, final String query_str ) {
getSearchFoundCountsLabel1().setVisible( true );
getSearchResetButton1().setEnabled( true );
}
cb_index++;
}
+ if ( _configuration.doDisplayClickToOption( Configuration.color_node_font ) ) {
+ _color_node_font_item = cb_index;
+ addClickToOption( Configuration.color_node_font,
+ _configuration.getClickToTitle( Configuration.color_node_font ) );
+ if ( default_option == Configuration.color_node_font ) {
+ selected_index = cb_index;
+ }
+ cb_index++;
+ }
+ if ( _configuration.doDisplayClickToOption( Configuration.change_node_font ) ) {
+ _change_node_font_item = cb_index;
+ addClickToOption( Configuration.change_node_font,
+ _configuration.getClickToTitle( Configuration.change_node_font ) );
+ if ( default_option == Configuration.change_node_font ) {
+ selected_index = cb_index;
+ }
+ cb_index++;
+ }
if ( _configuration.doDisplayClickToOption( Configuration.open_seq_web ) ) {
_open_seq_web_item = cb_index;
addClickToOption( Configuration.open_seq_web, _configuration.getClickToTitle( Configuration.open_seq_web ) );
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.color_branches, _configuration.doCheckOption( Configuration.color_branches ) );
+ if ( _configuration.doDisplayOption( Configuration.use_style ) ) {
+ addCheckbox( Configuration.use_style, _configuration.getDisplayTitle( Configuration.use_style ) );
+ setCheckbox( Configuration.use_style, _configuration.doCheckOption( Configuration.use_style ) );
}
if ( _configuration.doDisplayOption( Configuration.width_branches ) ) {
addCheckbox( Configuration.width_branches, _configuration.getDisplayTitle( Configuration.width_branches ) );
SHOW_DATA,
SORT_DESCENDENTS,
SUBTREE,
- SWAP;
+ SWAP,
+ CHANGE_NODE_FONT,
+ COLOR_NODE_FONT;
}
}